da_llxy_merc.inc
References to this file elsewhere.
1 subroutine da_llxy_merc(lat, lon, proj, x, y)
2
3 !-----------------------------------------------------------------------
4 ! Purpose: Compute x,y coordinate from lat lon for mercator projection
5 !-----------------------------------------------------------------------
6
7 implicit none
8
9 real, intent(in) :: lat
10 real, intent(in) :: lon
11 type(proj_info),intent(in) :: proj
12 real,intent(out) :: x
13 real,intent(out) :: y
14 real :: deltalon
15
16 if (trace_use_frequent) call da_trace_entry("da_llxy_merc")
17
18 deltalon = lon - proj%lon1
19 if (deltalon < -180.0) deltalon = deltalon + 360.0
20 if (deltalon > 180.0) deltalon = deltalon - 360.0
21 x = 1.0 + (deltalon/(proj%dlon*deg_per_rad))
22 y = 1.0 + (ALOG(TAN(0.5*((lat + 90.0) * rad_per_deg)))) / &
23 proj%dlon - proj%rsw
24
25 if (trace_use_frequent) call da_trace_exit("da_llxy_merc")
26
27 end subroutine da_llxy_merc
28
29