1 CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC
5 C Authors: Paul N. Swarztrauber and Richard A. Valent
9 CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC
11 SUBROUTINE RFFT2B
(LDIM
, L
, M
, R
, WSAVE
, LENSAV
, WORK
,
13 INTEGER LDIM
, L
, M
, LENSAV
, LENWRK
, IER
14 REAL R
(LDIM
,M
), WSAVE
(LENSAV
), WORK
(LENWRK
)
23 LWSAV
= L
+ INT
(LOG
(REAL(L
))) +4
24 MWSAV
= 2*M
+ INT
(LOG
(REAL(M
))) +4
25 IF (LENSAV
.LT
. LWSAV
+MWSAV
) THEN
27 CALL XERFFT
('RFFT2B', 6)
33 IF (LENWRK
.LT
. 2*(L
/2+1)*M
) THEN
35 CALL XERFFT
('RFFT2B', 8)
39 C Verify LDIM is as big as L
41 IF (LDIM
.LT
. 2*(L
/2+1)) THEN
43 CALL XERFFT
('RFFT2B', -6)
47 C transform second dimension of array
49 CALL CFFTMB
(L
/2+1,1,M
,LDIM
/2,R
,M*LDIM
/2,
50 . WSAVE
(L
+INT
(LOG
(REAL(L
)))+5),
51 . 2*M
+INT
(LOG
(REAL(M
)))+4,WORK
,2*(L
/2+1)*M
,IER1
)
54 CALL XERFFT
('RFFT2B',-5)
66 C Transform first dimension of array
68 CALL RFFTMB
(M
,LDIM
,L
,1,R
,M*LDIM
,WSAVE
(1),
69 . L
+INT
(LOG
(REAL(L
)))+4,WORK
,2*(L
/2+1)*M
,IER1
)
72 CALL XERFFT
('RFFT2F',-5)