da_global_ll_to_xy.inc

References to this file elsewhere.
1 subroutine da_global_ll_to_xy(lat,lon,x,y)
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    real, intent(in)  :: lat, lon
11    real, intent(out) :: x, y
12 
13    real              :: xlat, xlon
14    
15    xlat = lat - start_lat
16    xlon = lon - start_lon
17 
18    if (xlat < 0.0) xlat = xlat + 180.0
19    if (xlon < 0.0) xlon = xlon + 360.0
20 
21    x = start_x + xlon/delt_lon
22    y = start_y + xlat/delt_lat
23    
24 end subroutine da_global_ll_to_xy
25 
26