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