NCEPLIBS-w3emc 2.12.0
Loading...
Searching...
No Matches
w3ft38.f
Go to the documentation of this file.
1C> @file
2C> @brief Computes 2.5 x 2.5 n. hemi. grid-scaler
3C> @author Ralph Jones @date 1993-07-23
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> 1993-07-23 | Ralph Jones | New version of w3ft08(), takes out w3fa12()
13C> makes pln 3 dimensions, pln is computed one time in main program, trades\
14C> memory for more speed. w3fa12() used 70% of cpu time.
15C>
16C> @param[in] FLN 961 complex coeff.
17C> @param[in] PLN (32,31,37) real space with legendre polynomials
18C> computed by w3fa12().
19C> @param[in] FL 31 complex space for fourier coeff.
20C> @param[in] WORK 144 real work space for subr. w3ft12()
21C> @param[in] TRIGS 216 precomputed trig funcs. Used
22C> in w3ft12(), computed by w3fa13()
23C> @param[out] GN (145,37) grid values. 5365 point grid is type 29 or 1d hex o.n. 84
24C>
25C> @note w3ft08() was optimized to run in a small amount of
26C> memory, it was not optimized for speed, 70 percent of the time was
27C> used by subroutine w3fa12() computing the legendre polynomials. Since
28C> the legendre polynomials are constant they need to be computed
29C> only once in a program. By moving w3fa12() to the main program and
30C> computing pln as a (32,31,37) array and changing this subroutine
31C> to use pln as a three dimension array the running time was cut
32C> 70 percent. Add following code to main program to compute eps, pln,
33C> trigs, and rcos one time in program.
34C> @code
35C> DOUBLE PRECISION EPS(992) (REAL ON CRAY)
36C> DOUBLE PRECISION COLRA (REAL ON CRAY)
37C>
38C> REAL PLN( 32, 31, 37 )
39C> REAL RCOS(37)
40C> REAL TRIGS(216)
41C>
42C> DATA PI /3.14159265/
43C>
44C> DRAD = 2.5 * PI / 180.0
45C> CALL W3FA11(EPS,30)
46C> CALL W3FA13(TRIGS,RCOS)
47C> DO LAT = 1,37
48C> COLRA = (LAT - 1) * DRAD
49C> CALL W3FA12 (PLN(1,1,LAT), COLRA, 30, EPS)
50C> END DO
51C> @endcode
52C>
53 SUBROUTINE w3ft38(FLN,GN,PLN,FL,WORK,TRIGS)
54C
55 COMPLEX FL( 31 )
56 COMPLEX FLN( 31 , 31 )
57C
58 REAL GN(145,37)
59 REAL PLN( 32, 31, 37 )
60 REAL TRIGS(216)
61 REAL WORK(144)
62C
63 SAVE
64C
65 DO 400 lat = 1,37
66 latn = 38 - lat
67C
68 DO 100 l = 1, 31
69 fl(l) = (0.,0.)
70 100 CONTINUE
71C
72 DO 300 l = 1, 31
73 DO 200 i = 1, 31
74 fl(l) = fl(l) + cmplx(pln(i,l,lat) * real(fln(i,l)) ,
75 & pln(i,l,lat) * aimag(fln(i,l)) )
76 200 CONTINUE
77C
78 300 CONTINUE
79C
80 CALL w3ft12(fl,work,gn(1,latn),trigs)
81C
82 400 CONTINUE
83C
84 RETURN
85 END
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
subroutine w3ft38(fln, gn, pln, fl, work, trigs)
Computes 2.5 x 2.5 n.
Definition w3ft38.f:54