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