1 subroutine da_earth_2_model_wind(eu,ev,mu,mv,lon)
3 !---------------------------------------------------------------------------
4 ! Purpose: Convert earth wind to model wind.
6 ! Need map projection parameters.
8 ! IPROJ: Projection type
9 ! PHIC: Central latitude
10 ! XLONC: Central longitude
13 !---------------------------------------------------------------------------
17 real*8, intent(in) :: eu, ev
18 real, intent(out) :: mu, mv
19 real, intent(in) :: lon
23 if (trace_use) call da_trace_entry("da_earth_2_model_wind")
25 ! for mercator projection, the winds are as in earth coordinates
27 if (map_projection == 3) then
30 if (trace_use) call da_trace_exit("da_earth_2_model_wind")
34 ! for conversion to grid coordinates,
35 ! see program datamap, subr vect, and
36 ! ANTHES METEO. 597 NOTES, EQUA. 2.23, 2.25, 2.28.
40 if (xlonrt > 180.0) xlonrt=xlonrt-360.0
41 if (xlonrt <-180.0) xlonrt=xlonrt+360.0
43 ang=xlonrt*cone_factor*pi/180.0
45 if (phic < 0.0) ang=-ang
47 mu = ev*sin(ang) + eu*cos(ang)
48 mv = ev*cos(ang) - eu*sin(ang)
50 if (trace_use) call da_trace_exit("da_earth_2_model_wind")
52 end subroutine da_earth_2_model_wind