NCEPLIBS-sp 2.4.0
spfft1.f
Go to the documentation of this file.
1C> @file
2C> @brief Perform multiple fast Fourier transforms.
3C> @author Iredell @date 96-02-20
4
5C> This subprogram performs multiple fast Fourier transforms
6C> between complex amplitudes in Fourier space and real values
7C> in cyclic physical space.
8C>
9C> Subprogram spfft1() initializes trigonometric data each call.
10C> Use subprogram spfft() to save time and initialize once.
11C> This version invokes the IBM ESSL FFT.
12C>
13C> @note The restrictions on IMAX are that it must be a multiple of 1
14C> to 25 factors of two, up to 2 factors of three, and up to 1 factor of
15C> five, seven and eleven.
16C>
17C> @note This subprogram is thread-safe.
18C>
19C> @param IMAX number of values in the cyclic physical space
20C> (see limitations on imax in remarks below.)
21C> @param INCW first dimension of the complex amplitude array
22C> (INCW >= IMAX/2+1)
23C> @param INCG first dimension of the real value array (INCG >= IMAX)
24C> @param KMAX number of transforms to perform
25C> @param[out] W complex amplitudes if IDIR>0
26C> @param[out] G values if IDIR<0
27C> @param IDIR direction flag
28C> - IDIR>0 to transform from Fourier to physical space
29C> - IDIR<0 to transform from physical to Fourier space
30C>
31C> @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
40C - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
41 naux1=25000+int(0.82*imax)
42 naux2=20000+int(0.57*imax)
43C - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
44C 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)
51C - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
52C 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