[2759] | 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: cmf3kf.f,v 1.2 2004/06/15 21:08:32 rodney Exp $ |
---|
| 11 | ! |
---|
| 12 | !CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC |
---|
| 13 | |
---|
| 14 | SUBROUTINE CMF3KF (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) GO TO 102 |
---|
| 21 | SN = 1./REAL(3*L1) |
---|
| 22 | IF (NA .EQ. 1) GO TO 106 |
---|
| 23 | DO 101 K=1,L1 |
---|
| 24 | DO 101 M1=1,M1D,IM1 |
---|
| 25 | TR2 = CC(1,M1,K,1,2)+CC(1,M1,K,1,3) |
---|
| 26 | CR2 = CC(1,M1,K,1,1)+TAUR*TR2 |
---|
| 27 | CC(1,M1,K,1,1) = SN*(CC(1,M1,K,1,1)+TR2) |
---|
| 28 | TI2 = CC(2,M1,K,1,2)+CC(2,M1,K,1,3) |
---|
| 29 | CI2 = CC(2,M1,K,1,1)+TAUR*TI2 |
---|
| 30 | CC(2,M1,K,1,1) = SN*(CC(2,M1,K,1,1)+TI2) |
---|
| 31 | CR3 = TAUI*(CC(1,M1,K,1,2)-CC(1,M1,K,1,3)) |
---|
| 32 | CI3 = TAUI*(CC(2,M1,K,1,2)-CC(2,M1,K,1,3)) |
---|
| 33 | CC(1,M1,K,1,2) = SN*(CR2-CI3) |
---|
| 34 | CC(1,M1,K,1,3) = SN*(CR2+CI3) |
---|
| 35 | CC(2,M1,K,1,2) = SN*(CI2+CR3) |
---|
| 36 | CC(2,M1,K,1,3) = SN*(CI2-CR3) |
---|
| 37 | 101 CONTINUE |
---|
| 38 | RETURN |
---|
| 39 | 106 DO 107 K=1,L1 |
---|
| 40 | M2 = M2S |
---|
| 41 | DO 107 M1=1,M1D,IM1 |
---|
| 42 | M2 = M2+IM2 |
---|
| 43 | TR2 = CC(1,M1,K,1,2)+CC(1,M1,K,1,3) |
---|
| 44 | CR2 = CC(1,M1,K,1,1)+TAUR*TR2 |
---|
| 45 | CH(1,M2,K,1,1) = SN*(CC(1,M1,K,1,1)+TR2) |
---|
| 46 | TI2 = CC(2,M1,K,1,2)+CC(2,M1,K,1,3) |
---|
| 47 | CI2 = CC(2,M1,K,1,1)+TAUR*TI2 |
---|
| 48 | CH(2,M2,K,1,1) = SN*(CC(2,M1,K,1,1)+TI2) |
---|
| 49 | CR3 = TAUI*(CC(1,M1,K,1,2)-CC(1,M1,K,1,3)) |
---|
| 50 | CI3 = TAUI*(CC(2,M1,K,1,2)-CC(2,M1,K,1,3)) |
---|
| 51 | CH(1,M2,K,2,1) = SN*(CR2-CI3) |
---|
| 52 | CH(1,M2,K,3,1) = SN*(CR2+CI3) |
---|
| 53 | CH(2,M2,K,2,1) = SN*(CI2+CR3) |
---|
| 54 | CH(2,M2,K,3,1) = SN*(CI2-CR3) |
---|
| 55 | 107 CONTINUE |
---|
| 56 | RETURN |
---|
| 57 | 102 DO 103 K=1,L1 |
---|
| 58 | M2 = M2S |
---|
| 59 | DO 103 M1=1,M1D,IM1 |
---|
| 60 | M2 = M2+IM2 |
---|
| 61 | TR2 = CC(1,M1,K,1,2)+CC(1,M1,K,1,3) |
---|
| 62 | CR2 = CC(1,M1,K,1,1)+TAUR*TR2 |
---|
| 63 | CH(1,M2,K,1,1) = CC(1,M1,K,1,1)+TR2 |
---|
| 64 | TI2 = CC(2,M1,K,1,2)+CC(2,M1,K,1,3) |
---|
| 65 | CI2 = CC(2,M1,K,1,1)+TAUR*TI2 |
---|
| 66 | CH(2,M2,K,1,1) = CC(2,M1,K,1,1)+TI2 |
---|
| 67 | CR3 = TAUI*(CC(1,M1,K,1,2)-CC(1,M1,K,1,3)) |
---|
| 68 | CI3 = TAUI*(CC(2,M1,K,1,2)-CC(2,M1,K,1,3)) |
---|
| 69 | CH(1,M2,K,2,1) = CR2-CI3 |
---|
| 70 | CH(1,M2,K,3,1) = CR2+CI3 |
---|
| 71 | CH(2,M2,K,2,1) = CI2+CR3 |
---|
| 72 | CH(2,M2,K,3,1) = CI2-CR3 |
---|
| 73 | 103 CONTINUE |
---|
| 74 | DO 105 I=2,IDO |
---|
| 75 | DO 104 K=1,L1 |
---|
| 76 | M2 = M2S |
---|
| 77 | DO 104 M1=1,M1D,IM1 |
---|
| 78 | M2 = M2+IM2 |
---|
| 79 | TR2 = CC(1,M1,K,I,2)+CC(1,M1,K,I,3) |
---|
| 80 | CR2 = CC(1,M1,K,I,1)+TAUR*TR2 |
---|
| 81 | CH(1,M2,K,1,I) = CC(1,M1,K,I,1)+TR2 |
---|
| 82 | TI2 = CC(2,M1,K,I,2)+CC(2,M1,K,I,3) |
---|
| 83 | CI2 = CC(2,M1,K,I,1)+TAUR*TI2 |
---|
| 84 | CH(2,M2,K,1,I) = CC(2,M1,K,I,1)+TI2 |
---|
| 85 | CR3 = TAUI*(CC(1,M1,K,I,2)-CC(1,M1,K,I,3)) |
---|
| 86 | CI3 = TAUI*(CC(2,M1,K,I,2)-CC(2,M1,K,I,3)) |
---|
| 87 | DR2 = CR2-CI3 |
---|
| 88 | DR3 = CR2+CI3 |
---|
| 89 | DI2 = CI2+CR3 |
---|
| 90 | DI3 = CI2-CR3 |
---|
| 91 | CH(2,M2,K,2,I) = WA(I,1,1)*DI2-WA(I,1,2)*DR2 |
---|
| 92 | CH(1,M2,K,2,I) = WA(I,1,1)*DR2+WA(I,1,2)*DI2 |
---|
| 93 | CH(2,M2,K,3,I) = WA(I,2,1)*DI3-WA(I,2,2)*DR3 |
---|
| 94 | CH(1,M2,K,3,I) = WA(I,2,1)*DR3+WA(I,2,2)*DI3 |
---|
| 95 | 104 CONTINUE |
---|
| 96 | 105 END DO |
---|
| 97 | RETURN |
---|
| 98 | END |
---|