1 subroutine da_llxy_global(lat,lon,x,y)
3 !----------------------------------------------------------------------------
4 ! Purpose: calculates the(x,y) location(dot) in the global grids
5 ! from latitudes and longitudes
6 !----------------------------------------------------------------------------
10 real, intent(in) :: lat, lon
11 real, intent(out) :: x, y
15 if (trace_use_frequent) call da_trace_entry("da_llxy_global")
16 xlat = lat - start_lat
17 xlon = lon - start_lon
18 if (xlat < 0.0) xlat = xlat + 180.0
19 if (xlon < 0.0) xlon = xlon + 360.0
21 x = start_x + xlon/delt_lon
22 y = start_y + xlat/delt_lat
23 if((fg_format == fg_format_wrf_arw_global) .and. (lat.le.start_lat)) y = 1.0
25 if (trace_use_frequent) call da_trace_exit("da_llxy_global")
27 end subroutine da_llxy_global