NCEPLIBS-w3emc 2.12.0
Loading...
Searching...
No Matches
w3fm08.f
Go to the documentation of this file.
1C> @file
2C> @brief Nine point smoother/desmoother.
3C> @author J. Howcroft @date 1971-02-01
4
5C> Nine point smoother/desmoother. Smoother pass uses an
6C> equivalent linear smoother with stencil (.25 .5 .25) and the
7C> desmoother uses stencil (-.25 1.5 -.25). Two grid interval waves
8C> are annihilated, four grid interval waves have a .75 response.
9C>
10C> Program history log:
11C> - J. Howcroft 1971-02-01
12C> - Ralph Jones 1984-07-01 Change to ibm vs fortran.
13C> - Ralph Jones 1994-07-27 Change to cray cft77 fortran.
14C>
15C> @param[inout] A
16C> - [in] Real size (li,lj) array to hold field to be smoothed.
17C> - [out] Array holding smoothed field.
18C> @param[in] Z - Real size (li,lj) work area.
19C> @param[in] LI - Integer number of columns.
20C> @param[in] LJ - Integer number of rows.
21C>
22C> @author J. Howcroft @date 1971-02-01
23 SUBROUTINE w3fm08 (A,Z,LI,LJ)
24C
25 REAL A(LI,LJ)
26 REAL Z(LI,LJ)
27C
28 SAVE
29C
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