1 subroutine rfftmb ( lot, jump, n, inc, r, lenr, wsave, lensav, &
4 !*****************************************************************************80
6 !! RFFTMB: real single precision backward FFT, 1D, multiple vectors.
10 ! RFFTMB computes the one-dimensional Fourier transform of multiple
11 ! periodic sequences within a real array. This transform is referred
12 ! to as the backward transform or Fourier synthesis, transforming the
13 ! sequences from spectral to physical space.
15 ! This transform is normalized since a call to RFFTMB followed
16 ! by a call to RFFTMF (or vice-versa) reproduces the original
17 ! array within roundoff error.
20 ! Copyright (C) 1995-2004, Scientific Computing Division,
21 ! University Corporation for Atmospheric Research
35 ! Vectorizing the Fast Fourier Transforms,
36 ! in Parallel Computations,
37 ! edited by G. Rodrigue,
38 ! Academic Press, 1982.
41 ! Fast Fourier Transform Algorithms for Vector Computers,
42 ! Parallel Computing, pages 45-63, 1984.
46 ! Input, integer ( kind = 4 ) LOT, the number of sequences to be transformed
49 ! Input, integer ( kind = 4 ) JUMP, the increment between the locations, in
50 ! array R, of the first elements of two consecutive sequences to be
53 ! Input, integer ( kind = 4 ) N, the length of each sequence to be
54 ! transformed. The transform is most efficient when N is a product of
57 ! Input, integer ( kind = 4 ) INC, the increment between the locations, in
58 ! array R, of two consecutive elements within the same sequence.
60 ! Input/output, real ( kind = 4 ) R(LENR), real array containing LOT
61 ! sequences, each having length N. R can have any number of dimensions,
62 ! but the total number of locations must be at least LENR. On input, the
63 ! spectral data to be transformed, on output the physical data.
65 ! Input, integer ( kind = 4 ) LENR, the dimension of the R array.
66 ! LENR must be at least (LOT-1)*JUMP + INC*(N-1) + 1.
68 ! Input, real ( kind = 4 ) WSAVE(LENSAV). WSAVE's contents must be
69 ! initialized with a call to RFFTMI before the first call to routine RFFTMF
70 ! or RFFTMB for a given transform length N.
72 ! Input, integer ( kind = 4 ) LENSAV, the dimension of the WSAVE array.
73 ! LENSAV must be at least N + INT(LOG(REAL(N))) + 4.
75 ! Workspace, real ( kind = 4 ) WORK(LENWRK).
77 ! Input, integer ( kind = 4 ) LENWRK, the dimension of the WORK array.
78 ! LENWRK must be at least LOT*N.
80 ! Output, integer ( kind = 4 ) IER, error flag.
82 ! 1, input parameter LENR not big enough;
83 ! 2, input parameter LENSAV not big enough;
84 ! 3, input parameter LENWRK not big enough;
85 ! 4, input parameters INC, JUMP, N, LOT are not consistent.
89 integer ( kind = 4 ) lenr
90 integer ( kind = 4 ) lensav
91 integer ( kind = 4 ) lenwrk
93 integer ( kind = 4 ) ier
94 integer ( kind = 4 ) inc
95 integer ( kind = 4 ) jump
96 integer ( kind = 4 ) lot
97 integer ( kind = 4 ) n
98 real ( kind = 4 ) r(lenr)
99 real ( kind = 4 ) work(lenwrk)
100 real ( kind = 4 ) wsave(lensav)
105 if ( lenr < ( lot - 1 ) * jump + inc * ( n - 1 ) + 1 ) then
107 call xerfft ( 'rfftmb ', 6 )
111 if ( lensav < n + int ( log ( real ( n, kind = 4 ) ) ) + 4 ) then
113 call xerfft ( 'rfftmb ', 8 )
117 if ( lenwrk < lot * n ) then
119 call xerfft ( 'rfftmb ', 10 )
123 if ( .not. xercon ( inc, jump, n, lot ) ) then
125 call xerfft ( 'rfftmb ', -1 )
133 call mrftb1 ( lot, jump, n, inc, r, work, wsave, wsave(n+1) )