NCEPLIBS-w3emc  2.11.0
w3fb00.f
Go to the documentation of this file.
1 C> @file
2 C> @brief Convert latitude, longitude to i,j
3 C> @author A. Heermann @date 1969-08-01
4 
5 C> Converts the coordinates of a location on earth from the
6 C> natural coordinate system of latitude/longitude to the grid (i,j)
7 C> coordinate system overlaid on the polar stereographic map pro-
8 C> jection true at 60 n. a preferable, more flexible subroutine to
9 C> use is w3fb04(). w3fb00() is the reverse of w3fb01().
10 C>
11 C> Program history log:
12 C> - A. Heermann 1969-08-01
13 C> - Ralph Jones 1990-08-31 Convert to cray cft77 fortran
14 C>
15 C> @param[in] ALAT Latitude in deg. (-20.0 (s. hemis)) alat) 90.0).
16 C> @param[in] ALONG West longitude in degrees.
17 C> @param[in] XMESHL Mesh length of grid in kilometers at 60n.
18 C> @param[out] XI I of the point relative to north pole.
19 C> @param[out] XJ J of the point relative to north pole.
20 C>
21 C> @note The grid used in this subroutine has its origin (i=0,j=0)
22 C> at the north pole, so if the user's grid has its origin at a
23 C> point other than the north pole, a translation is required to
24 C> get i and j. The subroutine grid is oriented so that longitude
25 C> 80w is parallel to the gridlines of i=constant. The radius of
26 C> the earth is taken to be 6371.2 km. All parameters in the call statement
27 C> must be real this code will not vectorize on a cray. You will have put
28 C> it line to vectorize it.
29 C>
30 C> @author A. Heermann @date 1969-08-01
31  SUBROUTINE w3fb00(ALAT,ALONG,XMESHL,XI,XJ)
32 C
33  DATA radpd /.01745329/
34  DATA earthr/6371.2/
35 C
36  re = (earthr * 1.86603) / xmeshl
37  xlat = alat * radpd
38  sinl = sin(xlat)
39  wlong = (along + 100.0) * radpd
40  r = (re * cos(xlat)) / (1. + sinl)
41  xi = r * sin(wlong)
42  xj = r * cos(wlong)
43  RETURN
44  END
subroutine w3fb00(ALAT, ALONG, XMESHL, XI, XJ)
Converts the coordinates of a location on earth from the natural coordinate system of latitude/longit...
Definition: w3fb00.f:32