da_ijll_merc.inc

References to this file elsewhere.
1 subroutine da_ijll_merc(i, j, proj, lat, lon)
2 
3    !-----------------------------------------------------------------------
4    ! Compute the lat/lon from i/j for mercator projection
5    !-----------------------------------------------------------------------
6 
7    implicit none
8 
9    real,intent(in)               :: i
10    real,intent(in)               :: j    
11    type(proj_info),intent(in)    :: proj
12    real, intent(out)             :: lat
13    real, intent(out)             :: lon 
14 
15    lat = 2.0*ATAN(EXP(proj%dlon*(proj%rsw + j-1.)))*deg_per_rad - 90.0
16    lon = (i-1.)*proj%dlon*deg_per_rad + proj%lon1
17    if (lon > 180.0) lon = lon - 360.0
18    if (lon < -180.0) lon = lon + 360.0
19 
20 end subroutine da_ijll_merc
21 
22