NCEPLIBS-w3emc 2.12.0
Loading...
Searching...
No Matches
w3fb01.f
Go to the documentation of this file.
1C> @file
2C> @brief I,J TO LATITUDE, LONGITUDE
3C> @author A. Heermann @date 1969-08-01
4
5C> Converts the coordinates of a location from the grid(i,j)
6C> coordinate system overlaid on the polar stereographic map pro-
7C> jection true at 60 n to the natural coordinate system of latitude
8C> /longitude on the Earth. A preferable more flexible subroutine to
9C> use is w3fb05(). w3fb01() is the reverse of w3fb00().
10C>
11C> PROGRAM HISTORY LOG:
12C> - A. Heermann 1969-08-01 A. HEERMANN
13C> - Ralph Jones 1990-08-31 Change to cray cft77 fortran.
14C>
15C> @param[in] XI I of the point relative to north pole.
16C> @param[in] XJ J of the point relative to north pole.
17C> @param[in] XMESHL Mesh length of grid in kilometers at 60n.
18C> @param[out] ALAT Latitude in deg. (-20.0(s. hemis) < alat < 90.0).
19C> @param[out] ALONG West longitude in degrees.
20C>
21C> @note The grid used in this subroutine has its origin (i=0,j=0)
22C> at the north pole, so if the user's grid has its origin at a
23C> point other than the north pole, a translation is required to
24C> get i and j for input into w3fb01(). The subroutine grid is
25C> oriented so that longitude 80w is parallel to gridlines of
26C> i=constant. The Earth's radius is taken to be 6371.2 km.
27C> All parameters in the call statement must be real.
28C>
29C> @author A. Heermann @date 1969-08-01
30 SUBROUTINE w3fb01(XI,XJ,XMESHL,ALAT,ALONG)
31C
32 DATA degprd/57.2957795/
33 DATA earthr/6371.2/
34C
35 gi2 = (1.86603 * earthr) / xmeshl
36 gi2 = gi2 * gi2
37 r2 = xi * xi + xj * xj
38 IF (r2.NE.0.0) GO TO 100
39 along = 0.0
40 alat = 90.0
41 RETURN
42C
43100 CONTINUE
44 alat = asin((gi2-r2) / (gi2+r2)) * degprd
45 xlong = degprd * atan2(xj,xi)
46 IF (xlong) 200,300,300
47C
48200 CONTINUE
49 along = -10.0 - xlong
50 IF (along.LT.0.0) along = along + 360.0
51 GO TO 400
52C
53300 CONTINUE
54 along = 350.0 - xlong
55C
56400 CONTINUE
57 RETURN
58 END
subroutine w3fb01(xi, xj, xmeshl, alat, along)
Converts the coordinates of a location from the grid(i,j) coordinate system overlaid on the polar ste...
Definition w3fb01.f:31