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: mradf3.f,v 1.2 2004/06/15 21:29:20 rodney Exp $ |
---|
11 | ! |
---|
12 | !CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC |
---|
13 | |
---|
14 | SUBROUTINE MRADF3 (M,IDO,L1,CC,IM1,IN1,CH,IM2,IN2,WA1,WA2) |
---|
15 | REAL CH(IN2,IDO,3,L1) ,CC(IN1,IDO,L1,3) , & |
---|
16 | & WA1(IDO) ,WA2(IDO) |
---|
17 | ! |
---|
18 | M1D = (M-1)*IM1+1 |
---|
19 | M2S = 1-IM2 |
---|
20 | ARG=2.*4.*ATAN(1.0)/3. |
---|
21 | TAUR=COS(ARG) |
---|
22 | TAUI=SIN(ARG) |
---|
23 | DO 101 K=1,L1 |
---|
24 | M2 = M2S |
---|
25 | DO 1001 M1=1,M1D,IM1 |
---|
26 | M2 = M2+IM2 |
---|
27 | CH(M2,1,1,K) = CC(M1,1,K,1)+(CC(M1,1,K,2)+CC(M1,1,K,3)) |
---|
28 | CH(M2,1,3,K) = TAUI*(CC(M1,1,K,3)-CC(M1,1,K,2)) |
---|
29 | CH(M2,IDO,2,K) = CC(M1,1,K,1)+TAUR* & |
---|
30 | & (CC(M1,1,K,2)+CC(M1,1,K,3)) |
---|
31 | 1001 CONTINUE |
---|
32 | 101 END DO |
---|
33 | IF (IDO .EQ. 1) RETURN |
---|
34 | IDP2 = IDO+2 |
---|
35 | DO 103 K=1,L1 |
---|
36 | DO 102 I=3,IDO,2 |
---|
37 | IC = IDP2-I |
---|
38 | M2 = M2S |
---|
39 | DO 1002 M1=1,M1D,IM1 |
---|
40 | M2 = M2+IM2 |
---|
41 | CH(M2,I-1,1,K) = CC(M1,I-1,K,1)+((WA1(I-2)*CC(M1,I-1,K,2)+ & |
---|
42 | & WA1(I-1)*CC(M1,I,K,2))+(WA2(I-2)*CC(M1,I-1,K,3)+WA2(I-1)* & |
---|
43 | & CC(M1,I,K,3))) |
---|
44 | CH(M2,I,1,K) = CC(M1,I,K,1)+((WA1(I-2)*CC(M1,I,K,2)- & |
---|
45 | & WA1(I-1)*CC(M1,I-1,K,2))+(WA2(I-2)*CC(M1,I,K,3)-WA2(I-1)* & |
---|
46 | & CC(M1,I-1,K,3))) |
---|
47 | CH(M2,I-1,3,K) = (CC(M1,I-1,K,1)+TAUR*((WA1(I-2)* & |
---|
48 | & CC(M1,I-1,K,2)+WA1(I-1)*CC(M1,I,K,2))+(WA2(I-2)* & |
---|
49 | & CC(M1,I-1,K,3)+WA2(I-1)*CC(M1,I,K,3))))+(TAUI*((WA1(I-2)* & |
---|
50 | & CC(M1,I,K,2)-WA1(I-1)*CC(M1,I-1,K,2))-(WA2(I-2)* & |
---|
51 | & CC(M1,I,K,3)-WA2(I-1)*CC(M1,I-1,K,3)))) |
---|
52 | CH(M2,IC-1,2,K) = (CC(M1,I-1,K,1)+TAUR*((WA1(I-2)* & |
---|
53 | & CC(M1,I-1,K,2)+WA1(I-1)*CC(M1,I,K,2))+(WA2(I-2)* & |
---|
54 | & CC(M1,I-1,K,3)+WA2(I-1)*CC(M1,I,K,3))))-(TAUI*((WA1(I-2)* & |
---|
55 | & CC(M1,I,K,2)-WA1(I-1)*CC(M1,I-1,K,2))-(WA2(I-2)* & |
---|
56 | & CC(M1,I,K,3)-WA2(I-1)*CC(M1,I-1,K,3)))) |
---|
57 | CH(M2,I,3,K) = (CC(M1,I,K,1)+TAUR*((WA1(I-2)*CC(M1,I,K,2)- & |
---|
58 | & WA1(I-1)*CC(M1,I-1,K,2))+(WA2(I-2)*CC(M1,I,K,3)-WA2(I-1)* & |
---|
59 | & CC(M1,I-1,K,3))))+(TAUI*((WA2(I-2)*CC(M1,I-1,K,3)+WA2(I-1)*& |
---|
60 | & CC(M1,I,K,3))-(WA1(I-2)*CC(M1,I-1,K,2)+WA1(I-1)* & |
---|
61 | & CC(M1,I,K,2)))) |
---|
62 | CH(M2,IC,2,K) = (TAUI*((WA2(I-2)*CC(M1,I-1,K,3)+WA2(I-1)* & |
---|
63 | & CC(M1,I,K,3))-(WA1(I-2)*CC(M1,I-1,K,2)+WA1(I-1)* & |
---|
64 | & CC(M1,I,K,2))))-(CC(M1,I,K,1)+TAUR*((WA1(I-2)*CC(M1,I,K,2)-& |
---|
65 | & WA1(I-1)*CC(M1,I-1,K,2))+(WA2(I-2)*CC(M1,I,K,3)-WA2(I-1)* & |
---|
66 | & CC(M1,I-1,K,3)))) |
---|
67 | 1002 CONTINUE |
---|
68 | 102 CONTINUE |
---|
69 | 103 END DO |
---|
70 | RETURN |
---|
71 | END |
---|