NCEPLIBS-w3emc  2.11.0
w3fi18.f
Go to the documentation of this file.
1 C> @file
2 C> @brief NMC octagon boundary finding subroutine.
3 C> @author James Howcroft @date 1973-10-15
4 
5 C> Relates the I,J coordinate point in a 65x65 grid-point
6 C> array as being either inside, outside, or on the boundary of the
7 C> NMC octagon centered in the 65x65 array.
8 C>
9 C> Program history log:
10 C> - James Howcroft 1973-10-15
11 C> - Ralph Jones 1984-07-02 Convert to fortran 77.
12 C> - Ralph Jones 1989-02-02 Convert to microsoft fortran 4.10.
13 C> - Ralph Jones 1990-06-12 Convert to sun fortran 1.3.
14 C> - Ralph Jones 1991-03-16 Convert to silicongraphics 3.3 fortran 77.
15 C> - Ralph Jones 1993-03-29 Add save statement.
16 C>
17 C> @param[in] I Coordinate identification of a point in the 65x65 array.
18 C> @param[in] J Coordinate identification of a point in the 65x65 array.
19 C> @param[out] NW Integer return code.
20 C>
21 C> Exit states:
22 C> - NW = -1 Point is outside the octagon.
23 C> - NW = 0 Point is on the octagon boundary.
24 C> - NW = +1 Point is inside the octagon.
25 C>
26 C> @author James Howcroft @date 1973-10-15
27  SUBROUTINE w3fi18(I,J,NW)
28 C
29  SAVE
30 C
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
39 C
40  10 CONTINUE
41  nw = -1
42  RETURN
43 C
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