NCEPLIBS-w3emc 2.12.0
Loading...
Searching...
No Matches
w3fb02.f
Go to the documentation of this file.
1C> @file
2C> @brief COnvert s. hemisphere lat/lon to i and j.
3C> @author Ralph Jones @date 1985-09-13
4
5C> Computes i and j coordinates for a latitude/longitude
6C> point on the southern hemisphere polar stereographic map
7C> projection.
8C>
9C> Program history log:
10C> - Ralph Jones 1985-09-13 Convert to fortran 77.
11C> - Ralph Jones 1990-08-31 Convert to cray cft77 fortran.
12C>
13C> @param[in] ALAT Real*4 latitude (s.h. latitudes are negative)
14C> @param[in] ALONG Real*4 west longitude.
15C> @param[in] XMESHL Real*4 grid interval in km.
16C> @param[out] XI Real*4 i coordinate.
17C> @param[out] XJ Real*4 j coordinate.
18C>
19C> @author Ralph Jones @date 1985-09-13
20 SUBROUTINE w3fb02(ALAT, ALONG, XMESHL, XI, XJ)
21C
22C ...GIVEN ... ALAT SRN HEMI LATS ARE NEGATIVE VALUED
23C ALONG IN DEGREES WEST LONGITUDE
24C XMESHL= GRID INTERVAL IN KM, E.G., 381.0 KM
25C ...TO COMPUTE XI,XJ FOR A PT ON THE SRN HEMI POLAR STEREOGRAPHIC
26C ... PROJECTION, WITH 80W LONGITUDE VERTICAL AT THE TOP OF MAP,
27C ... AND 100E LONGITUDE VERTICAL AT THE BOTTOM OF THE MAP.
28C ...THE RESULTING XI AND XJ ARE RELATIVE TO (0,0) AT SOUTH POLE.
29C
30 DATA addlng/80.0/
31C
32C ...WHICH IS DIFFERENCE BETWEEN 180 DEGREES AND VERTICAL MERIDIAN.
33C ... THE VERTICAL BEING 100 WEST AFTER CHANGING THE SENSE
34C
35 DATA tiny /0.00001/
36 DATA earthr/6371.2/
37 DATA convt /0.017453293/
38C
39C ...WHICH CONVERTS DEGREES TO RADIANS
40C
41 re = (earthr * 1.86603) / xmeshl
42C
43C ...WHICH IS DISTANCE IN GRID INTERVALS FROM POLE TO EQUATOR
44C
45 xlat = -alat * convt
46C
47C ...WHERE NEGATIVE ALATS WERE GIVEN FOR SRN HEMI
48C
49 wlong = 360.0 - along
50 wlong = (wlong + addlng) * convt
51 r = (re * cos(xlat))/(1.0 + sin(xlat))
52 xi = r * sin(wlong)
53 IF (abs(xi) .LT. tiny) xi = 0.0
54 xj = r * cos(wlong)
55 IF (abs(xj) .LT. tiny) xj = 0.0
56 RETURN
57 END
subroutine w3fb02(alat, along, xmeshl, xi, xj)
Computes i and j coordinates for a latitude/longitude point on the southern hemisphere polar stereogr...
Definition w3fb02.f:21