[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: mradf4.f,v 1.2 2004/06/15 21:29:20 rodney Exp $ |
---|
| 11 | ! |
---|
| 12 | !CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC |
---|
| 13 | |
---|
| 14 | SUBROUTINE MRADF4 (M,IDO,L1,CC,IM1,IN1,CH,IM2,IN2,WA1,WA2,WA3) |
---|
| 15 | REAL CC(IN1,IDO,L1,4) ,CH(IN2,IDO,4,L1) , & |
---|
| 16 | & WA1(IDO) ,WA2(IDO) ,WA3(IDO) |
---|
| 17 | ! |
---|
| 18 | HSQT2=SQRT(2.)/2. |
---|
| 19 | M1D = (M-1)*IM1+1 |
---|
| 20 | M2S = 1-IM2 |
---|
| 21 | DO 101 K=1,L1 |
---|
| 22 | M2 = M2S |
---|
| 23 | DO 1001 M1=1,M1D,IM1 |
---|
| 24 | M2 = M2+IM2 |
---|
| 25 | CH(M2,1,1,K) = (CC(M1,1,K,2)+CC(M1,1,K,4)) & |
---|
| 26 | & +(CC(M1,1,K,1)+CC(M1,1,K,3)) |
---|
| 27 | CH(M2,IDO,4,K) = (CC(M1,1,K,1)+CC(M1,1,K,3)) & |
---|
| 28 | & -(CC(M1,1,K,2)+CC(M1,1,K,4)) |
---|
| 29 | CH(M2,IDO,2,K) = CC(M1,1,K,1)-CC(M1,1,K,3) |
---|
| 30 | CH(M2,1,3,K) = CC(M1,1,K,4)-CC(M1,1,K,2) |
---|
| 31 | 1001 CONTINUE |
---|
| 32 | 101 END DO |
---|
| 33 | IF (IDO-2) 107,105,102 |
---|
| 34 | 102 IDP2 = IDO+2 |
---|
| 35 | DO 104 K=1,L1 |
---|
| 36 | DO 103 I=3,IDO,2 |
---|
| 37 | IC = IDP2-I |
---|
| 38 | M2 = M2S |
---|
| 39 | DO 1003 M1=1,M1D,IM1 |
---|
| 40 | M2 = M2+IM2 |
---|
| 41 | CH(M2,I-1,1,K) = ((WA1(I-2)*CC(M1,I-1,K,2)+WA1(I-1)* & |
---|
| 42 | & CC(M1,I,K,2))+(WA3(I-2)*CC(M1,I-1,K,4)+WA3(I-1)* & |
---|
| 43 | & CC(M1,I,K,4)))+(CC(M1,I-1,K,1)+(WA2(I-2)*CC(M1,I-1,K,3)+ & |
---|
| 44 | & WA2(I-1)*CC(M1,I,K,3))) |
---|
| 45 | CH(M2,IC-1,4,K) = (CC(M1,I-1,K,1)+(WA2(I-2)*CC(M1,I-1,K,3)+ & |
---|
| 46 | & WA2(I-1)*CC(M1,I,K,3)))-((WA1(I-2)*CC(M1,I-1,K,2)+ & |
---|
| 47 | & WA1(I-1)*CC(M1,I,K,2))+(WA3(I-2)*CC(M1,I-1,K,4)+ & |
---|
| 48 | & WA3(I-1)*CC(M1,I,K,4))) |
---|
| 49 | CH(M2,I,1,K) = ((WA1(I-2)*CC(M1,I,K,2)-WA1(I-1)* & |
---|
| 50 | & CC(M1,I-1,K,2))+(WA3(I-2)*CC(M1,I,K,4)-WA3(I-1)* & |
---|
| 51 | & CC(M1,I-1,K,4)))+(CC(M1,I,K,1)+(WA2(I-2)*CC(M1,I,K,3)- & |
---|
| 52 | & WA2(I-1)*CC(M1,I-1,K,3))) |
---|
| 53 | CH(M2,IC,4,K) = ((WA1(I-2)*CC(M1,I,K,2)-WA1(I-1)* & |
---|
| 54 | & CC(M1,I-1,K,2))+(WA3(I-2)*CC(M1,I,K,4)-WA3(I-1)* & |
---|
| 55 | & CC(M1,I-1,K,4)))-(CC(M1,I,K,1)+(WA2(I-2)*CC(M1,I,K,3)- & |
---|
| 56 | & WA2(I-1)*CC(M1,I-1,K,3))) |
---|
| 57 | CH(M2,I-1,3,K) = ((WA1(I-2)*CC(M1,I,K,2)-WA1(I-1)* & |
---|
| 58 | & CC(M1,I-1,K,2))-(WA3(I-2)*CC(M1,I,K,4)-WA3(I-1)* & |
---|
| 59 | & CC(M1,I-1,K,4)))+(CC(M1,I-1,K,1)-(WA2(I-2)*CC(M1,I-1,K,3)+ & |
---|
| 60 | & WA2(I-1)*CC(M1,I,K,3))) |
---|
| 61 | CH(M2,IC-1,2,K) = (CC(M1,I-1,K,1)-(WA2(I-2)*CC(M1,I-1,K,3)+ & |
---|
| 62 | & WA2(I-1)*CC(M1,I,K,3)))-((WA1(I-2)*CC(M1,I,K,2)-WA1(I-1)* & |
---|
| 63 | & CC(M1,I-1,K,2))-(WA3(I-2)*CC(M1,I,K,4)-WA3(I-1)* & |
---|
| 64 | & CC(M1,I-1,K,4))) |
---|
| 65 | CH(M2,I,3,K) = ((WA3(I-2)*CC(M1,I-1,K,4)+WA3(I-1)* & |
---|
| 66 | & CC(M1,I,K,4))-(WA1(I-2)*CC(M1,I-1,K,2)+WA1(I-1)* & |
---|
| 67 | & CC(M1,I,K,2)))+(CC(M1,I,K,1)-(WA2(I-2)*CC(M1,I,K,3)- & |
---|
| 68 | & WA2(I-1)*CC(M1,I-1,K,3))) |
---|
| 69 | CH(M2,IC,2,K) = ((WA3(I-2)*CC(M1,I-1,K,4)+WA3(I-1)* & |
---|
| 70 | & CC(M1,I,K,4))-(WA1(I-2)*CC(M1,I-1,K,2)+WA1(I-1)* & |
---|
| 71 | & CC(M1,I,K,2)))-(CC(M1,I,K,1)-(WA2(I-2)*CC(M1,I,K,3)- & |
---|
| 72 | & WA2(I-1)*CC(M1,I-1,K,3))) |
---|
| 73 | 1003 CONTINUE |
---|
| 74 | 103 CONTINUE |
---|
| 75 | 104 END DO |
---|
| 76 | IF (MOD(IDO,2) .EQ. 1) RETURN |
---|
| 77 | 105 CONTINUE |
---|
| 78 | DO 106 K=1,L1 |
---|
| 79 | M2 = M2S |
---|
| 80 | DO 1006 M1=1,M1D,IM1 |
---|
| 81 | M2 = M2+IM2 |
---|
| 82 | CH(M2,IDO,1,K) = (HSQT2*(CC(M1,IDO,K,2)-CC(M1,IDO,K,4)))+ & |
---|
| 83 | & CC(M1,IDO,K,1) |
---|
| 84 | CH(M2,IDO,3,K) = CC(M1,IDO,K,1)-(HSQT2*(CC(M1,IDO,K,2)- & |
---|
| 85 | & CC(M1,IDO,K,4))) |
---|
| 86 | CH(M2,1,2,K) = (-HSQT2*(CC(M1,IDO,K,2)+CC(M1,IDO,K,4)))- & |
---|
| 87 | & CC(M1,IDO,K,3) |
---|
| 88 | CH(M2,1,4,K) = (-HSQT2*(CC(M1,IDO,K,2)+CC(M1,IDO,K,4)))+ & |
---|
| 89 | & CC(M1,IDO,K,3) |
---|
| 90 | 1006 CONTINUE |
---|
| 91 | 106 END DO |
---|
| 92 | 107 RETURN |
---|
| 93 | END |
---|