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: mradf5.f,v 1.2 2004/06/15 21:29:20 rodney Exp $ |
---|
11 | ! |
---|
12 | !CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC |
---|
13 | |
---|
14 | SUBROUTINE MRADF5 (M,IDO,L1,CC,IM1,IN1,CH,IM2,IN2, & |
---|
15 | & WA1,WA2,WA3,WA4) |
---|
16 | REAL CC(IN1,IDO,L1,5) ,CH(IN2,IDO,5,L1) , & |
---|
17 | & WA1(IDO) ,WA2(IDO) ,WA3(IDO) ,WA4(IDO) |
---|
18 | ! |
---|
19 | M1D = (M-1)*IM1+1 |
---|
20 | M2S = 1-IM2 |
---|
21 | ARG=2.*4.*ATAN(1.0)/5. |
---|
22 | TR11=COS(ARG) |
---|
23 | TI11=SIN(ARG) |
---|
24 | TR12=COS(2.*ARG) |
---|
25 | TI12=SIN(2.*ARG) |
---|
26 | DO 101 K=1,L1 |
---|
27 | M2 = M2S |
---|
28 | DO 1001 M1=1,M1D,IM1 |
---|
29 | M2 = M2+IM2 |
---|
30 | CH(M2,1,1,K) = CC(M1,1,K,1)+(CC(M1,1,K,5)+CC(M1,1,K,2))+ & |
---|
31 | & (CC(M1,1,K,4)+CC(M1,1,K,3)) |
---|
32 | CH(M2,IDO,2,K) = CC(M1,1,K,1)+TR11*(CC(M1,1,K,5)+CC(M1,1,K,2))+& |
---|
33 | & TR12*(CC(M1,1,K,4)+CC(M1,1,K,3)) |
---|
34 | CH(M2,1,3,K) = TI11*(CC(M1,1,K,5)-CC(M1,1,K,2))+TI12* & |
---|
35 | & (CC(M1,1,K,4)-CC(M1,1,K,3)) |
---|
36 | CH(M2,IDO,4,K) = CC(M1,1,K,1)+TR12*(CC(M1,1,K,5)+CC(M1,1,K,2))+& |
---|
37 | & TR11*(CC(M1,1,K,4)+CC(M1,1,K,3)) |
---|
38 | CH(M2,1,5,K) = TI12*(CC(M1,1,K,5)-CC(M1,1,K,2))-TI11* & |
---|
39 | & (CC(M1,1,K,4)-CC(M1,1,K,3)) |
---|
40 | 1001 CONTINUE |
---|
41 | 101 END DO |
---|
42 | IF (IDO .EQ. 1) RETURN |
---|
43 | IDP2 = IDO+2 |
---|
44 | DO 103 K=1,L1 |
---|
45 | DO 102 I=3,IDO,2 |
---|
46 | IC = IDP2-I |
---|
47 | M2 = M2S |
---|
48 | DO 1002 M1=1,M1D,IM1 |
---|
49 | M2 = M2+IM2 |
---|
50 | CH(M2,I-1,1,K) = CC(M1,I-1,K,1)+((WA1(I-2)*CC(M1,I-1,K,2)+ & |
---|
51 | & WA1(I-1)*CC(M1,I,K,2))+(WA4(I-2)*CC(M1,I-1,K,5)+WA4(I-1)* & |
---|
52 | & CC(M1,I,K,5)))+((WA2(I-2)*CC(M1,I-1,K,3)+WA2(I-1)* & |
---|
53 | & CC(M1,I,K,3))+(WA3(I-2)*CC(M1,I-1,K,4)+ & |
---|
54 | & WA3(I-1)*CC(M1,I,K,4))) |
---|
55 | CH(M2,I,1,K) = CC(M1,I,K,1)+((WA1(I-2)*CC(M1,I,K,2)- & |
---|
56 | & WA1(I-1)*CC(M1,I-1,K,2))+(WA4(I-2)*CC(M1,I,K,5)-WA4(I-1)* & |
---|
57 | & CC(M1,I-1,K,5)))+((WA2(I-2)*CC(M1,I,K,3)-WA2(I-1)* & |
---|
58 | & CC(M1,I-1,K,3))+(WA3(I-2)*CC(M1,I,K,4)-WA3(I-1)* & |
---|
59 | & CC(M1,I-1,K,4))) |
---|
60 | CH(M2,I-1,3,K) = CC(M1,I-1,K,1)+TR11* & |
---|
61 | & ( WA1(I-2)*CC(M1,I-1,K,2)+WA1(I-1)*CC(M1,I,K,2) & |
---|
62 | & +WA4(I-2)*CC(M1,I-1,K,5)+WA4(I-1)*CC(M1,I,K,5))+TR12* & |
---|
63 | & ( WA2(I-2)*CC(M1,I-1,K,3)+WA2(I-1)*CC(M1,I,K,3) & |
---|
64 | & +WA3(I-2)*CC(M1,I-1,K,4)+WA3(I-1)*CC(M1,I,K,4))+TI11* & |
---|
65 | & ( WA1(I-2)*CC(M1,I,K,2)-WA1(I-1)*CC(M1,I-1,K,2) & |
---|
66 | & -(WA4(I-2)*CC(M1,I,K,5)-WA4(I-1)*CC(M1,I-1,K,5)))+TI12* & |
---|
67 | & ( WA2(I-2)*CC(M1,I,K,3)-WA2(I-1)*CC(M1,I-1,K,3) & |
---|
68 | & -(WA3(I-2)*CC(M1,I,K,4)-WA3(I-1)*CC(M1,I-1,K,4))) |
---|
69 | CH(M2,IC-1,2,K) = CC(M1,I-1,K,1)+TR11* & |
---|
70 | & ( WA1(I-2)*CC(M1,I-1,K,2)+WA1(I-1)*CC(M1,I,K,2) & |
---|
71 | & +WA4(I-2)*CC(M1,I-1,K,5)+WA4(I-1)*CC(M1,I,K,5))+TR12* & |
---|
72 | & ( WA2(I-2)*CC(M1,I-1,K,3)+WA2(I-1)*CC(M1,I,K,3) & |
---|
73 | & +WA3(I-2)*CC(M1,I-1,K,4)+WA3(I-1)*CC(M1,I,K,4))-(TI11* & |
---|
74 | & ( WA1(I-2)*CC(M1,I,K,2)-WA1(I-1)*CC(M1,I-1,K,2) & |
---|
75 | & -(WA4(I-2)*CC(M1,I,K,5)-WA4(I-1)*CC(M1,I-1,K,5)))+TI12* & |
---|
76 | & ( WA2(I-2)*CC(M1,I,K,3)-WA2(I-1)*CC(M1,I-1,K,3) & |
---|
77 | & -(WA3(I-2)*CC(M1,I,K,4)-WA3(I-1)*CC(M1,I-1,K,4)))) |
---|
78 | CH(M2,I,3,K) = (CC(M1,I,K,1)+TR11*((WA1(I-2)*CC(M1,I,K,2)- & |
---|
79 | & WA1(I-1)*CC(M1,I-1,K,2))+(WA4(I-2)*CC(M1,I,K,5)-WA4(I-1)* & |
---|
80 | & CC(M1,I-1,K,5)))+TR12*((WA2(I-2)*CC(M1,I,K,3)-WA2(I-1)* & |
---|
81 | & CC(M1,I-1,K,3))+(WA3(I-2)*CC(M1,I,K,4)-WA3(I-1)* & |
---|
82 | & CC(M1,I-1,K,4))))+(TI11*((WA4(I-2)*CC(M1,I-1,K,5)+ & |
---|
83 | & WA4(I-1)*CC(M1,I,K,5))-(WA1(I-2)*CC(M1,I-1,K,2)+WA1(I-1)* & |
---|
84 | & CC(M1,I,K,2)))+TI12*((WA3(I-2)*CC(M1,I-1,K,4)+WA3(I-1)* & |
---|
85 | & CC(M1,I,K,4))-(WA2(I-2)*CC(M1,I-1,K,3)+WA2(I-1)* & |
---|
86 | & CC(M1,I,K,3)))) |
---|
87 | CH(M2,IC,2,K) = (TI11*((WA4(I-2)*CC(M1,I-1,K,5)+WA4(I-1)* & |
---|
88 | & CC(M1,I,K,5))-(WA1(I-2)*CC(M1,I-1,K,2)+WA1(I-1)* & |
---|
89 | & CC(M1,I,K,2)))+TI12*((WA3(I-2)*CC(M1,I-1,K,4)+WA3(I-1)* & |
---|
90 | & CC(M1,I,K,4))-(WA2(I-2)*CC(M1,I-1,K,3)+WA2(I-1)* & |
---|
91 | & CC(M1,I,K,3))))-(CC(M1,I,K,1)+TR11*((WA1(I-2)*CC(M1,I,K,2)-& |
---|
92 | & WA1(I-1)*CC(M1,I-1,K,2))+(WA4(I-2)*CC(M1,I,K,5)-WA4(I-1)* & |
---|
93 | & CC(M1,I-1,K,5)))+TR12*((WA2(I-2)*CC(M1,I,K,3)-WA2(I-1)* & |
---|
94 | & CC(M1,I-1,K,3))+(WA3(I-2)*CC(M1,I,K,4)-WA3(I-1)* & |
---|
95 | & CC(M1,I-1,K,4)))) |
---|
96 | CH(M2,I-1,5,K) = (CC(M1,I-1,K,1)+TR12*((WA1(I-2)* & |
---|
97 | & CC(M1,I-1,K,2)+WA1(I-1)*CC(M1,I,K,2))+(WA4(I-2)* & |
---|
98 | & CC(M1,I-1,K,5)+WA4(I-1)*CC(M1,I,K,5)))+TR11*((WA2(I-2)* & |
---|
99 | & CC(M1,I-1,K,3)+WA2(I-1)*CC(M1,I,K,3))+(WA3(I-2)* & |
---|
100 | & CC(M1,I-1,K,4)+WA3(I-1)*CC(M1,I,K,4))))+(TI12*((WA1(I-2)* & |
---|
101 | & CC(M1,I,K,2)-WA1(I-1)*CC(M1,I-1,K,2))-(WA4(I-2)* & |
---|
102 | & CC(M1,I,K,5)-WA4(I-1)*CC(M1,I-1,K,5)))-TI11*((WA2(I-2)* & |
---|
103 | & CC(M1,I,K,3)-WA2(I-1)*CC(M1,I-1,K,3))-(WA3(I-2)* & |
---|
104 | & CC(M1,I,K,4)-WA3(I-1)*CC(M1,I-1,K,4)))) |
---|
105 | CH(M2,IC-1,4,K) = (CC(M1,I-1,K,1)+TR12*((WA1(I-2)* & |
---|
106 | & CC(M1,I-1,K,2)+WA1(I-1)*CC(M1,I,K,2))+(WA4(I-2)* & |
---|
107 | & CC(M1,I-1,K,5)+WA4(I-1)*CC(M1,I,K,5)))+TR11*((WA2(I-2)* & |
---|
108 | & CC(M1,I-1,K,3)+WA2(I-1)*CC(M1,I,K,3))+(WA3(I-2)* & |
---|
109 | & CC(M1,I-1,K,4)+WA3(I-1)*CC(M1,I,K,4))))-(TI12*((WA1(I-2)* & |
---|
110 | & CC(M1,I,K,2)-WA1(I-1)*CC(M1,I-1,K,2))-(WA4(I-2)* & |
---|
111 | & CC(M1,I,K,5)-WA4(I-1)*CC(M1,I-1,K,5)))-TI11*((WA2(I-2)* & |
---|
112 | & CC(M1,I,K,3)-WA2(I-1)*CC(M1,I-1,K,3))-(WA3(I-2)* & |
---|
113 | & CC(M1,I,K,4)-WA3(I-1)*CC(M1,I-1,K,4)))) |
---|
114 | CH(M2,I,5,K) = (CC(M1,I,K,1)+TR12*((WA1(I-2)*CC(M1,I,K,2)- & |
---|
115 | & WA1(I-1)*CC(M1,I-1,K,2))+(WA4(I-2)*CC(M1,I,K,5)-WA4(I-1)* & |
---|
116 | & CC(M1,I-1,K,5)))+TR11*((WA2(I-2)*CC(M1,I,K,3)-WA2(I-1)* & |
---|
117 | & CC(M1,I-1,K,3))+(WA3(I-2)*CC(M1,I,K,4)-WA3(I-1)* & |
---|
118 | & CC(M1,I-1,K,4))))+(TI12*((WA4(I-2)*CC(M1,I-1,K,5)+ & |
---|
119 | & WA4(I-1)*CC(M1,I,K,5))-(WA1(I-2)*CC(M1,I-1,K,2)+WA1(I-1)* & |
---|
120 | & CC(M1,I,K,2)))-TI11*((WA3(I-2)*CC(M1,I-1,K,4)+WA3(I-1)* & |
---|
121 | & CC(M1,I,K,4))-(WA2(I-2)*CC(M1,I-1,K,3)+WA2(I-1)* & |
---|
122 | & CC(M1,I,K,3)))) |
---|
123 | CH(M2,IC,4,K) = (TI12*((WA4(I-2)*CC(M1,I-1,K,5)+WA4(I-1)* & |
---|
124 | & CC(M1,I,K,5))-(WA1(I-2)*CC(M1,I-1,K,2)+WA1(I-1)* & |
---|
125 | & CC(M1,I,K,2)))-TI11*((WA3(I-2)*CC(M1,I-1,K,4)+WA3(I-1)* & |
---|
126 | & CC(M1,I,K,4))-(WA2(I-2)*CC(M1,I-1,K,3)+WA2(I-1)* & |
---|
127 | & CC(M1,I,K,3))))-(CC(M1,I,K,1)+TR12*((WA1(I-2)*CC(M1,I,K,2)-& |
---|
128 | & WA1(I-1)*CC(M1,I-1,K,2))+(WA4(I-2)*CC(M1,I,K,5)-WA4(I-1)* & |
---|
129 | & CC(M1,I-1,K,5)))+TR11*((WA2(I-2)*CC(M1,I,K,3)-WA2(I-1)* & |
---|
130 | & CC(M1,I-1,K,3))+(WA3(I-2)*CC(M1,I,K,4)-WA3(I-1)* & |
---|
131 | & CC(M1,I-1,K,4)))) |
---|
132 | 1002 CONTINUE |
---|
133 | 102 CONTINUE |
---|
134 | 103 END DO |
---|
135 | RETURN |
---|
136 | END |
---|