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: cmf3kb.f,v 1.2 2004/06/15 21:08:32 rodney Exp $ |
---|
11 | ! |
---|
12 | !CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC |
---|
13 | |
---|
14 | SUBROUTINE CMF3KB (LOT,IDO,L1,NA,CC,IM1,IN1,CH,IM2,IN2,WA) |
---|
15 | REAL CC(2,IN1,L1,IDO,3),CH(2,IN2,L1,3,IDO),WA(IDO,2,2) |
---|
16 | DATA TAUR,TAUI /-.5,.866025403784439/ |
---|
17 | ! |
---|
18 | M1D = (LOT-1)*IM1+1 |
---|
19 | M2S = 1-IM2 |
---|
20 | IF (IDO.GT.1 .OR. NA.EQ.1) GO TO 102 |
---|
21 | DO 101 K=1,L1 |
---|
22 | DO 101 M1=1,M1D,IM1 |
---|
23 | TR2 = CC(1,M1,K,1,2)+CC(1,M1,K,1,3) |
---|
24 | CR2 = CC(1,M1,K,1,1)+TAUR*TR2 |
---|
25 | CC(1,M1,K,1,1) = CC(1,M1,K,1,1)+TR2 |
---|
26 | TI2 = CC(2,M1,K,1,2)+CC(2,M1,K,1,3) |
---|
27 | CI2 = CC(2,M1,K,1,1)+TAUR*TI2 |
---|
28 | CC(2,M1,K,1,1) = CC(2,M1,K,1,1)+TI2 |
---|
29 | CR3 = TAUI*(CC(1,M1,K,1,2)-CC(1,M1,K,1,3)) |
---|
30 | CI3 = TAUI*(CC(2,M1,K,1,2)-CC(2,M1,K,1,3)) |
---|
31 | CC(1,M1,K,1,2) = CR2-CI3 |
---|
32 | CC(1,M1,K,1,3) = CR2+CI3 |
---|
33 | CC(2,M1,K,1,2) = CI2+CR3 |
---|
34 | CC(2,M1,K,1,3) = CI2-CR3 |
---|
35 | 101 CONTINUE |
---|
36 | RETURN |
---|
37 | 102 DO 103 K=1,L1 |
---|
38 | M2 = M2S |
---|
39 | DO 103 M1=1,M1D,IM1 |
---|
40 | M2 = M2+IM2 |
---|
41 | TR2 = CC(1,M1,K,1,2)+CC(1,M1,K,1,3) |
---|
42 | CR2 = CC(1,M1,K,1,1)+TAUR*TR2 |
---|
43 | CH(1,M2,K,1,1) = CC(1,M1,K,1,1)+TR2 |
---|
44 | TI2 = CC(2,M1,K,1,2)+CC(2,M1,K,1,3) |
---|
45 | CI2 = CC(2,M1,K,1,1)+TAUR*TI2 |
---|
46 | CH(2,M2,K,1,1) = CC(2,M1,K,1,1)+TI2 |
---|
47 | CR3 = TAUI*(CC(1,M1,K,1,2)-CC(1,M1,K,1,3)) |
---|
48 | CI3 = TAUI*(CC(2,M1,K,1,2)-CC(2,M1,K,1,3)) |
---|
49 | CH(1,M2,K,2,1) = CR2-CI3 |
---|
50 | CH(1,M2,K,3,1) = CR2+CI3 |
---|
51 | CH(2,M2,K,2,1) = CI2+CR3 |
---|
52 | CH(2,M2,K,3,1) = CI2-CR3 |
---|
53 | 103 CONTINUE |
---|
54 | IF (IDO .EQ. 1) RETURN |
---|
55 | DO 105 I=2,IDO |
---|
56 | DO 104 K=1,L1 |
---|
57 | M2 = M2S |
---|
58 | DO 104 M1=1,M1D,IM1 |
---|
59 | M2 = M2+IM2 |
---|
60 | TR2 = CC(1,M1,K,I,2)+CC(1,M1,K,I,3) |
---|
61 | CR2 = CC(1,M1,K,I,1)+TAUR*TR2 |
---|
62 | CH(1,M2,K,1,I) = CC(1,M1,K,I,1)+TR2 |
---|
63 | TI2 = CC(2,M1,K,I,2)+CC(2,M1,K,I,3) |
---|
64 | CI2 = CC(2,M1,K,I,1)+TAUR*TI2 |
---|
65 | CH(2,M2,K,1,I) = CC(2,M1,K,I,1)+TI2 |
---|
66 | CR3 = TAUI*(CC(1,M1,K,I,2)-CC(1,M1,K,I,3)) |
---|
67 | CI3 = TAUI*(CC(2,M1,K,I,2)-CC(2,M1,K,I,3)) |
---|
68 | DR2 = CR2-CI3 |
---|
69 | DR3 = CR2+CI3 |
---|
70 | DI2 = CI2+CR3 |
---|
71 | DI3 = CI2-CR3 |
---|
72 | CH(2,M2,K,2,I) = WA(I,1,1)*DI2+WA(I,1,2)*DR2 |
---|
73 | CH(1,M2,K,2,I) = WA(I,1,1)*DR2-WA(I,1,2)*DI2 |
---|
74 | CH(2,M2,K,3,I) = WA(I,2,1)*DI3+WA(I,2,2)*DR3 |
---|
75 | CH(1,M2,K,3,I) = WA(I,2,1)*DR3-WA(I,2,2)*DI3 |
---|
76 | 104 CONTINUE |
---|
77 | 105 END DO |
---|
78 | RETURN |
---|
79 | END |
---|