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

Contents of /trunk/filtrez/inifgn.f

Parent Directory Parent Directory | Revision Log Revision Log


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

  ViewVC Help
Powered by ViewVC 1.1.21