NCEPLIBS-w3emc  2.11.0
w3ft09.f
Go to the documentation of this file.
1 C> @file
2 C> @brief Computes 2.5x2.5 n. hemi. grid-vector
3 C> @author Joe Sela @date 1980-10-21
4 
5 C> Computes 2.5 x 2.5 n. hemi. grid of 145 x 37 points
6 C> from spectral coefficients in a rhomboidal 30 resolution
7 C> representing a vector field.
8 C>
9 C> ### Program History Log:
10 C> Date | Programmer | Comment
11 C> -----|------------|--------
12 C> 1980-10-21 | JOE SELA | Initial.
13 C> 1981-06-15 | Ralph Jones | Add doc block, clean up source.
14 C> 1989-01-25 | Ralph Jones | Change to microsoft fortran 4.10.
15 C> 1990-06-12 | Ralph Jones | Change to sun fortran 1.3.
16 C> 1991-03-30 | Ralph Jones | Convert to silicongraphics fortran.
17 C> 1993-03-29 | Ralph Jones | Add save statement.
18 C> 1993-07-22 | Ralph Jones | Change double precision to real for cray.
19 C>
20 C> @param[in] VLN 992 complex coeff.
21 C> @param[in] PLN 992 space for legendre polynomials.
22 C> @param[in] EPS 992 real space for coeffs. used in computing pln.
23 C> @param[in] FL 31 complex space for fourier coeff.
24 C> @param[in] WORK 144 work space for subr. w3ft12
25 C> @param[in] TRIGS 216 precomputed trig funcs. Used in w3ft12(), computed by w3fa13()
26 C> @param[in] RCOS 37 reciprocal cosine latitudes of 2.5 x 2.5 grid must be
27 C> computed before first call to w3ft11() using sr w3fa13.
28 C> @param[out] GN (145,37) grid values. 5365 point grid is type 29 or 1d o.n. 84
29 C>
30 C> @note This subroutine was optimized to run in a small amount of
31 C> memory, it is not optimized for speed, 70 percent of the time is
32 C> used by subroutine w3fa12() computing the legendre polynomials. since
33 C> the legendre polynomials are constant they need to be computed
34 C> only once in a program. By moving w3fa12() to the main program and
35 C> computing pln as a (32,31,37) array and changing this subroutine
36 C> to use pln as a three dimension array you can cut the running time
37 C> 70 percent.
38 C>
39 C> @author Joe Sela @date 1980-10-21
40  SUBROUTINE w3ft09(VLN,GN,PLN,EPS,FL,WORK,TRIGS,RCOS)
41 C
42  COMPLEX FL( 31 )
43  COMPLEX VLN( 32 , 31 )
44 C
45  REAL COLRA
46  REAL EPS(992)
47  REAL GN(145,37)
48  REAL PLN( 32 , 31 )
49  REAL RCOS(37)
50  REAL TRIGS(216)
51  REAL WORK(144)
52 C
53  SAVE
54 C
55  DATA pi /3.14159265/
56 C
57  drad = 2.5 * pi / 180.0
58 C
59  DO 400 lat = 2,37
60  latn = 38 - lat
61  colra = (lat - 1) * drad
62  CALL w3fa12(pln,colra, 30 ,eps)
63 C
64  DO 100 l = 1, 31
65  fl(l) = (0.,0.)
66  100 CONTINUE
67 C
68  DO 300 l = 1, 31
69 C
70  DO 200 i = 1, 32
71  fl(l) = fl(l) + cmplx(pln(i,l) * real(vln(i,l)),
72  & pln(i,l) * aimag(vln(i,l)) )
73  200 CONTINUE
74 C
75  fl(l)=cmplx(real(fl(l))*rcos(lat),aimag(fl(l))*rcos(lat))
76  300 CONTINUE
77 C
78  CALL w3ft12(fl,work,gn(1,latn),trigs)
79 C
80  400 CONTINUE
81 C
82 C*** POLE ROW=CLOSEST LATITUDE ROW
83 C
84  DO 500 i = 1,145
85  gn(i,37) = gn(i,36)
86  500 CONTINUE
87 C
88  RETURN
89  END
subroutine w3ft09(VLN, GN, PLN, EPS, FL, WORK, TRIGS, RCOS)
Computes 2.5 x 2.5 n.
Definition: w3ft09.f:41
subroutine w3ft12(COEF, WORK, GRID, TRIGS)
Fast fourier to compute 145 grid values at desired latitude from 31 complex fourier coefficients.
Definition: w3ft12.f:25