1 | SUBROUTINE inifgn(dv) |
---|
2 | c |
---|
3 | c ... H.Upadyaya , O.Sharma ... |
---|
4 | c |
---|
5 | IMPLICIT NONE |
---|
6 | c |
---|
7 | #include "dimensions.h" |
---|
8 | #include "paramet.h" |
---|
9 | #include "comgeom.h" |
---|
10 | |
---|
11 | c |
---|
12 | REAL vec(iim,iim),vec1(iim,iim) |
---|
13 | REAL dlonu(iim),dlonv(iim) |
---|
14 | REAL du(iim),dv(iim),d(iim) |
---|
15 | REAL pi |
---|
16 | INTEGER i,j,k,imm1,nrot |
---|
17 | C |
---|
18 | #include "coefils.h" |
---|
19 | c |
---|
20 | EXTERNAL SSUM, acc,eigen,jacobi |
---|
21 | REAL SSUM |
---|
22 | c |
---|
23 | |
---|
24 | imm1 = iim -1 |
---|
25 | pi = 2.* ASIN(1.) |
---|
26 | C |
---|
27 | DO 5 i=1,iim |
---|
28 | dlonu(i)= xprimu( i ) |
---|
29 | dlonv(i)= xprimv( i ) |
---|
30 | 5 CONTINUE |
---|
31 | |
---|
32 | DO 12 i=1,iim |
---|
33 | sddv(i) = SQRT(dlonv(i)) |
---|
34 | sddu(i) = SQRT(dlonu(i)) |
---|
35 | unsddu(i) = 1./sddu(i) |
---|
36 | unsddv(i) = 1./sddv(i) |
---|
37 | 12 CONTINUE |
---|
38 | C |
---|
39 | DO 17 j=1,iim |
---|
40 | DO 17 i=1,iim |
---|
41 | vec(i,j) = 0. |
---|
42 | vec1(i,j) = 0. |
---|
43 | eignfnv(i,j) = 0. |
---|
44 | eignfnu(i,j) = 0. |
---|
45 | 17 CONTINUE |
---|
46 | c |
---|
47 | c |
---|
48 | eignfnv(1,1) = -1. |
---|
49 | eignfnv(iim,1) = 1. |
---|
50 | DO 20 i=1,imm1 |
---|
51 | eignfnv(i+1,i+1)= -1. |
---|
52 | eignfnv(i,i+1) = 1. |
---|
53 | 20 CONTINUE |
---|
54 | DO 25 j=1,iim |
---|
55 | DO 25 i=1,iim |
---|
56 | eignfnv(i,j) = eignfnv(i,j)/(sddu(i)*sddv(j)) |
---|
57 | 25 CONTINUE |
---|
58 | DO 30 j=1,iim |
---|
59 | DO 30 i=1,iim |
---|
60 | eignfnu(i,j) = -eignfnv(j,i) |
---|
61 | 30 CONTINUE |
---|
62 | c |
---|
63 | #ifdef CRAY |
---|
64 | CALL MXM(eignfnu,iim,eignfnv,iim,vec ,iim) |
---|
65 | CALL MXM(eignfnv,iim,eignfnu,iim,vec1,iim) |
---|
66 | #else |
---|
67 | DO j = 1, iim |
---|
68 | DO i = 1, iim |
---|
69 | vec (i,j) = 0.0 |
---|
70 | vec1(i,j) = 0.0 |
---|
71 | DO k = 1, iim |
---|
72 | vec (i,j) = vec(i,j) + eignfnu(i,k) * eignfnv(k,j) |
---|
73 | vec1(i,j) = vec1(i,j) + eignfnv(i,k) * eignfnu(k,j) |
---|
74 | ENDDO |
---|
75 | ENDDO |
---|
76 | ENDDO |
---|
77 | #endif |
---|
78 | |
---|
79 | c |
---|
80 | CALL jacobi(vec,iim,iim,dv,eignfnv,nrot) |
---|
81 | CALL acc(eignfnv,d,iim) |
---|
82 | CALL eigen_sort(dv,eignfnv,iim,iim) |
---|
83 | c |
---|
84 | CALL jacobi(vec1,iim,iim,du,eignfnu,nrot) |
---|
85 | CALL acc(eignfnu,d,iim) |
---|
86 | CALL eigen_sort(du,eignfnu,iim,iim) |
---|
87 | |
---|
88 | cc ancienne version avec appels IMSL |
---|
89 | c |
---|
90 | c CALL MXM(eignfnu,iim,eignfnv,iim,vec,iim) |
---|
91 | c CALL MXM(eignfnv,iim,eignfnu,iim,vec1,iim) |
---|
92 | c CALL EVCSF(iim,vec,iim,dv,eignfnv,iim) |
---|
93 | c CALL acc(eignfnv,d,iim) |
---|
94 | c CALL eigen(eignfnv,dv) |
---|
95 | c |
---|
96 | c CALL EVCSF(iim,vec1,iim,du,eignfnu,iim) |
---|
97 | c CALL acc(eignfnu,d,iim) |
---|
98 | c CALL eigen(eignfnu,du) |
---|
99 | |
---|
100 | RETURN |
---|
101 | END |
---|
102 | |
---|