NCEPLIBS-sp  2.5.0
spfft1.f
Go to the documentation of this file.
1 C> @file
2 C> @brief Perform multiple fast Fourier transforms.
3 C> @author Iredell @date 96-02-20
4 
5 C> This subprogram performs multiple fast Fourier transforms
6 C> between complex amplitudes in Fourier space and real values
7 C> in cyclic physical space.
8 C>
9 C> Subprogram spfft1() initializes trigonometric data each call.
10 C> Use subprogram spfft() to save time and initialize once.
11 C> This version invokes the IBM ESSL FFT.
12 C>
13 C> @note The restrictions on IMAX are that it must be a multiple of 1
14 C> to 25 factors of two, up to 2 factors of three, and up to 1 factor of
15 C> five, seven and eleven.
16 C>
17 C> @note This subprogram is thread-safe.
18 C>
19 C> @param IMAX number of values in the cyclic physical space
20 C> (see limitations on imax in remarks below.)
21 C> @param INCW first dimension of the complex amplitude array
22 C> (INCW >= IMAX/2+1)
23 C> @param INCG first dimension of the real value array (INCG >= IMAX)
24 C> @param KMAX number of transforms to perform
25 C> @param[out] W complex amplitudes if IDIR>0
26 C> @param[out] G values if IDIR<0
27 C> @param IDIR direction flag
28 C> - IDIR>0 to transform from Fourier to physical space
29 C> - IDIR<0 to transform from physical to Fourier space
30 C>
31 C> @author Iredell @date 96-02-20
32  SUBROUTINE spfft1(IMAX,INCW,INCG,KMAX,W,G,IDIR)
33  IMPLICIT NONE
34  INTEGER,INTENT(IN):: IMAX,INCW,INCG,KMAX,IDIR
35  COMPLEX,INTENT(INOUT):: W(INCW,KMAX)
36  REAL,INTENT(INOUT):: G(INCG,KMAX)
37  REAL:: AUX1(25000+INT(0.82*IMAX))
38  REAL:: AUX2(20000+INT(0.57*IMAX))
39  INTEGER:: NAUX1,NAUX2
40 C - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
41  naux1=25000+int(0.82*imax)
42  naux2=20000+int(0.57*imax)
43 C - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
44 C FOURIER TO PHYSICAL TRANSFORM.
45  SELECT CASE(idir)
46  CASE(1:)
47  CALL scrft(1,w,incw,g,incg,imax,kmax,-1,1.,
48  & aux1,naux1,aux2,naux2,0.,0)
49  CALL scrft(0,w,incw,g,incg,imax,kmax,-1,1.,
50  & aux1,naux1,aux2,naux2,0.,0)
51 C - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
52 C PHYSICAL TO FOURIER TRANSFORM.
53  CASE(:-1)
54  CALL srcft(1,g,incg,w,incw,imax,kmax,+1,1./imax,
55  & aux1,naux1,aux2,naux2,0.,0)
56  CALL srcft(0,g,incg,w,incw,imax,kmax,+1,1./imax,
57  & aux1,naux1,aux2,naux2,0.,0)
58  END SELECT
59  END SUBROUTINE
subroutine scrft(init, x, ldx, y, ldy, n, m, isign, scale, table, n1, wrk, n2, z, nz)
scrft
Definition: fftpack.F:80
subroutine srcft(init, x, ldx, y, ldy, n, m, isign, scale, table, n1, wrk, n2, z, nz)
srcft
Definition: fftpack.F:209
subroutine spfft1(IMAX, INCW, INCG, KMAX, W, G, IDIR)
This subprogram performs multiple fast Fourier transforms between complex amplitudes in Fourier space...
Definition: spfft1.f:33