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