NCEPLIBS-w3emc 2.12.0
Loading...
Searching...
No Matches
w3fb03.f
Go to the documentation of this file.
1C> @file
2C> @brief Convert i,j grid coordinates to lat/lon.
3C> @author Ralph Jones @date 1986-07-17
4
5C> Converts i,j grid coordinates to the corresponding
6C> latitude/longitude on a southern hemisphere polar stereographic
7C> map projection.
8C>
9C> Program history log.
10C> - Ralph Jones 1986-07-17 Convert to fortran 77.
11C> - Ralph Jones 1990-08-31 Convert to cray cft77 fortran.
12C>
13C> @param[in] XI Real i coordinate.
14C> @param[in] XJ Real j coordinate.
15C> @param[in] XMESHL Real grid interval in km.
16C> @param[out] TLAT Real s.h. latitude.
17C> @param[out] TLONG Real longitude.
18C>
19C> @author Ralph Jones @date 1986-07-17
20 SUBROUTINE w3fb03(XI, XJ, XMESHL, TLAT, TLONG)
21C
22C ...GIVEN ... XI/XJ GRID COORDINATES OF A POINT RELATIVE
23C ... TO (0,0) AT SOUTH POLE
24C ...TO COMPUTE TLAT,TLONG ON THE SRN HEMI POLAR STEREO PROJECTION
25C ...WITH 80W VERTICAL AT TOP OF THE MAP
26C
27 DATA degprd/57.2957795/
28 DATA earthr/6371.2/
29C
30 re = (earthr * 1.86603) / xmeshl
31 gi2 = re * re
32C
33C ...WHERE GI2 IS THE SQUARE OF DISTANCE IN GRID INTERVALS
34C ... FROM POLE TO EQUATOR...
35C
36 r2 = xi * xi + xj * xj
37 IF (r2 .NE. 0.0) THEN
38C
39 xlong = degprd * atan2(xj,xi)
40 tlong = xlong - 10.0
41 IF (tlong .LT. 0.0) tlong = tlong + 360.0
42 tlat = asin((gi2 - r2)/(gi2 + r2)) * degprd
43 tlat = -tlat
44C
45 ELSE
46 tlat = -90.0
47C
48C ...FOR SOUTH POLE...
49C
50 tlong = 0.0
51 ENDIF
52C
53 RETURN
54 END
subroutine w3fb03(xi, xj, xmeshl, tlat, tlong)
Converts i,j grid coordinates to the corresponding latitude/longitude on a southern hemisphere polar ...
Definition w3fb03.f:21