1 | !CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC |
---|
2 | ! |
---|
3 | ! FFTPACK 5.0 |
---|
4 | ! Copyright (C) 1995-2004, Scientific Computing Division, |
---|
5 | ! University Corporation for Atmospheric Research |
---|
6 | ! Licensed under the GNU General Public License (GPL) |
---|
7 | ! |
---|
8 | ! Authors: Paul N. Swarztrauber and Richard A. Valent |
---|
9 | ! |
---|
10 | ! $Id: mradb2.f,v 1.2 2004/06/15 21:29:19 rodney Exp $ |
---|
11 | ! |
---|
12 | !CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC |
---|
13 | |
---|
14 | SUBROUTINE MRADB2 (M,IDO,L1,CC,IM1,IN1,CH,IM2,IN2,WA1) |
---|
15 | REAL CC(IN1,IDO,2,L1), CH(IN2,IDO,L1,2), WA1(IDO) |
---|
16 | ! |
---|
17 | M1D = (M-1)*IM1+1 |
---|
18 | M2S = 1-IM2 |
---|
19 | DO 101 K=1,L1 |
---|
20 | M2 = M2S |
---|
21 | DO 1001 M1=1,M1D,IM1 |
---|
22 | M2 = M2+IM2 |
---|
23 | CH(M2,1,K,1) = CC(M1,1,1,K)+CC(M1,IDO,2,K) |
---|
24 | CH(M2,1,K,2) = CC(M1,1,1,K)-CC(M1,IDO,2,K) |
---|
25 | 1001 CONTINUE |
---|
26 | 101 END DO |
---|
27 | IF (IDO-2) 107,105,102 |
---|
28 | 102 IDP2 = IDO+2 |
---|
29 | DO 104 K=1,L1 |
---|
30 | DO 103 I=3,IDO,2 |
---|
31 | IC = IDP2-I |
---|
32 | M2 = M2S |
---|
33 | DO 1002 M1=1,M1D,IM1 |
---|
34 | M2 = M2+IM2 |
---|
35 | CH(M2,I-1,K,1) = CC(M1,I-1,1,K)+CC(M1,IC-1,2,K) |
---|
36 | CH(M2,I,K,1) = CC(M1,I,1,K)-CC(M1,IC,2,K) |
---|
37 | CH(M2,I-1,K,2) = WA1(I-2)*(CC(M1,I-1,1,K)-CC(M1,IC-1,2,K)) & |
---|
38 | & -WA1(I-1)*(CC(M1,I,1,K)+CC(M1,IC,2,K)) |
---|
39 | CH(M2,I,K,2) = WA1(I-2)*(CC(M1,I,1,K)+CC(M1,IC,2,K))+WA1(I-1) & |
---|
40 | & *(CC(M1,I-1,1,K)-CC(M1,IC-1,2,K)) |
---|
41 | 1002 CONTINUE |
---|
42 | 103 CONTINUE |
---|
43 | 104 END DO |
---|
44 | IF (MOD(IDO,2) .EQ. 1) RETURN |
---|
45 | 105 DO 106 K=1,L1 |
---|
46 | M2 = M2S |
---|
47 | DO 1003 M1=1,M1D,IM1 |
---|
48 | M2 = M2+IM2 |
---|
49 | CH(M2,IDO,K,1) = CC(M1,IDO,1,K)+CC(M1,IDO,1,K) |
---|
50 | CH(M2,IDO,K,2) = -(CC(M1,1,2,K)+CC(M1,1,2,K)) |
---|
51 | 1003 CONTINUE |
---|
52 | 106 END DO |
---|
53 | 107 RETURN |
---|
54 | END |
---|