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