[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: c1f5kf.f,v 1.2 2004/06/15 21:08:32 rodney Exp $ |
---|
| 11 | ! |
---|
| 12 | !CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC |
---|
| 13 | |
---|
| 14 | SUBROUTINE C1F5KF (IDO,L1,NA,CC,IN1,CH,IN2,WA) |
---|
| 15 | REAL CC(IN1,L1,IDO,5),CH(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 | IF (IDO .GT. 1) GO TO 102 |
---|
| 22 | SN = 1./REAL(5*L1) |
---|
| 23 | IF (NA .EQ. 1) GO TO 106 |
---|
| 24 | DO 101 K=1,L1 |
---|
| 25 | ! rav DO 101 M1=1,M1D,IM1 |
---|
| 26 | TI5 = CC(2,K,1,2)-CC(2,K,1,5) |
---|
| 27 | TI2 = CC(2,K,1,2)+CC(2,K,1,5) |
---|
| 28 | TI4 = CC(2,K,1,3)-CC(2,K,1,4) |
---|
| 29 | TI3 = CC(2,K,1,3)+CC(2,K,1,4) |
---|
| 30 | TR5 = CC(1,K,1,2)-CC(1,K,1,5) |
---|
| 31 | TR2 = CC(1,K,1,2)+CC(1,K,1,5) |
---|
| 32 | TR4 = CC(1,K,1,3)-CC(1,K,1,4) |
---|
| 33 | TR3 = CC(1,K,1,3)+CC(1,K,1,4) |
---|
| 34 | CHOLD1 = SN*(CC(1,K,1,1)+TR2+TR3) |
---|
| 35 | CHOLD2 = SN*(CC(2,K,1,1)+TI2+TI3) |
---|
| 36 | CR2 = CC(1,K,1,1)+TR11*TR2+TR12*TR3 |
---|
| 37 | CI2 = CC(2,K,1,1)+TR11*TI2+TR12*TI3 |
---|
| 38 | CR3 = CC(1,K,1,1)+TR12*TR2+TR11*TR3 |
---|
| 39 | CI3 = CC(2,K,1,1)+TR12*TI2+TR11*TI3 |
---|
| 40 | CC(1,K,1,1) = CHOLD1 |
---|
| 41 | CC(2,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,K,1,2) = SN*(CR2-CI5) |
---|
| 47 | CC(1,K,1,5) = SN*(CR2+CI5) |
---|
| 48 | CC(2,K,1,2) = SN*(CI2+CR5) |
---|
| 49 | CC(2,K,1,3) = SN*(CI3+CR4) |
---|
| 50 | CC(1,K,1,3) = SN*(CR3-CI4) |
---|
| 51 | CC(1,K,1,4) = SN*(CR3+CI4) |
---|
| 52 | CC(2,K,1,4) = SN*(CI3-CR4) |
---|
| 53 | CC(2,K,1,5) = SN*(CI2-CR5) |
---|
| 54 | 101 END DO |
---|
| 55 | RETURN |
---|
| 56 | 106 DO 107 K=1,L1 |
---|
| 57 | TI5 = CC(2,K,1,2)-CC(2,K,1,5) |
---|
| 58 | TI2 = CC(2,K,1,2)+CC(2,K,1,5) |
---|
| 59 | TI4 = CC(2,K,1,3)-CC(2,K,1,4) |
---|
| 60 | TI3 = CC(2,K,1,3)+CC(2,K,1,4) |
---|
| 61 | TR5 = CC(1,K,1,2)-CC(1,K,1,5) |
---|
| 62 | TR2 = CC(1,K,1,2)+CC(1,K,1,5) |
---|
| 63 | TR4 = CC(1,K,1,3)-CC(1,K,1,4) |
---|
| 64 | TR3 = CC(1,K,1,3)+CC(1,K,1,4) |
---|
| 65 | CH(1,K,1,1) = SN*(CC(1,K,1,1)+TR2+TR3) |
---|
| 66 | CH(2,K,1,1) = SN*(CC(2,K,1,1)+TI2+TI3) |
---|
| 67 | CR2 = CC(1,K,1,1)+TR11*TR2+TR12*TR3 |
---|
| 68 | CI2 = CC(2,K,1,1)+TR11*TI2+TR12*TI3 |
---|
| 69 | CR3 = CC(1,K,1,1)+TR12*TR2+TR11*TR3 |
---|
| 70 | CI3 = CC(2,K,1,1)+TR12*TI2+TR11*TI3 |
---|
| 71 | CR5 = TI11*TR5+TI12*TR4 |
---|
| 72 | CI5 = TI11*TI5+TI12*TI4 |
---|
| 73 | CR4 = TI12*TR5-TI11*TR4 |
---|
| 74 | CI4 = TI12*TI5-TI11*TI4 |
---|
| 75 | CH(1,K,2,1) = SN*(CR2-CI5) |
---|
| 76 | CH(1,K,5,1) = SN*(CR2+CI5) |
---|
| 77 | CH(2,K,2,1) = SN*(CI2+CR5) |
---|
| 78 | CH(2,K,3,1) = SN*(CI3+CR4) |
---|
| 79 | CH(1,K,3,1) = SN*(CR3-CI4) |
---|
| 80 | CH(1,K,4,1) = SN*(CR3+CI4) |
---|
| 81 | CH(2,K,4,1) = SN*(CI3-CR4) |
---|
| 82 | CH(2,K,5,1) = SN*(CI2-CR5) |
---|
| 83 | 107 END DO |
---|
| 84 | RETURN |
---|
| 85 | 102 DO 103 K=1,L1 |
---|
| 86 | TI5 = CC(2,K,1,2)-CC(2,K,1,5) |
---|
| 87 | TI2 = CC(2,K,1,2)+CC(2,K,1,5) |
---|
| 88 | TI4 = CC(2,K,1,3)-CC(2,K,1,4) |
---|
| 89 | TI3 = CC(2,K,1,3)+CC(2,K,1,4) |
---|
| 90 | TR5 = CC(1,K,1,2)-CC(1,K,1,5) |
---|
| 91 | TR2 = CC(1,K,1,2)+CC(1,K,1,5) |
---|
| 92 | TR4 = CC(1,K,1,3)-CC(1,K,1,4) |
---|
| 93 | TR3 = CC(1,K,1,3)+CC(1,K,1,4) |
---|
| 94 | CH(1,K,1,1) = CC(1,K,1,1)+TR2+TR3 |
---|
| 95 | CH(2,K,1,1) = CC(2,K,1,1)+TI2+TI3 |
---|
| 96 | CR2 = CC(1,K,1,1)+TR11*TR2+TR12*TR3 |
---|
| 97 | CI2 = CC(2,K,1,1)+TR11*TI2+TR12*TI3 |
---|
| 98 | CR3 = CC(1,K,1,1)+TR12*TR2+TR11*TR3 |
---|
| 99 | CI3 = CC(2,K,1,1)+TR12*TI2+TR11*TI3 |
---|
| 100 | CR5 = TI11*TR5+TI12*TR4 |
---|
| 101 | CI5 = TI11*TI5+TI12*TI4 |
---|
| 102 | CR4 = TI12*TR5-TI11*TR4 |
---|
| 103 | CI4 = TI12*TI5-TI11*TI4 |
---|
| 104 | CH(1,K,2,1) = CR2-CI5 |
---|
| 105 | CH(1,K,5,1) = CR2+CI5 |
---|
| 106 | CH(2,K,2,1) = CI2+CR5 |
---|
| 107 | CH(2,K,3,1) = CI3+CR4 |
---|
| 108 | CH(1,K,3,1) = CR3-CI4 |
---|
| 109 | CH(1,K,4,1) = CR3+CI4 |
---|
| 110 | CH(2,K,4,1) = CI3-CR4 |
---|
| 111 | CH(2,K,5,1) = CI2-CR5 |
---|
| 112 | 103 END DO |
---|
| 113 | DO 105 I=2,IDO |
---|
| 114 | DO 104 K=1,L1 |
---|
| 115 | TI5 = CC(2,K,I,2)-CC(2,K,I,5) |
---|
| 116 | TI2 = CC(2,K,I,2)+CC(2,K,I,5) |
---|
| 117 | TI4 = CC(2,K,I,3)-CC(2,K,I,4) |
---|
| 118 | TI3 = CC(2,K,I,3)+CC(2,K,I,4) |
---|
| 119 | TR5 = CC(1,K,I,2)-CC(1,K,I,5) |
---|
| 120 | TR2 = CC(1,K,I,2)+CC(1,K,I,5) |
---|
| 121 | TR4 = CC(1,K,I,3)-CC(1,K,I,4) |
---|
| 122 | TR3 = CC(1,K,I,3)+CC(1,K,I,4) |
---|
| 123 | CH(1,K,1,I) = CC(1,K,I,1)+TR2+TR3 |
---|
| 124 | CH(2,K,1,I) = CC(2,K,I,1)+TI2+TI3 |
---|
| 125 | CR2 = CC(1,K,I,1)+TR11*TR2+TR12*TR3 |
---|
| 126 | CI2 = CC(2,K,I,1)+TR11*TI2+TR12*TI3 |
---|
| 127 | CR3 = CC(1,K,I,1)+TR12*TR2+TR11*TR3 |
---|
| 128 | CI3 = CC(2,K,I,1)+TR12*TI2+TR11*TI3 |
---|
| 129 | CR5 = TI11*TR5+TI12*TR4 |
---|
| 130 | CI5 = TI11*TI5+TI12*TI4 |
---|
| 131 | CR4 = TI12*TR5-TI11*TR4 |
---|
| 132 | CI4 = TI12*TI5-TI11*TI4 |
---|
| 133 | DR3 = CR3-CI4 |
---|
| 134 | DR4 = CR3+CI4 |
---|
| 135 | DI3 = CI3+CR4 |
---|
| 136 | DI4 = CI3-CR4 |
---|
| 137 | DR5 = CR2+CI5 |
---|
| 138 | DR2 = CR2-CI5 |
---|
| 139 | DI5 = CI2-CR5 |
---|
| 140 | DI2 = CI2+CR5 |
---|
| 141 | CH(1,K,2,I) = WA(I,1,1)*DR2+WA(I,1,2)*DI2 |
---|
| 142 | CH(2,K,2,I) = WA(I,1,1)*DI2-WA(I,1,2)*DR2 |
---|
| 143 | CH(1,K,3,I) = WA(I,2,1)*DR3+WA(I,2,2)*DI3 |
---|
| 144 | CH(2,K,3,I) = WA(I,2,1)*DI3-WA(I,2,2)*DR3 |
---|
| 145 | CH(1,K,4,I) = WA(I,3,1)*DR4+WA(I,3,2)*DI4 |
---|
| 146 | CH(2,K,4,I) = WA(I,3,1)*DI4-WA(I,3,2)*DR4 |
---|
| 147 | CH(1,K,5,I) = WA(I,4,1)*DR5+WA(I,4,2)*DI5 |
---|
| 148 | CH(2,K,5,I) = WA(I,4,1)*DI5-WA(I,4,2)*DR5 |
---|
| 149 | 104 CONTINUE |
---|
| 150 | 105 END DO |
---|
| 151 | RETURN |
---|
| 152 | END |
---|