<HTML> <BODY BGCOLOR=#ccccdd LINK=#0000aa VLINK=#0000ff ALINK=#ff0000 ><BASE TARGET="bottom_target"><PRE>
<A NAME='DA_LLXY_GLOBAL'><A href='../../html_code/tools/da_llxy_global.inc.html#DA_LLXY_GLOBAL' TARGET='top_target'><IMG SRC="../../gif/bar_red.gif" border=0></A>

subroutine da_llxy_global(lat,lon,x,y) 1,2

   !----------------------------------------------------------------------------
   ! Purpose:  calculates the(x,y) location(dot) in the global grids
   !           from latitudes and longitudes
   !----------------------------------------------------------------------------
   
   implicit none
   
   real, intent(in)  :: lat, lon
   real, intent(out) :: x, y

   real              :: xlat, xlon

   if (trace_use_frequent) call da_trace_entry("da_llxy_global")
   xlat = lat - start_lat
   xlon = lon - start_lon
   if (xlat &lt; 0.0) xlat = xlat + 180.0
   if (xlon &lt; 0.0) xlon = xlon + 360.0

   x = start_x + xlon/delt_lon
   y = start_y + xlat/delt_lat
   if((fg_format == fg_format_wrf_arw_global) .and. (lat.le.start_lat)) y = 1.0 

   if (trace_use_frequent) call da_trace_exit("da_llxy_global")
   
end subroutine da_llxy_global