NCEPLIBS-w3emc  2.11.0
w3fm08.f
Go to the documentation of this file.
1 C> @file
2 C> @brief Nine point smoother/desmoother.
3 C> @author J. Howcroft @date 1971-02-01
4 
5 C> Nine point smoother/desmoother. Smoother pass uses an
6 C> equivalent linear smoother with stencil (.25 .5 .25) and the
7 C> desmoother uses stencil (-.25 1.5 -.25). Two grid interval waves
8 C> are annihilated, four grid interval waves have a .75 response.
9 C>
10 C> Program history log:
11 C> - J. Howcroft 1971-02-01
12 C> - Ralph Jones 1984-07-01 Change to ibm vs fortran.
13 C> - Ralph Jones 1994-07-27 Change to cray cft77 fortran.
14 C>
15 C> @param[inout] A
16 C> - [in] Real size (li,lj) array to hold field to be smoothed.
17 C> - [out] Array holding smoothed field.
18 C> @param[in] Z - Real size (li,lj) work area.
19 C> @param[in] LI - Integer number of columns.
20 C> @param[in] LJ - Integer number of rows.
21 C>
22 C> @author J. Howcroft @date 1971-02-01
23  SUBROUTINE w3fm08 (A,Z,LI,LJ)
24 C
25  REAL A(LI,LJ)
26  REAL Z(LI,LJ)
27 C
28  SAVE
29 C
30  li1 = li - 1
31  lj1 = lj - 1
32  DO 1 j=2,lj1
33  DO 1 i=2,li1
34  crux = a(i-1,j-1) + a(i+1,j-1) + a(i+1,j+1) + a(i-1,j+1)
35  plus = a(i,j-1) + a(i,j+1) + a(i-1,j) + a(i+1,j)
36  z(i,j) = 0.25 * a(i,j) + .125 * plus + .0625 * crux
37  1 CONTINUE
38  DO 2 i=1,li
39  z(i,1) = a(i,1)
40  z(i,lj) = a(i,lj)
41  2 CONTINUE
42  DO 3 j=1,lj
43  z(1,j) = a(1,j)
44  z(li,j) = a(li,j)
45  3 CONTINUE
46  DO 4 j=2,lj1
47  DO 4 i=2,li1
48  crux = z(i-1,j-1) + z(i+1,j-1) + z(i+1,j+1) + z(i-1,j+1)
49  plus = z(i,j-1) + z(i,j+1) + z(i-1,j) + z(i+1,j)
50  a(i,j) = 2.25 * z(i,j) - .375 * plus + .0625 * crux
51  4 CONTINUE
52  RETURN
53  END
subroutine w3fm08(A, Z, LI, LJ)
Nine point smoother/desmoother.
Definition: w3fm08.f:24