NCEPLIBS-sp
2.3.3
spfftpt.f
Go to the documentation of this file.
1
C> @file
2
C>
3
C> Compute fourier transform to gridpoints
4
C> @author IREDELL @date 96-02-20
5
6
C> THIS SUBPROGRAM COMPUTES A SLOW FOURIER TRANSFORM
7
C> FROM FOURIER SPACE TO A SET OF GRIDPOINTS.
8
C>
9
C> @param M - INTEGER FOURIER WAVENUMBER TRUNCATION
10
C> @param N - INTEGER NUMBER OF GRIDPOINTS
11
C> @param INCW - INTEGER FIRST DIMENSION OF THE COMPLEX AMPLITUDE ARRAY
12
C> (INCW >= M+1)
13
C> @param INCG - INTEGER FIRST DIMENSION OF THE GRIDPOINT ARRAY
14
C> (INCG >= N)
15
C> @param KMAX - INTEGER NUMBER OF FOURIER FIELDS
16
C> @param RLON - REAL(N) GRID LONGITUDES IN DEGREES
17
C> @param W - COMPLEX(INCW,KMAX) FOURIER AMPLITUDES
18
C> @param G - REAL(INCG,KMAX) GRIDPOINT VALUES
19
C>
20
C> @note THIS SUBPROGRAM IS THREAD-SAFE.
21
SUBROUTINE
spfftpt
(M,N,INCW,INCG,KMAX,RLON,W,G)
22
23
IMPLICIT NONE
24
INTEGER
,
INTENT(IN)
:: M,N,INCW,INCG,KMAX
25
REAL
,
INTENT(IN)
:: RLON(N)
26
REAL
,
INTENT(IN)
:: W(2*INCW,KMAX)
27
REAL
,
INTENT(OUT)
:: G(INCG,KMAX)
28
INTEGER
I,K,L
29
REAL
RADLON,SLON(M),CLON(M)
30
REAL
,
PARAMETER
:: PI=3.14159265358979
31
C - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
32
DO
i=1,n
33
radlon=pi/180*rlon(i)
34
DO
l=1,m
35
slon(l)=sin(l*radlon)
36
clon(l)=cos(l*radlon)
37
ENDDO
38
DO
k=1,kmax
39
g(i,k)=w(1,k)
40
ENDDO
41
DO
l=1,m
42
DO
k=1,kmax
43
g(i,k)=g(i,k)+2.*(w(2*l+1,k)*clon(l)-w(2*l+2,k)*slon(l))
44
ENDDO
45
ENDDO
46
ENDDO
47
C - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
48
END SUBROUTINE
spfftpt
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:22
src
spfftpt.f
Generated by
1.8.17