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