GCC Code Coverage Report
Directory: ./ Exec Total Coverage
File: filtrez/inifgn.F Lines: 46 46 100.0 %
Date: 2023-06-30 12:51:15 Branches: 24 24 100.0 %

Line Branch Exec Source
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
1
      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
33
      DO 5 i=1,iim
31
32
       dlonu(i)=  xprimu( i )
32
32
       dlonv(i)=  xprimv( i )
33
1
   5  CONTINUE
34
35
33
      DO 12 i=1,iim
36
32
      sddv(i)   = SQRT(dlonv(i))
37
32
      sddu(i)   = SQRT(dlonu(i))
38
32
      unsddu(i) = 1./sddu(i)
39
32
      unsddv(i) = 1./sddv(i)
40
1
  12  CONTINUE
41
C
42
33
      DO 17 j=1,iim
43
1057
      DO 17 i=1,iim
44
1024
      vec(i,j)     = 0.
45
1024
      vec1(i,j)    = 0.
46
1024
      eignfnv(i,j) = 0.
47
1024
      eignfnu(i,j) = 0.
48
32
  17  CONTINUE
49
c
50
c
51
1
      eignfnv(1,1)    = -1.
52
1
      eignfnv(iim,1)  =  1.
53
32
      DO 20 i=1,imm1
54
31
      eignfnv(i+1,i+1)= -1.
55
31
      eignfnv(i,i+1)  =  1.
56
1
  20  CONTINUE
57
33
      DO 25 j=1,iim
58
1057
      DO 25 i=1,iim
59
1024
      eignfnv(i,j) = eignfnv(i,j)/(sddu(i)*sddv(j))
60
32
  25  CONTINUE
61
33
      DO 30 j=1,iim
62
1057
      DO 30 i=1,iim
63
1024
      eignfnu(i,j) = -eignfnv(j,i)
64
32
  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
33
      DO j = 1, iim
71
1057
      DO i = 1, iim
72
1024
        vec (i,j) = 0.0
73
1024
        vec1(i,j) = 0.0
74
33824
       DO k = 1, iim
75
32768
        vec (i,j) = vec(i,j)  + eignfnu(i,k) * eignfnv(k,j)
76
33792
        vec1(i,j) = vec1(i,j) + eignfnv(i,k) * eignfnu(k,j)
77
       ENDDO
78
      ENDDO
79
      ENDDO
80
#endif
81
82
c
83
1
      CALL jacobi(vec,iim,iim,dv,eignfnv,nrot)
84
1
      CALL acc(eignfnv,d,iim)
85
1
      CALL eigen_sort(dv,eignfnv,iim,iim)
86
c
87
1
      CALL jacobi(vec1,iim,iim,du,eignfnu,nrot)
88
1
      CALL acc(eignfnu,d,iim)
89
1
      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
1
      RETURN
104
      END
105