1 subroutine da_llxy_wrf(proj, lat, lon, x, y)
3 !-----------------------------------------------------------------------
4 ! Purpose: Converts input lat/lon values to the cartesian (x, y) value
5 ! for the given projection.
6 !-----------------------------------------------------------------------
10 type(proj_info), intent(in) :: proj
11 real, intent(in) :: lat
12 real, intent(in) :: lon
13 real, intent(out) :: x
14 real, intent(out) :: y
16 if (trace_use_frequent) call da_trace_entry("da_llxy_wrf")
18 if (.NOT.proj%init) then
19 call da_error(__FILE__,__LINE__, &
20 (/"You have not called map_set for this projection!"/))
23 select case(proj%code)
26 call da_llxy_latlon(lat,lon,proj,x,y)
29 call da_llxy_merc(lat,lon,proj,x,y)
30 x = x + proj%knowni - 1.0
31 y = y + proj%knownj - 1.0
34 call da_llxy_ps(lat,lon,proj,x,y)
37 call da_llxy_lc(lat,lon,proj,x,y)
38 x = x + proj%knowni - 1.0
39 y = y + proj%knownj - 1.0
42 write(unit=message(1),fmt='(A,I2)') &
43 'Unrecognized map projection code: ', proj%code
44 call da_error(__FILE__,__LINE__,message(1:1))
47 if (trace_use_frequent) call da_trace_exit("da_llxy_wrf")
49 end subroutine da_llxy_wrf