NCEPLIBS-sp  2.5.0
spfftpt.f
Go to the documentation of this file.
1 C> @file
2 C> @brief Compute fourier transform to gridpoints.
3 C> @author Iredell @date 96-02-20
4 
5 C> This subprogram computes a slow Fourier transform
6 C> from Fourier space to a set of gridpoints.
7 C>
8 C> @note This subprogram is thread-safe.
9 C>
10 C> @param M Fourier wavenumber truncation
11 C> @param N number of gridpoints
12 C> @param INCW first dimension of the complex amplitude array
13 C> (INCW >= M+1)
14 C> @param INCG first dimension of the gridpoint array
15 C> (INCG >= N)
16 C> @param KMAX number of Fourier fields
17 C> @param RLON grid longitudes in degrees
18 C> @param W Fourier amplitudes
19 C> @param G gridpoint values
20 C>
21 C> @author Iredell @date 96-02-20
22  SUBROUTINE spfftpt(M,N,INCW,INCG,KMAX,RLON,W,G)
23 
24  IMPLICIT NONE
25  INTEGER,INTENT(IN):: M,N,INCW,INCG,KMAX
26  REAL,INTENT(IN):: RLON(N)
27  REAL,INTENT(IN):: W(2*INCW,KMAX)
28  REAL,INTENT(OUT):: G(INCG,KMAX)
29  INTEGER I,K,L
30  REAL RADLON,SLON(M),CLON(M)
31  REAL,PARAMETER:: PI=3.14159265358979
32 
33  DO i=1,n
34  radlon=pi/180*rlon(i)
35  DO l=1,m
36  slon(l)=sin(l*radlon)
37  clon(l)=cos(l*radlon)
38  ENDDO
39  DO k=1,kmax
40  g(i,k)=w(1,k)
41  ENDDO
42  DO l=1,m
43  DO k=1,kmax
44  g(i,k)=g(i,k)+2.*(w(2*l+1,k)*clon(l)-w(2*l+2,k)*slon(l))
45  ENDDO
46  ENDDO
47  ENDDO
48  END SUBROUTINE
subroutine spfftpt(M, N, INCW, INCG, KMAX, RLON, W, G)
This subprogram computes a slow Fourier transform from Fourier space to a set of gridpoints.
Definition: spfftpt.f:23