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