[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: cmf2kf.f,v 1.2 2004/06/15 21:08:32 rodney Exp $ |
---|
| 11 | ! |
---|
| 12 | !CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC |
---|
| 13 | |
---|
| 14 | SUBROUTINE CMF2KF (LOT,IDO,L1,NA,CC,IM1,IN1,CH,IM2,IN2,WA) |
---|
| 15 | REAL CC(2,IN1,L1,IDO,2),CH(2,IN2,L1,2,IDO),WA(IDO,1,2) |
---|
| 16 | ! |
---|
| 17 | M1D = (LOT-1)*IM1+1 |
---|
| 18 | M2S = 1-IM2 |
---|
| 19 | IF (IDO .GT. 1) GO TO 102 |
---|
| 20 | SN = 1./REAL(2*L1) |
---|
| 21 | IF (NA .EQ. 1) GO TO 106 |
---|
| 22 | DO 101 K=1,L1 |
---|
| 23 | DO 101 M1=1,M1D,IM1 |
---|
| 24 | CHOLD1 = SN*(CC(1,M1,K,1,1)+CC(1,M1,K,1,2)) |
---|
| 25 | CC(1,M1,K,1,2) = SN*(CC(1,M1,K,1,1)-CC(1,M1,K,1,2)) |
---|
| 26 | CC(1,M1,K,1,1) = CHOLD1 |
---|
| 27 | CHOLD2 = SN*(CC(2,M1,K,1,1)+CC(2,M1,K,1,2)) |
---|
| 28 | CC(2,M1,K,1,2) = SN*(CC(2,M1,K,1,1)-CC(2,M1,K,1,2)) |
---|
| 29 | CC(2,M1,K,1,1) = CHOLD2 |
---|
| 30 | 101 CONTINUE |
---|
| 31 | RETURN |
---|
| 32 | 106 DO 107 K=1,L1 |
---|
| 33 | M2 = M2S |
---|
| 34 | DO 107 M1=1,M1D,IM1 |
---|
| 35 | M2 = M2+IM2 |
---|
| 36 | CH(1,M2,K,1,1) = SN*(CC(1,M1,K,1,1)+CC(1,M1,K,1,2)) |
---|
| 37 | CH(1,M2,K,2,1) = SN*(CC(1,M1,K,1,1)-CC(1,M1,K,1,2)) |
---|
| 38 | CH(2,M2,K,1,1) = SN*(CC(2,M1,K,1,1)+CC(2,M1,K,1,2)) |
---|
| 39 | CH(2,M2,K,2,1) = SN*(CC(2,M1,K,1,1)-CC(2,M1,K,1,2)) |
---|
| 40 | 107 CONTINUE |
---|
| 41 | RETURN |
---|
| 42 | 102 DO 103 K=1,L1 |
---|
| 43 | M2 = M2S |
---|
| 44 | DO 103 M1=1,M1D,IM1 |
---|
| 45 | M2 = M2+IM2 |
---|
| 46 | CH(1,M2,K,1,1) = CC(1,M1,K,1,1)+CC(1,M1,K,1,2) |
---|
| 47 | CH(1,M2,K,2,1) = CC(1,M1,K,1,1)-CC(1,M1,K,1,2) |
---|
| 48 | CH(2,M2,K,1,1) = CC(2,M1,K,1,1)+CC(2,M1,K,1,2) |
---|
| 49 | CH(2,M2,K,2,1) = CC(2,M1,K,1,1)-CC(2,M1,K,1,2) |
---|
| 50 | 103 CONTINUE |
---|
| 51 | DO 105 I=2,IDO |
---|
| 52 | DO 104 K=1,L1 |
---|
| 53 | M2 = M2S |
---|
| 54 | DO 104 M1=1,M1D,IM1 |
---|
| 55 | M2 = M2+IM2 |
---|
| 56 | CH(1,M2,K,1,I) = CC(1,M1,K,I,1)+CC(1,M1,K,I,2) |
---|
| 57 | TR2 = CC(1,M1,K,I,1)-CC(1,M1,K,I,2) |
---|
| 58 | CH(2,M2,K,1,I) = CC(2,M1,K,I,1)+CC(2,M1,K,I,2) |
---|
| 59 | TI2 = CC(2,M1,K,I,1)-CC(2,M1,K,I,2) |
---|
| 60 | CH(2,M2,K,2,I) = WA(I,1,1)*TI2-WA(I,1,2)*TR2 |
---|
| 61 | CH(1,M2,K,2,I) = WA(I,1,1)*TR2+WA(I,1,2)*TI2 |
---|
| 62 | 104 CONTINUE |
---|
| 63 | 105 END DO |
---|
| 64 | RETURN |
---|
| 65 | END |
---|