NCEPLIBS-w3emc 2.12.0
Loading...
Searching...
No Matches
w3ft08.f
Go to the documentation of this file.
1C> @file
2C> @brief Computes 2.5 x 2.5 n. hemi. grid-scaler.
3C> @author Joe Sela @date 1988-06-20
4
5C> Computes 2.5 x 2.5 n. hemi. grid of 145 x 37 points
6C> from spectral coefficients in a rhomboidal 30 resolution
7C> representing a scaler field.
8C>
9C> ### Program History Log:
10C> Date | Programmer | Comment
11C> -----|------------|--------
12C> 1988-06-20 | Joe Sela | Initial.
13C> 1988-06-20 | Ralph Jones | Change to microsoft fortran 4.10.
14C> 1990-06-12 | Ralph Jones | Change to sun fortran 1.3.
15C> 1991-03-30 | Ralph Jones | Convert to silicongraphics fortran.
16C> 1993-03-29 | Ralph Jones | Add save statement.
17C> 1993-07-22 | Ralph Jones | Change double precision to real for cray.
18C>
19C> @param[in] FLN 961 complex coeff.
20C> @param[in] PLN 992 real space for legendre polynomials.
21C> @param[in] EPS 992 real space for
22C> coeffs. used in computing pln.
23C> @param[in] FL 31 complex space for fourier coeff.
24C> @param[in] WORK 144 real work space for subr. w3ft12()
25C> @param[in] TRIGS 216 precomputed trig funcs. used
26C> in w3ft12(), computed by w3fa13()
27C> @param[out] GN (145,37) grid values. 5365 point grid is type 29 or
28C> 1d hex o.n. 84
29C>
30C> @note This subroutine was optimized to run in a small amount of
31C> memory, it is not optimized for speed, 70 percent of the time is
32C> used by subroutine w3fa12 computing the legendre polynomials. since
33C> the legendre polynomials are constant they need to be computed
34C> only once in a program. By moving w3fa12() to the main program and
35C> computing pln as a (32,31,37) array and changing this subroutine
36C> to use pln as a three dimension array you can cut the running time
37C> 70 percent. w3ft38() has these improvements.
38C>
39C> @author Joe Sela @date 1988-06-20
40 SUBROUTINE w3ft08(FLN,GN,PLN,EPS,FL,WORK,TRIGS)
41C
42 COMPLEX FL( 31 )
43 COMPLEX FLN( 31 , 31 )
44C
45 REAL COLRA
46 REAL EPS(992)
47 REAL GN(145,37)
48 REAL PLN( 32 , 31 )
49 REAL TRIGS(216)
50 REAL WORK(144)
51C
52 SAVE
53C
54 DATA pi /3.14159265/
55C
56 drad = 2.5 * pi / 180.0
57C
58 DO 400 lat = 1,37
59 latn = 38 - lat
60 colra = (lat - 1) * drad
61 CALL w3fa12(pln,colra, 30 ,eps)
62C
63 DO 100 l = 1, 31
64 fl(l) = (0.,0.)
65 100 CONTINUE
66C
67 DO 300 l = 1, 31
68 DO 200 i = 1, 31
69 fl(l) = fl(l) + cmplx(pln(i,l) * real(fln(i,l)) ,
70 & pln(i,l) * aimag(fln(i,l)) )
71 200 CONTINUE
72C
73 300 CONTINUE
74C
75 CALL w3ft12(fl,work,gn(1,latn),trigs)
76C
77 400 CONTINUE
78C
79 RETURN
80 END
subroutine w3fa12(pln, colrad, jcap, eps)
Subroutine computes legendre polynomials at a given latitude.
Definition w3fa12.f:21
subroutine w3ft08(fln, gn, pln, eps, fl, work, trigs)
Computes 2.5 x 2.5 n.
Definition w3ft08.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