NCEPLIBS-sp  2.5.0
sptranf0.f
Go to the documentation of this file.
1 C> @file
2 C> @brief Sptranf spectral initialization.
3 C> @author IREDELL @date 96-02-29
4 
5 C> This subprogram performs an initialization for
6 C> subprogram sptranf(). Use this subprogram outside
7 C> the sptranf() family context at your own risk.
8 C>
9 C> @param IROMB spectral domain shape
10 c> (0 for triangular, 1 for rhomboidal)
11 C> @param MAXWV spectral truncation
12 C> @param IDRT grid identifier
13 C> - IDRT=4 for Gaussian grid,
14 C> - IDRT=0 for equally-spaced grid including poles,
15 C> - IDRT=256 for equally-spaced grid excluding poles
16 C> @param IMAX even number of longitudes
17 C> @param JMAX number of latitudes
18 C> @param JB latitude index (from pole) to begin transform
19 C> @param JE latitude index (from pole) to end transform
20 C> @param EPS
21 C> @param EPSTOP
22 C> @param ENN1
23 C> @param ELONN1
24 C> @param EON
25 C> @param EONTOP
26 C> @param AFFT auxiliary array if IDIR=0
27 C> @param CLAT cosines of latitude
28 C> @param SLAT sines of latitude
29 C> @param WLAT Gaussian weights
30 C> @param PLN Legendre polynomials
31 C> @param PLNTOP Legendre polynomial over top
32 C>
33 C> @author IREDELL @date 96-02-29
34  SUBROUTINE sptranf0(IROMB,MAXWV,IDRT,IMAX,JMAX,JB,JE,
35  & EPS,EPSTOP,ENN1,ELONN1,EON,EONTOP,
36  & AFFT,CLAT,SLAT,WLAT,PLN,PLNTOP)
37 
38  REAL EPS((MAXWV+1)*((IROMB+1)*MAXWV+2)/2),EPSTOP(MAXWV+1)
39  REAL ENN1((MAXWV+1)*((IROMB+1)*MAXWV+2)/2)
40  REAL ELONN1((MAXWV+1)*((IROMB+1)*MAXWV+2)/2)
41  REAL EON((MAXWV+1)*((IROMB+1)*MAXWV+2)/2),EONTOP(MAXWV+1)
42  REAL(8) AFFT(50000+4*IMAX)
43  REAL CLAT(JB:JE),SLAT(JB:JE),WLAT(JB:JE)
44  REAL PLN((MAXWV+1)*((IROMB+1)*MAXWV+2)/2,JB:JE)
45  REAL PLNTOP(MAXWV+1,JB:JE)
46  REAL SLATX(JMAX),WLATX(JMAX)
47 
48  CALL spwget(iromb,maxwv,eps,epstop,enn1,elonn1,eon,eontop)
49  CALL spffte(imax,(imax+2)/2,imax,2,0.,0.,0,afft)
50  CALL splat(idrt,jmax,slatx,wlatx)
51  jhe=(jmax+1)/2
52  IF(jhe.GT.jmax/2) wlatx(jhe)=wlatx(jhe)/2
53  DO j=jb,je
54  clat(j)=sqrt(1.-slatx(j)**2)
55  slat(j)=slatx(j)
56  wlat(j)=wlatx(j)
57  ENDDO
58 C$OMP PARALLEL DO
59  DO j=jb,je
60  CALL splegend(iromb,maxwv,slat(j),clat(j),eps,epstop,
61  & pln(1,j),plntop(1,j))
62  ENDDO
63 
64  END
subroutine spffte(IMAX, INCW, INCG, KMAX, W, G, IDIR, AFFT)
This subprogram performs multiple fast Fourier transforms between complex amplitudes in Fourier space...
Definition: spffte.f:49
subroutine splat(IDRT, JMAX, SLAT, WLAT)
Computes cosines of colatitude and Gaussian weights for one of the following specific global sets of ...
Definition: splat.F:46
subroutine splegend(I, M, SLAT, CLAT, EPS, EPSTOP, PLN, PLNTOP)
Evaluates the orthonormal associated Legendre polynomials in the spectral domain at a given latitude.
Definition: splegend.f:45
subroutine sptranf0(IROMB, MAXWV, IDRT, IMAX, JMAX, JB, JE, EPS, EPSTOP, ENN1, ELONN1, EON, EONTOP, AFFT, CLAT, SLAT, WLAT, PLN, PLNTOP)
This subprogram performs an initialization for subprogram sptranf().
Definition: sptranf0.f:37
subroutine spwget(IROMB, MAXWV, EPS, EPSTOP, ENN1, ELONN1, EON, EONTOP)
This subprogram gets wave-space constants.
Definition: spwget.f:18