NCEPLIBS-sp  2.3.3
sptranf0.f
Go to the documentation of this file.
1 C> @file
2 C>
3 C> Sptranf spectral initialization
4 C> @author IREDELL @date 96-02-29
5 
6 C> This subprogram performs an initialization for
7 C> subprogram sptranf(). Use this subprogram outside
8 C> the sptranf family context at your own risk.
9 C>
10 C> @param IROMB - INTEGER SPECTRAL DOMAIN SHAPE
11 C> (0 FOR TRIANGULAR, 1 FOR RHOMBOIDAL)
12 C> @param MAXWV - INTEGER SPECTRAL TRUNCATION
13 C> @param IDRT - INTEGER GRID IDENTIFIER
14 C> (IDRT=4 FOR GAUSSIAN GRID,
15 C> IDRT=0 FOR EQUALLY-SPACED GRID INCLUDING POLES,
16 C> IDRT=256 FOR EQUALLY-SPACED GRID EXCLUDING POLES)
17 C> @param IMAX - INTEGER EVEN NUMBER OF LONGITUDES
18 C> @param JMAX - INTEGER NUMBER OF LATITUDES
19 C> @param JB - INTEGER LATITUDE INDEX (FROM POLE) TO BEGIN TRANSFORM
20 C> @param JE - INTEGER LATITUDE INDEX (FROM POLE) TO END TRANSFORM
21 C> @param EPS - REAL ((MAXWV+1)*((IROMB+1)*MAXWV+2)/2)
22 C> @param EPSTOP - REAL (MAXWV+1)
23 C> @param ENN1 - REAL ((MAXWV+1)*((IROMB+1)*MAXWV+2)/2)
24 C> @param ELONN1 - REAL ((MAXWV+1)*((IROMB+1)*MAXWV+2)/2)
25 C> @param EON - REAL ((MAXWV+1)*((IROMB+1)*MAXWV+2)/2)
26 C> @param EONTOP - REAL (MAXWV+1)
27 C> @param AFFT - REAL(8) (50000+4*IMAX) AUXILIARY ARRAY IF IDIR=0
28 C> @param CLAT - REAL (JB:JE) COSINES OF LATITUDE
29 C> @param SLAT - REAL (JB:JE) SINES OF LATITUDE
30 C> @param WLAT - REAL (JB:JE) GAUSSIAN WEIGHTS
31 C> @param PLN - REAL ((MAXWV+1)*((IROMB+1)*MAXWV+2)/2,JB:JE)
32 C> LEGENDRE POLYNOMIALS
33 C> @param PLNTOP - REAL (MAXWV+1,JB:JE) LEGENDRE POLYNOMIAL OVER TOP
34 C>
35 C> SUBPROGRAMS CALLED:
36 C> - spwget() GET WAVE-SPACE CONSTANTS
37 C> - spffte() PERFORM FAST FOURIER TRANSFORM
38 C> - splat() COMPUTE LATITUDE FUNCTIONS
39 C> - splegend() COMPUTE LEGENDRE POLYNOMIALS
40 C>
41  SUBROUTINE sptranf0(IROMB,MAXWV,IDRT,IMAX,JMAX,JB,JE,
42  & EPS,EPSTOP,ENN1,ELONN1,EON,EONTOP,
43  & AFFT,CLAT,SLAT,WLAT,PLN,PLNTOP)
44 
45  REAL EPS((MAXWV+1)*((IROMB+1)*MAXWV+2)/2),EPSTOP(MAXWV+1)
46  REAL ENN1((MAXWV+1)*((IROMB+1)*MAXWV+2)/2)
47  REAL ELONN1((MAXWV+1)*((IROMB+1)*MAXWV+2)/2)
48  REAL EON((MAXWV+1)*((IROMB+1)*MAXWV+2)/2),EONTOP(MAXWV+1)
49  REAL(8) AFFT(50000+4*IMAX)
50  REAL CLAT(JB:JE),SLAT(JB:JE),WLAT(JB:JE)
51  REAL PLN((MAXWV+1)*((IROMB+1)*MAXWV+2)/2,JB:JE)
52  REAL PLNTOP(MAXWV+1,JB:JE)
53  REAL SLATX(JMAX),WLATX(JMAX)
54 C - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
55  CALL spwget(iromb,maxwv,eps,epstop,enn1,elonn1,eon,eontop)
56  CALL spffte(imax,(imax+2)/2,imax,2,0.,0.,0,afft)
57  CALL splat(idrt,jmax,slatx,wlatx)
58  jhe=(jmax+1)/2
59  IF(jhe.GT.jmax/2) wlatx(jhe)=wlatx(jhe)/2
60  DO j=jb,je
61  clat(j)=sqrt(1.-slatx(j)**2)
62  slat(j)=slatx(j)
63  wlat(j)=wlatx(j)
64  ENDDO
65 C$OMP PARALLEL DO
66  DO j=jb,je
67  CALL splegend(iromb,maxwv,slat(j),clat(j),eps,epstop,
68  & pln(1,j),plntop(1,j))
69  ENDDO
70 C - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
71  END
spwget
subroutine spwget(IROMB, MAXWV, EPS, EPSTOP, ENN1, ELONN1, EON, EONTOP)
This subprogram gets wave-space constants.
Definition: spwget.f:22
splegend
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
sptranf0
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:44
spffte
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:50
splat
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:50