/[lmdze]/trunk/dyn3d/principal_cshift.f
ViewVC logotype

Annotation of /trunk/dyn3d/principal_cshift.f

Parent Directory Parent Directory | Revision Log Revision Log


Revision 139 - (hide annotations)
Tue May 26 17:46:03 2015 UTC (9 years ago) by guez
Original Path: trunk/Sources/dyn3d/principal_cshift.f
File size: 1113 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 124 module principal_cshift_m
2    
3     implicit none
4    
5     contains
6    
7     subroutine principal_cshift(is2, xlon, xprimm)
8    
9 guez 125 ! Add or subtract 2 pi so that xlon is near [-pi, pi], then cshift
10     ! so that xlon is in ascending order. Make the same cshift on
11     ! xprimm.
12    
13 guez 124 USE dimens_m, ONLY: iim
14 guez 139 use dynetat0_m, only: clon
15 guez 124 use nr_util, only: twopi
16    
17     integer, intent(in):: is2
18     real, intent(inout):: xlon(:), xprimm(:) ! (iim + 1)
19    
20     !-----------------------------------------------------
21    
22     if (is2 /= 0) then
23     IF (clon <= 0.) THEN
24     IF (is2 /= 1) THEN
25     xlon(:is2 - 1) = xlon(:is2 - 1) + twopi
26     xlon(:iim) = cshift(xlon(:iim), shift = is2 - 1)
27     xprimm(:iim) = cshift(xprimm(:iim), shift = is2 - 1)
28     END IF
29     else
30     xlon(is2 + 1:iim) = xlon(is2 + 1:iim) - twopi
31     xlon(:iim) = cshift(xlon(:iim), shift = is2)
32     xprimm(:iim) = cshift(xprimm(:iim), shift = is2)
33     end IF
34     end if
35    
36     xlon(iim + 1) = xlon(1) + twopi
37     xprimm(iim + 1) = xprimm(1)
38    
39     end subroutine principal_cshift
40    
41     end module principal_cshift_m

  ViewVC Help
Powered by ViewVC 1.1.21