1 subroutine da_llxy_global_new(info)
3 !----------------------------------------------------------------------------
4 ! Purpose: calculates the(x,y) location(dot) in the global grids
5 ! from latitudes and longitudes
6 !----------------------------------------------------------------------------
10 type(infa_type), intent(inout) :: info
15 if (trace_use) call da_trace_entry("da_llxy_global_new")
19 ! where (lat(:,:) - start_lat < 0)
20 ! y(:,:) = start_y + (lat(:,:) - start_lat+180.0)/delt_lat
22 ! y(:,:) = start_y + (lat(:,:) - start_lat)/delt_lat
25 ! where (lon(:,:) - start_lon < 0.)
26 ! x(:,:) = start_x + (lon(:,:) - start_lon+360.0)/delt_lon
28 ! x(:,:) = start_x + (lon(:,:) - start_lon)/delt_lon
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 if((fg_format == fg_format_wrf_arw_global) .and. (info%lat(1,n).le.start_lat)) info%y(:,n) = 1.0
43 if (trace_use) call da_trace_exit("da_llxy_global_new")
45 end subroutine da_llxy_global_new