| 1 | SUBROUTINE ini_undefSTD(nlevSTD,itap, |
|---|
| 2 | $ dtime,ecrit_day,ecrit_mth, |
|---|
| 3 | $ tnondef,tsumSTD) |
|---|
| 4 | IMPLICIT none |
|---|
| 5 | c |
|---|
| 6 | c==================================================================== |
|---|
| 7 | c |
|---|
| 8 | c I. Musat : 09.2004 |
|---|
| 9 | c |
|---|
| 10 | c Initialisation - a des frequences differentes : |
|---|
| 11 | c |
|---|
| 12 | c 1) des variables moyennees sur la journee "day" ou sur le mois "mth" |
|---|
| 13 | c calculees a partir des valeurs "instantannees" de la physique |
|---|
| 14 | c |
|---|
| 15 | c 2) des variables moyennes mensuelles "NMC" calculees a partir des val. |
|---|
| 16 | c toutes les 6 heures |
|---|
| 17 | c |
|---|
| 18 | c nout=1 !var. journaliere "day" moyenne sur tous les pas de temps |
|---|
| 19 | c ! de la physique |
|---|
| 20 | c nout=2 !var. mensuelle "mth" moyennee sur tous les pas de temps |
|---|
| 21 | c ! de la physique |
|---|
| 22 | c nout=3 !var. mensuelle "NMC" moyennee toutes les 6heures |
|---|
| 23 | c |
|---|
| 24 | c |
|---|
| 25 | c NB: mettre "inst(X)" dans le write_histXXX.h ! |
|---|
| 26 | c==================================================================== |
|---|
| 27 | c |
|---|
| 28 | #include "dimensions.h" |
|---|
| 29 | integer jjmp1 |
|---|
| 30 | parameter (jjmp1=jjm+1-1/jjm) |
|---|
| 31 | #include "dimphy.h" |
|---|
| 32 | c variables Input/Output |
|---|
| 33 | INTEGER nlevSTD, klevSTD, itap |
|---|
| 34 | PARAMETER(klevSTD=17) |
|---|
| 35 | REAL dtime |
|---|
| 36 | REAL 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,NINT(ecrit_day/dtime)).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,NINT(ecrit_mth/dtime)).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 |
|---|