[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: cmf4kb.f,v 1.2 2004/06/15 21:08:32 rodney Exp $ |
---|
| 11 | ! |
---|
| 12 | !CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC |
---|
| 13 | |
---|
| 14 | SUBROUTINE CMF4KB (LOT,IDO,L1,NA,CC,IM1,IN1,CH,IM2,IN2,WA) |
---|
| 15 | REAL CC(2,IN1,L1,IDO,4),CH(2,IN2,L1,4,IDO),WA(IDO,3,2) |
---|
| 16 | ! |
---|
| 17 | ! FFTPACK 5.0 auxiliary routine |
---|
| 18 | ! |
---|
| 19 | M1D = (LOT-1)*IM1+1 |
---|
| 20 | M2S = 1-IM2 |
---|
| 21 | IF (IDO.GT.1 .OR. NA.EQ.1) GO TO 102 |
---|
| 22 | DO 101 K=1,L1 |
---|
| 23 | DO 101 M1=1,M1D,IM1 |
---|
| 24 | TI1 = CC(2,M1,K,1,1)-CC(2,M1,K,1,3) |
---|
| 25 | TI2 = CC(2,M1,K,1,1)+CC(2,M1,K,1,3) |
---|
| 26 | TR4 = CC(2,M1,K,1,4)-CC(2,M1,K,1,2) |
---|
| 27 | TI3 = CC(2,M1,K,1,2)+CC(2,M1,K,1,4) |
---|
| 28 | TR1 = CC(1,M1,K,1,1)-CC(1,M1,K,1,3) |
---|
| 29 | TR2 = CC(1,M1,K,1,1)+CC(1,M1,K,1,3) |
---|
| 30 | TI4 = CC(1,M1,K,1,2)-CC(1,M1,K,1,4) |
---|
| 31 | TR3 = CC(1,M1,K,1,2)+CC(1,M1,K,1,4) |
---|
| 32 | CC(1,M1,K,1,1) = TR2+TR3 |
---|
| 33 | CC(1,M1,K,1,3) = TR2-TR3 |
---|
| 34 | CC(2,M1,K,1,1) = TI2+TI3 |
---|
| 35 | CC(2,M1,K,1,3) = TI2-TI3 |
---|
| 36 | CC(1,M1,K,1,2) = TR1+TR4 |
---|
| 37 | CC(1,M1,K,1,4) = TR1-TR4 |
---|
| 38 | CC(2,M1,K,1,2) = TI1+TI4 |
---|
| 39 | CC(2,M1,K,1,4) = TI1-TI4 |
---|
| 40 | 101 CONTINUE |
---|
| 41 | RETURN |
---|
| 42 | 102 DO 103 K=1,L1 |
---|
| 43 | M2 = M2S |
---|
| 44 | DO 103 M1=1,M1D,IM1 |
---|
| 45 | M2 = M2+IM2 |
---|
| 46 | TI1 = CC(2,M1,K,1,1)-CC(2,M1,K,1,3) |
---|
| 47 | TI2 = CC(2,M1,K,1,1)+CC(2,M1,K,1,3) |
---|
| 48 | TR4 = CC(2,M1,K,1,4)-CC(2,M1,K,1,2) |
---|
| 49 | TI3 = CC(2,M1,K,1,2)+CC(2,M1,K,1,4) |
---|
| 50 | TR1 = CC(1,M1,K,1,1)-CC(1,M1,K,1,3) |
---|
| 51 | TR2 = CC(1,M1,K,1,1)+CC(1,M1,K,1,3) |
---|
| 52 | TI4 = CC(1,M1,K,1,2)-CC(1,M1,K,1,4) |
---|
| 53 | TR3 = CC(1,M1,K,1,2)+CC(1,M1,K,1,4) |
---|
| 54 | CH(1,M2,K,1,1) = TR2+TR3 |
---|
| 55 | CH(1,M2,K,3,1) = TR2-TR3 |
---|
| 56 | CH(2,M2,K,1,1) = TI2+TI3 |
---|
| 57 | CH(2,M2,K,3,1) = TI2-TI3 |
---|
| 58 | CH(1,M2,K,2,1) = TR1+TR4 |
---|
| 59 | CH(1,M2,K,4,1) = TR1-TR4 |
---|
| 60 | CH(2,M2,K,2,1) = TI1+TI4 |
---|
| 61 | CH(2,M2,K,4,1) = TI1-TI4 |
---|
| 62 | 103 CONTINUE |
---|
| 63 | IF(IDO .EQ. 1) RETURN |
---|
| 64 | DO 105 I=2,IDO |
---|
| 65 | DO 104 K=1,L1 |
---|
| 66 | M2 = M2S |
---|
| 67 | DO 104 M1=1,M1D,IM1 |
---|
| 68 | M2 = M2+IM2 |
---|
| 69 | TI1 = CC(2,M1,K,I,1)-CC(2,M1,K,I,3) |
---|
| 70 | TI2 = CC(2,M1,K,I,1)+CC(2,M1,K,I,3) |
---|
| 71 | TI3 = CC(2,M1,K,I,2)+CC(2,M1,K,I,4) |
---|
| 72 | TR4 = CC(2,M1,K,I,4)-CC(2,M1,K,I,2) |
---|
| 73 | TR1 = CC(1,M1,K,I,1)-CC(1,M1,K,I,3) |
---|
| 74 | TR2 = CC(1,M1,K,I,1)+CC(1,M1,K,I,3) |
---|
| 75 | TI4 = CC(1,M1,K,I,2)-CC(1,M1,K,I,4) |
---|
| 76 | TR3 = CC(1,M1,K,I,2)+CC(1,M1,K,I,4) |
---|
| 77 | CH(1,M2,K,1,I) = TR2+TR3 |
---|
| 78 | CR3 = TR2-TR3 |
---|
| 79 | CH(2,M2,K,1,I) = TI2+TI3 |
---|
| 80 | CI3 = TI2-TI3 |
---|
| 81 | CR2 = TR1+TR4 |
---|
| 82 | CR4 = TR1-TR4 |
---|
| 83 | CI2 = TI1+TI4 |
---|
| 84 | CI4 = TI1-TI4 |
---|
| 85 | CH(1,M2,K,2,I) = WA(I,1,1)*CR2-WA(I,1,2)*CI2 |
---|
| 86 | CH(2,M2,K,2,I) = WA(I,1,1)*CI2+WA(I,1,2)*CR2 |
---|
| 87 | CH(1,M2,K,3,I) = WA(I,2,1)*CR3-WA(I,2,2)*CI3 |
---|
| 88 | CH(2,M2,K,3,I) = WA(I,2,1)*CI3+WA(I,2,2)*CR3 |
---|
| 89 | CH(1,M2,K,4,I) = WA(I,3,1)*CR4-WA(I,3,2)*CI4 |
---|
| 90 | CH(2,M2,K,4,I) = WA(I,3,1)*CI4+WA(I,3,2)*CR4 |
---|
| 91 | 104 CONTINUE |
---|
| 92 | 105 END DO |
---|
| 93 | RETURN |
---|
| 94 | END |
---|