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