da_llxy_wrf_new.inc
References to this file elsewhere.
1 subroutine da_llxy_wrf_new(proj, info)
2
3 !-----------------------------------------------------------------------
4 ! Purpose: Converts input lat/lon values to the cartesian (x,y) value
5 ! for the given projection.
6 !-----------------------------------------------------------------------
7
8 implicit none
9
10 type(proj_info), intent(in) :: proj
11 type(infa_type), intent(inout) :: info
12
13 if (trace_use) call da_trace_entry("da_llxy_wrf_new")
14
15 if (.NOT.proj%init) then
16 call da_error(__FILE__,__LINE__, &
17 (/"You have not called map_set for this projection!"/))
18 end if
19
20 select case(proj%code)
21
22 case(PROJ_LATLON)
23 call da_llxy_latlon_new(proj,info)
24
25 case(PROJ_MERC)
26 call da_llxy_merc_new(proj,info)
27 info%x(:,:) = info%x(:,:) + proj%knowni - 1.0
28 info%y(:,:) = info%y(:,:) + proj%knownj - 1.0
29
30 case(PROJ_PS)
31 call da_llxy_ps_new(proj,info)
32
33 case(PROJ_LC)
34 call da_llxy_lc_new(proj,info)
35 info%x(:,:) = info%x(:,:) + proj%knowni - 1.0
36 info%y(:,:) = info%y(:,:) + proj%knownj - 1.0
37
38 case default
39 write(unit=message(1),fmt='(A,I2)') &
40 'Unrecognized map projection code: ', proj%code
41 call da_error(__FILE__,__LINE__,message(1:1))
42 end select
43
44 if (trace_use) call da_trace_exit("da_llxy_wrf_new")
45
46 end subroutine da_llxy_wrf_new
47
48