NCEPLIBS-ip 5.2.0
Loading...
Searching...
No Matches
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:: WREAL(INCW,KMAX)
37 REAL,INTENT(INOUT):: G(INCG,KMAX)
38 REAL:: AUX1(25000+INT(0.82*IMAX))
39 REAL:: AUX2(20000+INT(0.57*IMAX))
40 INTEGER:: NAUX1,NAUX2
41C - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
42 naux1=25000+int(0.82*imax)
43 naux2=20000+int(0.57*imax)
44 wreal=real(w)
45C - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
46C FOURIER TO PHYSICAL TRANSFORM.
47 SELECT CASE(idir)
48 CASE(1:)
49 CALL scrft(1,real(w),incw,g,incg,imax,kmax,-1,1.,
50 & aux1,naux1,aux2,naux2,0.,0)
51 CALL scrft(0,real(w),incw,g,incg,imax,kmax,-1,1.,
52 & aux1,naux1,aux2,naux2,0.,0)
53C - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
54C PHYSICAL TO FOURIER TRANSFORM.
55 CASE(:-1)
56 CALL srcft(1,g,incg,wreal,incw,imax,kmax,+1,1./imax,
57 & aux1,naux1,aux2,naux2,0.,0)
58 CALL srcft(0,g,incg,wreal,incw,imax,kmax,+1,1./imax,
59 & aux1,naux1,aux2,naux2,0.,0)
60 END SELECT
61 w=cmplx(wreal,0.0)
62 END SUBROUTINE
subroutine scrft(init, x, ldx, y, ldy, n, m, isign, scale, table, n1, wrk, n2, z, nz)
scrft
Definition fftpack.F:82
subroutine srcft(init, x, ldx, y, ldy, n, m, isign, scale, table, n1, wrk, n2, z, nz)
srcft
Definition fftpack.F:215
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