UPP v11.0.0
Loading...
Searching...
No Matches
MSFPS.f
Go to the documentation of this file.
1
16 SUBROUTINE msfps(LAT,TRUELAT1,MSF)
17
18
19! Computes the map scale factor for a Polar Stereographic grid at a given
20! latitude.
21
22 IMPLICIT NONE
23
24! Define some private constants
25!
26 REAL, PARAMETER :: pi = 3.1415927
27 REAL, PARAMETER :: rad_per_deg = pi / 180.
28
29 REAL, INTENT(IN) :: lat ! latitude where msf is requested
30 REAL, INTENT(IN) :: truelat1
31 REAL, INTENT(OUT) :: msf
32
33 REAL :: psi1, psix, pole
34
35 IF (truelat1 >= 0.) THEN
36 psi1 = (90. - truelat1) * rad_per_deg
37 pole =90.
38 ELSE
39 psi1 = (90. + truelat1) * rad_per_deg
40 pole = -90.
41 ENDIF
42
43 psix = (pole - lat)*rad_per_deg
44 msf = ((1.+cos(psi1))/(1.0 + cos(psix)))
45 RETURN
46
47 END SUBROUTINE msfps
48