/[lmdze]/trunk/filtrez/inifgn.f
ViewVC logotype

Annotation of /trunk/filtrez/inifgn.f

Parent Directory Parent Directory | Revision Log Revision Log


Revision 139 - (hide annotations)
Tue May 26 17:46:03 2015 UTC (8 years, 11 months ago) by guez
Original Path: trunk/Sources/filtrez/inifgn.f
File size: 1896 byte(s)
dynetat0 read rlonu, rlatu, rlonv, rlatv, cu_2d, cv_2d, aire_2d from
"start.nc" and then these variables were overwritten by
inigeom. Corrected this. Now, inigeom does not compute rlonu, rlatu,
rlonv and rlatv. Moreover, cu_2d, cv_2d, aire_2d are not written to
"restart.nc". Since xprimu, xprimv, xprimm025, xprimp025, rlatu1,
rlatu2, yprimu1, yprimu2 are computed at the same time as rlonu,
rlatu, rlonv, rlatv, and since it would not be convenient to separate
those computations, we decide to write xprimu, xprimv, xprimm025,
xprimp025, rlatu1, rlatu2, yprimu1, yprimu2 into "restart.nc", read
them from "start.nc" and not compute them in inigeom. So, in summary,
"start.nc" contains all the coordinates and their derivatives, and
inigeom only computes the 2D-variables.

Technical details:

Moved variables rlatu, rlonv, rlonu, rlatv, xprimu, xprimv from module
comgeom to module dynetat0_m. Upgraded local variables rlatu1,
yprimu1, rlatu2, yprimu2, xprimm025, xprimp025 of procedure inigeom to
variables of module dynetat0_m.

Removed unused local variable yprimu of procedure inigeom and
corresponding argument yyprimu of fyhyp.

Moved variables clat, clon, grossismx, grossismy, dzoomx, dzoomy,
taux, tauy from module serre to module dynetat0_m (since they are read
from "start.nc"). The default values are now defined in read_serre
instead of in the declarations. Changed name of module serre to
read_serre_m, no more module variable here.

The calls to fxhyp and fyhyp are moved from inigeom to etat0.

Side effects in programs other than gcm: etat0 and read_serre write
variables of module dynetat0; the programs test_fxyp and
test_inter_barxy need more source files.

Removed unused arguments len and nd of cv3_tracer. Removed unused
argument PPSOL of LWU.

Bug fix in test_inter_barxy: forgotten call to read_serre.

1 guez 113 module inifgn_m
2 guez 3
3 guez 113 IMPLICIT NONE
4 guez 3
5 guez 113 contains
6 guez 3
7 guez 113 SUBROUTINE inifgn(dv)
8 guez 3
9 guez 113 ! From LMDZ4/libf/filtrez/inifgn.F, v 1.1.1.1 2004/05/19 12:53:09
10 guez 3
11 guez 113 ! H.Upadyaya, O.Sharma
12 guez 3
13 guez 132 USE coefils, ONLY: eignfnu, eignfnv, sddu, sddv, unsddu, unsddv
14 guez 113 USE dimens_m, ONLY: iim
15 guez 139 USE dynetat0_m, ONLY: xprimu, xprimv
16 guez 132 use numer_rec_95, only: jacobi
17 guez 3
18 guez 132 real, intent(out):: dv(iim)
19 guez 81
20 guez 113 ! Local:
21     REAL vec(iim, iim), vec1(iim, iim)
22     REAL du(iim)
23     real d(iim)
24     REAL pi
25     INTEGER i, j, k, imm1, nrot
26 guez 81
27 guez 132 EXTERNAL acc
28 guez 81
29 guez 113 !----------------------------------------------------------------
30 guez 81
31 guez 113 imm1 = iim - 1
32     pi = 2.*asin(1.)
33 guez 81
34 guez 113 DO i = 1, iim
35 guez 121 sddv(i) = sqrt(xprimv(i))
36     sddu(i) = sqrt(xprimu(i))
37 guez 113 unsddu(i) = 1./sddu(i)
38     unsddv(i) = 1./sddv(i)
39 guez 81 END DO
40    
41 guez 113 DO j = 1, iim
42     DO i = 1, iim
43     vec(i, j) = 0.
44     vec1(i, j) = 0.
45     eignfnv(i, j) = 0.
46     eignfnu(i, j) = 0.
47     END DO
48     END DO
49 guez 81
50 guez 113 eignfnv(1, 1) = -1.
51     eignfnv(iim, 1) = 1.
52     DO i = 1, imm1
53     eignfnv(i+1, i+1) = -1.
54     eignfnv(i, i+1) = 1.
55 guez 81 END DO
56 guez 113 DO j = 1, iim
57     DO i = 1, iim
58     eignfnv(i, j) = eignfnv(i, j)/(sddu(i)*sddv(j))
59     END DO
60 guez 81 END DO
61 guez 113 DO j = 1, iim
62     DO i = 1, iim
63     eignfnu(i, j) = -eignfnv(j, i)
64     END DO
65     END DO
66 guez 81
67 guez 113 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     END DO
75     END DO
76 guez 81 END DO
77    
78 guez 132 CALL jacobi(vec, dv, eignfnv, nrot)
79 guez 113 CALL acc(eignfnv, d, iim)
80     CALL eigen_sort(dv, eignfnv, iim, iim)
81 guez 81
82 guez 132 CALL jacobi(vec1, du, eignfnu, nrot)
83 guez 113 CALL acc(eignfnu, d, iim)
84     CALL eigen_sort(du, eignfnu, iim, iim)
85 guez 81
86 guez 113 END SUBROUTINE inifgn
87 guez 81
88 guez 113 end module inifgn_m

  ViewVC Help
Powered by ViewVC 1.1.21