NCEPLIBS-w3emc 2.12.0
Loading...
Searching...
No Matches
w3fi18.f
Go to the documentation of this file.
1C> @file
2C> @brief NMC octagon boundary finding subroutine.
3C> @author James Howcroft @date 1973-10-15
4
5C> Relates the I,J coordinate point in a 65x65 grid-point
6C> array as being either inside, outside, or on the boundary of the
7C> NMC octagon centered in the 65x65 array.
8C>
9C> Program history log:
10C> - James Howcroft 1973-10-15
11C> - Ralph Jones 1984-07-02 Convert to fortran 77.
12C> - Ralph Jones 1989-02-02 Convert to microsoft fortran 4.10.
13C> - Ralph Jones 1990-06-12 Convert to sun fortran 1.3.
14C> - Ralph Jones 1991-03-16 Convert to silicongraphics 3.3 fortran 77.
15C> - Ralph Jones 1993-03-29 Add save statement.
16C>
17C> @param[in] I Coordinate identification of a point in the 65x65 array.
18C> @param[in] J Coordinate identification of a point in the 65x65 array.
19C> @param[out] NW Integer return code.
20C>
21C> Exit states:
22C> - NW = -1 Point is outside the octagon.
23C> - NW = 0 Point is on the octagon boundary.
24C> - NW = +1 Point is inside the octagon.
25C>
26C> @author James Howcroft @date 1973-10-15
27 SUBROUTINE w3fi18(I,J,NW)
28C
29 SAVE
30C
31 k = i + j
32 m = i - j
33 IF (i.LT.10.OR.i.GT.56.OR.j.LT.8.OR.j.GT.58) GO TO 10
34 IF (k.LT.32.OR.k.GT.100.OR.m.LT.-34.OR.m.GT.34) GO TO 10
35 IF (i.EQ.10.OR.i.EQ.56.OR.j.EQ.8.OR.j.EQ.58) GO TO 20
36 IF (k.EQ.32.OR.k.EQ.100.OR.m.EQ.-34.OR.m.EQ.34) GO TO 20
37 nw = 1
38 RETURN
39C
40 10 CONTINUE
41 nw = -1
42 RETURN
43C
44 20 CONTINUE
45 nw = 0
46 RETURN
47 END
subroutine w3fi18(i, j, nw)
Relates the I,J coordinate point in a 65x65 grid-point array as being either inside,...
Definition w3fi18.f:28