NCEPLIBS-sp 2.4.0
spfftpt.f
Go to the documentation of this file.
1C> @file
2C> @brief Compute fourier transform to gridpoints.
3C> @author Iredell @date 96-02-20
4
5C> This subprogram computes a slow Fourier transform
6C> from Fourier space to a set of gridpoints.
7C>
8C> @note This subprogram is thread-safe.
9C>
10C> @param M Fourier wavenumber truncation
11C> @param N number of gridpoints
12C> @param INCW first dimension of the complex amplitude array
13C> (INCW >= M+1)
14C> @param INCG first dimension of the gridpoint array
15C> (INCG >= N)
16C> @param KMAX number of Fourier fields
17C> @param RLON grid longitudes in degrees
18C> @param W Fourier amplitudes
19C> @param G gridpoint values
20C>
21C> @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