[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: cmf5kb.f,v 1.2 2004/06/15 21:08:32 rodney Exp $ |
---|
| 11 | ! |
---|
| 12 | !CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC |
---|
| 13 | |
---|
| 14 | SUBROUTINE CMF5KB (LOT,IDO,L1,NA,CC,IM1,IN1,CH,IM2,IN2,WA) |
---|
| 15 | REAL CC(2,IN1,L1,IDO,5),CH(2,IN2,L1,5,IDO),WA(IDO,4,2) |
---|
| 16 | DATA TR11,TI11,TR12,TI12 /.3090169943749474,.9510565162951536, & |
---|
| 17 | &-.8090169943749474,.5877852522924731/ |
---|
| 18 | ! |
---|
| 19 | ! FFTPACK 5.0 auxiliary routine |
---|
| 20 | ! |
---|
| 21 | M1D = (LOT-1)*IM1+1 |
---|
| 22 | M2S = 1-IM2 |
---|
| 23 | IF (IDO.GT.1 .OR. NA.EQ.1) GO TO 102 |
---|
| 24 | DO 101 K=1,L1 |
---|
| 25 | DO 101 M1=1,M1D,IM1 |
---|
| 26 | TI5 = CC(2,M1,K,1,2)-CC(2,M1,K,1,5) |
---|
| 27 | TI2 = CC(2,M1,K,1,2)+CC(2,M1,K,1,5) |
---|
| 28 | TI4 = CC(2,M1,K,1,3)-CC(2,M1,K,1,4) |
---|
| 29 | TI3 = CC(2,M1,K,1,3)+CC(2,M1,K,1,4) |
---|
| 30 | TR5 = CC(1,M1,K,1,2)-CC(1,M1,K,1,5) |
---|
| 31 | TR2 = CC(1,M1,K,1,2)+CC(1,M1,K,1,5) |
---|
| 32 | TR4 = CC(1,M1,K,1,3)-CC(1,M1,K,1,4) |
---|
| 33 | TR3 = CC(1,M1,K,1,3)+CC(1,M1,K,1,4) |
---|
| 34 | CHOLD1 = CC(1,M1,K,1,1)+TR2+TR3 |
---|
| 35 | CHOLD2 = CC(2,M1,K,1,1)+TI2+TI3 |
---|
| 36 | CR2 = CC(1,M1,K,1,1)+TR11*TR2+TR12*TR3 |
---|
| 37 | CI2 = CC(2,M1,K,1,1)+TR11*TI2+TR12*TI3 |
---|
| 38 | CR3 = CC(1,M1,K,1,1)+TR12*TR2+TR11*TR3 |
---|
| 39 | CI3 = CC(2,M1,K,1,1)+TR12*TI2+TR11*TI3 |
---|
| 40 | CC(1,M1,K,1,1) = CHOLD1 |
---|
| 41 | CC(2,M1,K,1,1) = CHOLD2 |
---|
| 42 | CR5 = TI11*TR5+TI12*TR4 |
---|
| 43 | CI5 = TI11*TI5+TI12*TI4 |
---|
| 44 | CR4 = TI12*TR5-TI11*TR4 |
---|
| 45 | CI4 = TI12*TI5-TI11*TI4 |
---|
| 46 | CC(1,M1,K,1,2) = CR2-CI5 |
---|
| 47 | CC(1,M1,K,1,5) = CR2+CI5 |
---|
| 48 | CC(2,M1,K,1,2) = CI2+CR5 |
---|
| 49 | CC(2,M1,K,1,3) = CI3+CR4 |
---|
| 50 | CC(1,M1,K,1,3) = CR3-CI4 |
---|
| 51 | CC(1,M1,K,1,4) = CR3+CI4 |
---|
| 52 | CC(2,M1,K,1,4) = CI3-CR4 |
---|
| 53 | CC(2,M1,K,1,5) = CI2-CR5 |
---|
| 54 | 101 CONTINUE |
---|
| 55 | RETURN |
---|
| 56 | 102 DO 103 K=1,L1 |
---|
| 57 | M2 = M2S |
---|
| 58 | DO 103 M1=1,M1D,IM1 |
---|
| 59 | M2 = M2+IM2 |
---|
| 60 | TI5 = CC(2,M1,K,1,2)-CC(2,M1,K,1,5) |
---|
| 61 | TI2 = CC(2,M1,K,1,2)+CC(2,M1,K,1,5) |
---|
| 62 | TI4 = CC(2,M1,K,1,3)-CC(2,M1,K,1,4) |
---|
| 63 | TI3 = CC(2,M1,K,1,3)+CC(2,M1,K,1,4) |
---|
| 64 | TR5 = CC(1,M1,K,1,2)-CC(1,M1,K,1,5) |
---|
| 65 | TR2 = CC(1,M1,K,1,2)+CC(1,M1,K,1,5) |
---|
| 66 | TR4 = CC(1,M1,K,1,3)-CC(1,M1,K,1,4) |
---|
| 67 | TR3 = CC(1,M1,K,1,3)+CC(1,M1,K,1,4) |
---|
| 68 | CH(1,M2,K,1,1) = CC(1,M1,K,1,1)+TR2+TR3 |
---|
| 69 | CH(2,M2,K,1,1) = CC(2,M1,K,1,1)+TI2+TI3 |
---|
| 70 | CR2 = CC(1,M1,K,1,1)+TR11*TR2+TR12*TR3 |
---|
| 71 | CI2 = CC(2,M1,K,1,1)+TR11*TI2+TR12*TI3 |
---|
| 72 | CR3 = CC(1,M1,K,1,1)+TR12*TR2+TR11*TR3 |
---|
| 73 | CI3 = CC(2,M1,K,1,1)+TR12*TI2+TR11*TI3 |
---|
| 74 | CR5 = TI11*TR5+TI12*TR4 |
---|
| 75 | CI5 = TI11*TI5+TI12*TI4 |
---|
| 76 | CR4 = TI12*TR5-TI11*TR4 |
---|
| 77 | CI4 = TI12*TI5-TI11*TI4 |
---|
| 78 | CH(1,M2,K,2,1) = CR2-CI5 |
---|
| 79 | CH(1,M2,K,5,1) = CR2+CI5 |
---|
| 80 | CH(2,M2,K,2,1) = CI2+CR5 |
---|
| 81 | CH(2,M2,K,3,1) = CI3+CR4 |
---|
| 82 | CH(1,M2,K,3,1) = CR3-CI4 |
---|
| 83 | CH(1,M2,K,4,1) = CR3+CI4 |
---|
| 84 | CH(2,M2,K,4,1) = CI3-CR4 |
---|
| 85 | CH(2,M2,K,5,1) = CI2-CR5 |
---|
| 86 | 103 CONTINUE |
---|
| 87 | IF(IDO .EQ. 1) RETURN |
---|
| 88 | DO 105 I=2,IDO |
---|
| 89 | DO 104 K=1,L1 |
---|
| 90 | M2 = M2S |
---|
| 91 | DO 104 M1=1,M1D,IM1 |
---|
| 92 | M2 = M2+IM2 |
---|
| 93 | TI5 = CC(2,M1,K,I,2)-CC(2,M1,K,I,5) |
---|
| 94 | TI2 = CC(2,M1,K,I,2)+CC(2,M1,K,I,5) |
---|
| 95 | TI4 = CC(2,M1,K,I,3)-CC(2,M1,K,I,4) |
---|
| 96 | TI3 = CC(2,M1,K,I,3)+CC(2,M1,K,I,4) |
---|
| 97 | TR5 = CC(1,M1,K,I,2)-CC(1,M1,K,I,5) |
---|
| 98 | TR2 = CC(1,M1,K,I,2)+CC(1,M1,K,I,5) |
---|
| 99 | TR4 = CC(1,M1,K,I,3)-CC(1,M1,K,I,4) |
---|
| 100 | TR3 = CC(1,M1,K,I,3)+CC(1,M1,K,I,4) |
---|
| 101 | CH(1,M2,K,1,I) = CC(1,M1,K,I,1)+TR2+TR3 |
---|
| 102 | CH(2,M2,K,1,I) = CC(2,M1,K,I,1)+TI2+TI3 |
---|
| 103 | CR2 = CC(1,M1,K,I,1)+TR11*TR2+TR12*TR3 |
---|
| 104 | CI2 = CC(2,M1,K,I,1)+TR11*TI2+TR12*TI3 |
---|
| 105 | CR3 = CC(1,M1,K,I,1)+TR12*TR2+TR11*TR3 |
---|
| 106 | CI3 = CC(2,M1,K,I,1)+TR12*TI2+TR11*TI3 |
---|
| 107 | CR5 = TI11*TR5+TI12*TR4 |
---|
| 108 | CI5 = TI11*TI5+TI12*TI4 |
---|
| 109 | CR4 = TI12*TR5-TI11*TR4 |
---|
| 110 | CI4 = TI12*TI5-TI11*TI4 |
---|
| 111 | DR3 = CR3-CI4 |
---|
| 112 | DR4 = CR3+CI4 |
---|
| 113 | DI3 = CI3+CR4 |
---|
| 114 | DI4 = CI3-CR4 |
---|
| 115 | DR5 = CR2+CI5 |
---|
| 116 | DR2 = CR2-CI5 |
---|
| 117 | DI5 = CI2-CR5 |
---|
| 118 | DI2 = CI2+CR5 |
---|
| 119 | CH(1,M2,K,2,I) = WA(I,1,1)*DR2-WA(I,1,2)*DI2 |
---|
| 120 | CH(2,M2,K,2,I) = WA(I,1,1)*DI2+WA(I,1,2)*DR2 |
---|
| 121 | CH(1,M2,K,3,I) = WA(I,2,1)*DR3-WA(I,2,2)*DI3 |
---|
| 122 | CH(2,M2,K,3,I) = WA(I,2,1)*DI3+WA(I,2,2)*DR3 |
---|
| 123 | CH(1,M2,K,4,I) = WA(I,3,1)*DR4-WA(I,3,2)*DI4 |
---|
| 124 | CH(2,M2,K,4,I) = WA(I,3,1)*DI4+WA(I,3,2)*DR4 |
---|
| 125 | CH(1,M2,K,5,I) = WA(I,4,1)*DR5-WA(I,4,2)*DI5 |
---|
| 126 | CH(2,M2,K,5,I) = WA(I,4,1)*DI5+WA(I,4,2)*DR5 |
---|
| 127 | 104 CONTINUE |
---|
| 128 | 105 END DO |
---|
| 129 | RETURN |
---|
| 130 | END |
---|