1 |
guez |
3 |
SUBROUTINE ini_undefSTD(nlevSTD,itap, |
2 |
|
|
$ ecrit_day,ecrit_mth, |
3 |
|
|
$ tnondef,tsumSTD) |
4 |
|
|
use dimens_m |
5 |
|
|
use dimphy |
6 |
|
|
IMPLICIT none |
7 |
|
|
c |
8 |
|
|
c==================================================================== |
9 |
|
|
c |
10 |
|
|
c I. Musat : 09.2004 |
11 |
|
|
c |
12 |
|
|
c Initialisation - a des frequences differentes : |
13 |
|
|
c |
14 |
|
|
c 1) des variables moyennees sur la journee "day" ou sur le mois "mth" |
15 |
|
|
c calculees a partir des valeurs "instantannees" de la physique |
16 |
|
|
c |
17 |
|
|
c 2) des variables moyennes mensuelles "NMC" calculees a partir des val. |
18 |
|
|
c toutes les 6 heures |
19 |
|
|
c |
20 |
|
|
c nout=1 !var. journaliere "day" moyenne sur tous les pas de temps |
21 |
|
|
c ! de la physique |
22 |
|
|
c nout=2 !var. mensuelle "mth" moyennee sur tous les pas de temps |
23 |
|
|
c ! de la physique |
24 |
|
|
c nout=3 !var. mensuelle "NMC" moyennee toutes les 6heures |
25 |
|
|
c |
26 |
|
|
c |
27 |
|
|
c NB: mettre "inst(X)" dans le write_histXXX.h ! |
28 |
|
|
c==================================================================== |
29 |
|
|
c |
30 |
|
|
integer jjmp1 |
31 |
|
|
parameter (jjmp1=jjm+1-1/jjm) |
32 |
|
|
c variables Input/Output |
33 |
|
|
INTEGER, intent(in):: nlevSTD |
34 |
|
|
integer klevSTD, itap |
35 |
|
|
PARAMETER(klevSTD=17) |
36 |
|
|
INTEGER ecrit_day,ecrit_mth |
37 |
|
|
c |
38 |
|
|
c variables locales |
39 |
|
|
INTEGER i, k, nout |
40 |
|
|
PARAMETER(nout=3) !nout=1 day/nout=2 mth/nout=3 NMC |
41 |
|
|
c |
42 |
|
|
c variables Output |
43 |
|
|
REAL tnondef(klon,klevSTD,nout) |
44 |
|
|
REAL tsumSTD(klon,klevSTD,nout) |
45 |
|
|
c |
46 |
|
|
c initialisation variables journalieres en debut de journee |
47 |
|
|
c |
48 |
|
|
IF(MOD(itap,ecrit_day).EQ.1.) THEN |
49 |
|
|
DO k=1, nlevSTD |
50 |
|
|
DO i=1, klon |
51 |
|
|
tnondef(i,k,1)=0. |
52 |
|
|
tsumSTD(i,k,1)=0. |
53 |
|
|
ENDDO !i |
54 |
|
|
ENDDO !k |
55 |
|
|
ENDIF |
56 |
|
|
c |
57 |
|
|
c initialisation variables mensuelles (calculees a chaque pas de temps) |
58 |
|
|
c en debut de mois : nout=2 |
59 |
|
|
c |
60 |
|
|
IF(MOD(itap,ecrit_mth).EQ.1.) THEN |
61 |
|
|
c |
62 |
|
|
DO k=1, nlevSTD |
63 |
|
|
DO i=1, klon |
64 |
|
|
tnondef(i,k,2)=0. |
65 |
|
|
tsumSTD(i,k,2)=0. |
66 |
|
|
ENDDO !i |
67 |
|
|
ENDDO !k |
68 |
|
|
c |
69 |
|
|
c initialisation variables mensuelles - runs type Amip - (calculees toutes les 6h) |
70 |
|
|
c en debut de mois : nout = 3 |
71 |
|
|
c |
72 |
|
|
DO k=1, nlevSTD |
73 |
|
|
DO i=1, klon |
74 |
|
|
tnondef(i,k,3)=0. |
75 |
|
|
tsumSTD(i,k,3)=0. |
76 |
|
|
ENDDO !i |
77 |
|
|
ENDDO !k |
78 |
|
|
c |
79 |
|
|
ENDIF |
80 |
|
|
c |
81 |
|
|
RETURN |
82 |
|
|
END |