[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: c1f3kf.f,v 1.2 2004/06/15 21:08:32 rodney Exp $ |
---|
| 11 | ! |
---|
| 12 | !CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC |
---|
| 13 | |
---|
| 14 | SUBROUTINE C1F3KF (IDO,L1,NA,CC,IN1,CH,IN2,WA) |
---|
| 15 | REAL CC(IN1,L1,IDO,3),CH(IN2,L1,3,IDO),WA(IDO,2,2) |
---|
| 16 | DATA TAUR,TAUI /-.5,-.866025403784439/ |
---|
| 17 | ! |
---|
| 18 | IF (IDO .GT. 1) GO TO 102 |
---|
| 19 | SN = 1./REAL(3*L1) |
---|
| 20 | IF (NA .EQ. 1) GO TO 106 |
---|
| 21 | DO 101 K=1,L1 |
---|
| 22 | TR2 = CC(1,K,1,2)+CC(1,K,1,3) |
---|
| 23 | CR2 = CC(1,K,1,1)+TAUR*TR2 |
---|
| 24 | CC(1,K,1,1) = SN*(CC(1,K,1,1)+TR2) |
---|
| 25 | TI2 = CC(2,K,1,2)+CC(2,K,1,3) |
---|
| 26 | CI2 = CC(2,K,1,1)+TAUR*TI2 |
---|
| 27 | CC(2,K,1,1) = SN*(CC(2,K,1,1)+TI2) |
---|
| 28 | CR3 = TAUI*(CC(1,K,1,2)-CC(1,K,1,3)) |
---|
| 29 | CI3 = TAUI*(CC(2,K,1,2)-CC(2,K,1,3)) |
---|
| 30 | CC(1,K,1,2) = SN*(CR2-CI3) |
---|
| 31 | CC(1,K,1,3) = SN*(CR2+CI3) |
---|
| 32 | CC(2,K,1,2) = SN*(CI2+CR3) |
---|
| 33 | CC(2,K,1,3) = SN*(CI2-CR3) |
---|
| 34 | 101 END DO |
---|
| 35 | RETURN |
---|
| 36 | 106 DO 107 K=1,L1 |
---|
| 37 | TR2 = CC(1,K,1,2)+CC(1,K,1,3) |
---|
| 38 | CR2 = CC(1,K,1,1)+TAUR*TR2 |
---|
| 39 | CH(1,K,1,1) = SN*(CC(1,K,1,1)+TR2) |
---|
| 40 | TI2 = CC(2,K,1,2)+CC(2,K,1,3) |
---|
| 41 | CI2 = CC(2,K,1,1)+TAUR*TI2 |
---|
| 42 | CH(2,K,1,1) = SN*(CC(2,K,1,1)+TI2) |
---|
| 43 | CR3 = TAUI*(CC(1,K,1,2)-CC(1,K,1,3)) |
---|
| 44 | CI3 = TAUI*(CC(2,K,1,2)-CC(2,K,1,3)) |
---|
| 45 | CH(1,K,2,1) = SN*(CR2-CI3) |
---|
| 46 | CH(1,K,3,1) = SN*(CR2+CI3) |
---|
| 47 | CH(2,K,2,1) = SN*(CI2+CR3) |
---|
| 48 | CH(2,K,3,1) = SN*(CI2-CR3) |
---|
| 49 | 107 END DO |
---|
| 50 | RETURN |
---|
| 51 | 102 DO 103 K=1,L1 |
---|
| 52 | TR2 = CC(1,K,1,2)+CC(1,K,1,3) |
---|
| 53 | CR2 = CC(1,K,1,1)+TAUR*TR2 |
---|
| 54 | CH(1,K,1,1) = CC(1,K,1,1)+TR2 |
---|
| 55 | TI2 = CC(2,K,1,2)+CC(2,K,1,3) |
---|
| 56 | CI2 = CC(2,K,1,1)+TAUR*TI2 |
---|
| 57 | CH(2,K,1,1) = CC(2,K,1,1)+TI2 |
---|
| 58 | CR3 = TAUI*(CC(1,K,1,2)-CC(1,K,1,3)) |
---|
| 59 | CI3 = TAUI*(CC(2,K,1,2)-CC(2,K,1,3)) |
---|
| 60 | CH(1,K,2,1) = CR2-CI3 |
---|
| 61 | CH(1,K,3,1) = CR2+CI3 |
---|
| 62 | CH(2,K,2,1) = CI2+CR3 |
---|
| 63 | CH(2,K,3,1) = CI2-CR3 |
---|
| 64 | 103 END DO |
---|
| 65 | DO 105 I=2,IDO |
---|
| 66 | DO 104 K=1,L1 |
---|
| 67 | TR2 = CC(1,K,I,2)+CC(1,K,I,3) |
---|
| 68 | CR2 = CC(1,K,I,1)+TAUR*TR2 |
---|
| 69 | CH(1,K,1,I) = CC(1,K,I,1)+TR2 |
---|
| 70 | TI2 = CC(2,K,I,2)+CC(2,K,I,3) |
---|
| 71 | CI2 = CC(2,K,I,1)+TAUR*TI2 |
---|
| 72 | CH(2,K,1,I) = CC(2,K,I,1)+TI2 |
---|
| 73 | CR3 = TAUI*(CC(1,K,I,2)-CC(1,K,I,3)) |
---|
| 74 | CI3 = TAUI*(CC(2,K,I,2)-CC(2,K,I,3)) |
---|
| 75 | DR2 = CR2-CI3 |
---|
| 76 | DR3 = CR2+CI3 |
---|
| 77 | DI2 = CI2+CR3 |
---|
| 78 | DI3 = CI2-CR3 |
---|
| 79 | CH(2,K,2,I) = WA(I,1,1)*DI2-WA(I,1,2)*DR2 |
---|
| 80 | CH(1,K,2,I) = WA(I,1,1)*DR2+WA(I,1,2)*DI2 |
---|
| 81 | CH(2,K,3,I) = WA(I,2,1)*DI3-WA(I,2,2)*DR3 |
---|
| 82 | CH(1,K,3,I) = WA(I,2,1)*DR3+WA(I,2,2)*DI3 |
---|
| 83 | 104 CONTINUE |
---|
| 84 | 105 END DO |
---|
| 85 | RETURN |
---|
| 86 | END |
---|