da_llxy_kma_global_new.inc
References to this file elsewhere.
1 subroutine da_llxy_kma_global_new(info)
2
3 !----------------------------------------------------------------------------
4 ! Purpose: calculates the(x,y) location(dot) in the global grids
5 ! from latitudes and longitudes
6 !----------------------------------------------------------------------------
7
8 implicit none
9
10 type(infa_type), intent(inout) :: info
11
12 real :: xlat, xlon
13 integer :: n
14
15 if (trace_use) call da_trace_entry("da_llxy_kma_global_new")
16
17 !FAST
18
19 ! where (lat(:,:) - start_lat < 0)
20 ! y(:,:) = start_y + (lat(:,:) - start_lat+180.0)/delt_lat
21 ! else
22 ! y(:,:) = start_y + (lat(:,:) - start_lat)/delt_lat
23 ! end where
24
25 ! where (lon(:,:) - start_lon < 0.)
26 ! x(:,:) = start_x + (lon(:,:) - start_lon+360.0)/delt_lon
27 ! else
28 ! x(:,:) = start_x + (lon(:,:) - start_lon)/delt_lon
29 ! end where
30
31 ! SLOW
32
33 do n=lbound(info%lat,2),ubound(info%lat,2)
34 xlat = info%lat(1,n) - start_lat
35 xlon = info%lon(1,n) - start_lon
36 if (xlat < 0.0) xlat = xlat + 180.0
37 if (xlon < 0.0) xlon = xlon + 360.0
38 info%x(:,n) = start_x + xlon/delt_lon
39 info%y(:,n) = start_y + xlat/delt_lat
40 end do
41
42 if (trace_use) call da_trace_exit("da_llxy_kma_global_new")
43
44 end subroutine da_llxy_kma_global_new
45
46