1 |
PROGRAM gcm |
PROGRAM gcm |
2 |
|
|
3 |
! General circulation model of LMD |
! General circulation model of LMD |
|
|
|
4 |
! From "gcm.F", version 1.4, 2006/04/04 15:05:16 |
! From "gcm.F", version 1.4, 2006/04/04 15:05:16 |
5 |
|
|
6 |
! Avec coordonnées verticales hybrides, avec nouveaux opérateurs de |
! Avec coordonnées verticales hybrides, avec nouveaux opérateurs de |
14 |
! Pour Van-Leer plus vapeur d'eau saturée : iadv(1)=4 |
! Pour Van-Leer plus vapeur d'eau saturée : iadv(1)=4 |
15 |
! Pour Van-Leer : iadv=10 |
! Pour Van-Leer : iadv=10 |
16 |
|
|
17 |
USE IOIPSL, only: ioconf_calendar, histclo |
use clesphys2, only: read_clesphys2 |
18 |
use dimens_m, only: iim, jjm, llm, nqmx |
use com_io_dyn, only: histid, histvid, histaveid |
|
use dimphy, only: klon |
|
|
use paramet_m, only: ip1jm, ip1jmp1 |
|
19 |
use comconst, only: daysec, cpp, dtvr, g, rad, r, initialize |
use comconst, only: daysec, cpp, dtvr, g, rad, r, initialize |
20 |
use comdissnew, only: lstardis, nitergdiv, nitergrot, niterh, tetagdiv, & |
use comgeom, only: rlatu, aire_2d, cu_2d, cv_2d, rlonv |
|
tetagrot, tetatemp |
|
21 |
use conf_gcm_m, only: day_step, iperiod, anneeref, dayref, iecri, iphysiq, & |
use conf_gcm_m, only: day_step, iperiod, anneeref, dayref, iecri, iphysiq, & |
22 |
nday, raz_date, periodav, conf_gcm |
nday, raz_date, periodav, conf_gcm |
23 |
use logic, only: iflag_phys |
use dimens_m, only: iim, jjm, llm, nqmx |
24 |
use comgeom, only: rlatu, aire_2d, cu_2d, cv_2d, rlonv |
use dimphy, only: klon |
|
use temps, only: day_ref, annee_ref, day_end, itau_dyn |
|
|
use com_io_dyn, only: histid, histvid, histaveid |
|
|
use tracstoke, only: istdyn, istphy |
|
|
use abort_gcm_m, only: abort_gcm |
|
|
use inithist_m, only: inithist |
|
|
use initdynav_m, only: initdynav |
|
25 |
use dynetat0_m, only: dynetat0, day_ini |
use dynetat0_m, only: dynetat0, day_ini |
26 |
|
use dynredem0_m, only: dynredem0 |
27 |
use grid_change, only: dyn_phy, init_dyn_phy |
use grid_change, only: dyn_phy, init_dyn_phy |
28 |
use iniadvtrac_m, only: iniadvtrac |
use iniadvtrac_m, only: iniadvtrac |
29 |
use leapfrog_m, only: leapfrog |
use inidissip_m, only: inidissip |
|
use dynredem0_m, only: dynredem0 |
|
|
use clesphys2, only: read_clesphys2 |
|
30 |
use inigeom_m, only: inigeom |
use inigeom_m, only: inigeom |
31 |
|
use initdynav_m, only: initdynav |
32 |
|
use inithist_m, only: inithist |
33 |
|
USE calendar, only: ioconf_calendar |
34 |
|
use histcom, only: histclo |
35 |
|
use leapfrog_m, only: leapfrog |
36 |
|
use logic, only: iflag_phys |
37 |
|
use paramet_m, only: ip1jm, ip1jmp1 |
38 |
|
use temps, only: day_ref, annee_ref, day_end, itau_dyn |
39 |
|
use tracstoke, only: istdyn, istphy |
40 |
|
|
41 |
IMPLICIT NONE |
IMPLICIT NONE |
42 |
|
|
95 |
! Lecture du fichier "start.nc" : |
! Lecture du fichier "start.nc" : |
96 |
CALL dynetat0(vcov, ucov, teta, q, masse, ps, phis, time_0) |
CALL dynetat0(vcov, ucov, teta, q, masse, ps, phis, time_0) |
97 |
|
|
|
! Lecture des paramètres de contrôle pour la simulation : |
|
|
! on recalcule éventuellement le pas de temps |
|
|
IF (MOD(day_step, iperiod) /= 0) THEN |
|
|
call abort_gcm(modname = "gcm", message = & |
|
|
'Il faut choisir un nombre de pas par jour multiple de "iperiod".', & |
|
|
ierr = 1) |
|
|
ENDIF |
|
|
|
|
|
IF (MOD(day_step,iphysiq)/=0) THEN |
|
|
call abort_gcm(modname = "gcm", message = & |
|
|
'Il faut choisir un nombre de pas par jour multiple de "iphysiq".', & |
|
|
ierr = 1) |
|
|
ENDIF |
|
|
|
|
98 |
! On remet le calendrier à zero si demandé: |
! On remet le calendrier à zero si demandé: |
99 |
if (annee_ref /= anneeref .or. day_ref /= dayref) then |
if (annee_ref /= anneeref .or. day_ref /= dayref) then |
100 |
print *, 'Attention : les dates initiales lues dans le fichier ' // & |
print *, 'Attention : les dates initiales lues dans le fichier ' // & |
113 |
raz_date = .false. |
raz_date = .false. |
114 |
endif |
endif |
115 |
|
|
116 |
! Initialisation des constantes dynamiques : |
! on recalcule éventuellement le pas de temps |
117 |
zdtvr = daysec / REAL(day_step) |
zdtvr = daysec / REAL(day_step) |
118 |
IF (dtvr /= zdtvr) THEN |
IF (dtvr /= zdtvr) THEN |
119 |
print *, 'Warning: the time steps in the ".def" file and in ' // & |
print *, 'Warning: the time steps in the ".def" file and in ' // & |
123 |
print *, 'Using the value from the ".def" file.' |
print *, 'Using the value from the ".def" file.' |
124 |
dtvr = zdtvr |
dtvr = zdtvr |
125 |
ENDIF |
ENDIF |
126 |
|
|
127 |
CALL iniconst |
CALL iniconst |
128 |
|
|
129 |
! Initialisation de la géometrie : |
! Initialisation de la géometrie : |
132 |
! Initialisation du filtre : |
! Initialisation du filtre : |
133 |
CALL inifilr |
CALL inifilr |
134 |
|
|
135 |
! Initialisation de la dissipation : |
CALL inidissip |
|
CALL inidissip(lstardis, nitergdiv, nitergrot, niterh, tetagdiv, tetagrot, & |
|
|
tetatemp) |
|
|
|
|
136 |
call init_dyn_phy |
call init_dyn_phy |
137 |
|
|
138 |
! Initialisation de la physique : |
! Initialisation de la physique : |
169 |
|
|
170 |
CALL dynredem0("restart.nc", day_end, phis) |
CALL dynredem0("restart.nc", day_end, phis) |
171 |
CALL inithist(day_ref, annee_ref, zdtvr, nqmx, histid, histvid, & |
CALL inithist(day_ref, annee_ref, zdtvr, nqmx, histid, histvid, & |
172 |
infile="dyn_hist.nc", t_ops = iecri * daysec, t_wrt = iecri * daysec) |
t_ops = iecri * daysec, t_wrt = iecri * daysec) |
173 |
CALL initdynav(day_ref, annee_ref, zdtvr, nqmx, histaveid, & |
CALL initdynav(day_ref, annee_ref, zdtvr, nqmx, histaveid, & |
174 |
infile='dyn_hist_ave.nc', t_ops = iperiod * zdtvr, & |
t_ops = iperiod * zdtvr, t_wrt = periodav * daysec) |
|
t_wrt = periodav * daysec) |
|
175 |
|
|
176 |
! Choix des fréquences de stockage pour le hors-ligne : |
! Choix des fréquences de stockage pour le hors-ligne : |
177 |
istdyn = day_step / 4 ! stockage toutes les 6 h = 1 jour / 4 |
istdyn = day_step / 4 ! stockage toutes les 6 h = 1 jour / 4 |