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: cmf2kb.f,v 1.2 2004/06/15 21:08:32 rodney Exp $ |
---|
11 | ! |
---|
12 | !CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC |
---|
13 | |
---|
14 | SUBROUTINE CMF2KB (LOT,IDO,L1,NA,CC,IM1,IN1,CH,IM2,IN2,WA) |
---|
15 | REAL CC(2,IN1,L1,IDO,2),CH(2,IN2,L1,2,IDO),WA(IDO,1,2) |
---|
16 | ! |
---|
17 | M1D = (LOT-1)*IM1+1 |
---|
18 | M2S = 1-IM2 |
---|
19 | IF (IDO.GT.1 .OR. NA.EQ.1) GO TO 102 |
---|
20 | DO 101 K=1,L1 |
---|
21 | DO 101 M1=1,M1D,IM1 |
---|
22 | CHOLD1 = CC(1,M1,K,1,1)+CC(1,M1,K,1,2) |
---|
23 | CC(1,M1,K,1,2) = CC(1,M1,K,1,1)-CC(1,M1,K,1,2) |
---|
24 | CC(1,M1,K,1,1) = CHOLD1 |
---|
25 | CHOLD2 = CC(2,M1,K,1,1)+CC(2,M1,K,1,2) |
---|
26 | CC(2,M1,K,1,2) = CC(2,M1,K,1,1)-CC(2,M1,K,1,2) |
---|
27 | CC(2,M1,K,1,1) = CHOLD2 |
---|
28 | 101 CONTINUE |
---|
29 | RETURN |
---|
30 | 102 DO 103 K=1,L1 |
---|
31 | M2 = M2S |
---|
32 | DO 103 M1=1,M1D,IM1 |
---|
33 | M2 = M2+IM2 |
---|
34 | CH(1,M2,K,1,1) = CC(1,M1,K,1,1)+CC(1,M1,K,1,2) |
---|
35 | CH(1,M2,K,2,1) = CC(1,M1,K,1,1)-CC(1,M1,K,1,2) |
---|
36 | CH(2,M2,K,1,1) = CC(2,M1,K,1,1)+CC(2,M1,K,1,2) |
---|
37 | CH(2,M2,K,2,1) = CC(2,M1,K,1,1)-CC(2,M1,K,1,2) |
---|
38 | 103 CONTINUE |
---|
39 | IF(IDO .EQ. 1) RETURN |
---|
40 | DO 105 I=2,IDO |
---|
41 | DO 104 K=1,L1 |
---|
42 | M2 = M2S |
---|
43 | DO 104 M1=1,M1D,IM1 |
---|
44 | M2 = M2+IM2 |
---|
45 | CH(1,M2,K,1,I) = CC(1,M1,K,I,1)+CC(1,M1,K,I,2) |
---|
46 | TR2 = CC(1,M1,K,I,1)-CC(1,M1,K,I,2) |
---|
47 | CH(2,M2,K,1,I) = CC(2,M1,K,I,1)+CC(2,M1,K,I,2) |
---|
48 | TI2 = CC(2,M1,K,I,1)-CC(2,M1,K,I,2) |
---|
49 | CH(2,M2,K,2,I) = WA(I,1,1)*TI2+WA(I,1,2)*TR2 |
---|
50 | CH(1,M2,K,2,I) = WA(I,1,1)*TR2-WA(I,1,2)*TI2 |
---|
51 | 104 CONTINUE |
---|
52 | 105 END DO |
---|
53 | RETURN |
---|
54 | END |
---|