1 subroutine da_xyll_merc(x, y, proj, lat, lon)
3 !-----------------------------------------------------------------------
4 ! Compute the lat/lon from i/j for mercator projection
5 !-----------------------------------------------------------------------
11 type(proj_info),intent(in) :: proj
12 real, intent(out) :: lat
13 real, intent(out) :: lon
15 if (trace_use_frequent) call da_trace_entry("da_xyll_merc")
17 lat = 2.0*ATAN(EXP(proj%dlon*(proj%rsw + y-1.0)))*deg_per_rad - 90.0
18 lon = (x-1.0)*proj%dlon*deg_per_rad + proj%lon1
19 if (lon > 180.0) lon = lon - 360.0
20 if (lon < -180.0) lon = lon + 360.0
22 if (trace_use_frequent) call da_trace_exit("da_xyll_merc")
24 end subroutine da_xyll_merc