15 |
! Pour Van-Leer plus vapeur d'eau saturée : iadv(1)=4 |
! Pour Van-Leer plus vapeur d'eau saturée : iadv(1)=4 |
16 |
! Pour Van-Leer : iadv=10 |
! Pour Van-Leer : iadv=10 |
17 |
|
|
18 |
USE IOIPSL, only: ioconf_calendar, histclo |
use abort_gcm_m, only: abort_gcm |
19 |
use dimens_m, only: iim, jjm, llm, nqmx |
use clesphys2, only: read_clesphys2 |
20 |
use dimphy, only: klon |
use com_io_dyn, only: histid, histvid, histaveid |
21 |
use paramet_m, only: ip1jm, ip1jmp1 |
use comconst, only: daysec, cpp, dtvr, g, rad, r, initialize |
22 |
use comconst, only: daysec, cpp, dtvr, dtphys, g, rad, r, initialize |
use comgeom, only: rlatu, aire_2d, cu_2d, cv_2d, rlonv |
|
|
|
|
use comdissnew, only: lstardis, nitergdiv, nitergrot, niterh, tetagdiv, & |
|
|
tetagrot, tetatemp |
|
|
|
|
23 |
use conf_gcm_m, only: day_step, iperiod, anneeref, dayref, iecri, iphysiq, & |
use conf_gcm_m, only: day_step, iperiod, anneeref, dayref, iecri, iphysiq, & |
24 |
nday, raz_date, periodav, conf_gcm |
nday, raz_date, periodav, conf_gcm |
25 |
|
use dimens_m, only: iim, jjm, llm, nqmx |
26 |
use logic, only: iflag_phys |
use dimphy, only: klon |
27 |
use comgeom, only: rlatu, aire_2d, cu_2d, cv_2d, rlonv |
use dynetat0_m, only: dynetat0, day_ini |
28 |
use temps, only: day_ref, annee_ref, day_ini, day_end, itau_dyn |
use dynredem0_m, only: dynredem0 |
|
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 |
|
|
use dynetat0_m, only: dynetat0 |
|
29 |
use grid_change, only: dyn_phy, init_dyn_phy |
use grid_change, only: dyn_phy, init_dyn_phy |
30 |
use advtrac_m, only: iniadvtrac |
use iniadvtrac_m, only: iniadvtrac |
31 |
|
use inidissip_m, only: inidissip |
32 |
|
use inigeom_m, only: inigeom |
33 |
|
use initdynav_m, only: initdynav |
34 |
|
use inithist_m, only: inithist |
35 |
|
USE IOIPSL, only: ioconf_calendar, histclo |
36 |
use leapfrog_m, only: leapfrog |
use leapfrog_m, only: leapfrog |
37 |
use dynredem0_m, only: dynredem0 |
use logic, only: iflag_phys |
38 |
use clesphys2, only: read_clesphys2 |
use paramet_m, only: ip1jm, ip1jmp1 |
39 |
|
use temps, only: day_ref, annee_ref, day_end, itau_dyn |
40 |
|
use tracstoke, only: istdyn, istphy |
41 |
|
|
42 |
IMPLICIT NONE |
IMPLICIT NONE |
43 |
|
|
53 |
REAL phis(iim + 1, jjm + 1) ! géopotentiel au sol |
REAL phis(iim + 1, jjm + 1) ! géopotentiel au sol |
54 |
|
|
55 |
! Variables pour le fichier histoire : |
! Variables pour le fichier histoire : |
56 |
REAL time_0 |
REAL time_0 ! time in day, as a fraction of day, in [0, 1[ |
|
|
|
|
!!INTEGER i |
|
57 |
|
|
58 |
! Calendrier : |
! Calendrier : |
59 |
LOGICAL:: true_calendar = .false. ! default value |
LOGICAL:: true_calendar = .false. ! default value |
60 |
|
|
61 |
! Variables pour l'initialisation de la physique : |
! Variables pour l'initialisation de la physique : |
|
integer nq |
|
62 |
REAL zcufi(klon), zcvfi(klon) ! "cu" and "cv" values on the scalar grid |
REAL zcufi(klon), zcvfi(klon) ! "cu" and "cv" values on the scalar grid |
63 |
REAL latfi(klon), lonfi(klon) |
REAL latfi(klon), lonfi(klon) |
64 |
REAL airefi(klon) |
REAL airefi(klon) |
91 |
|
|
92 |
! Initialisation des traceurs |
! Initialisation des traceurs |
93 |
! Choix du schéma pour l'advection dans le fichier "traceur.def" ou via INCA |
! Choix du schéma pour l'advection dans le fichier "traceur.def" ou via INCA |
94 |
call iniadvtrac(nq) |
call iniadvtrac |
95 |
|
|
96 |
! Lecture du fichier "start.nc" : |
! Lecture du fichier "start.nc" : |
97 |
CALL dynetat0(vcov, ucov, teta, q, masse, ps, phis, time_0) |
CALL dynetat0(vcov, ucov, teta, q, masse, ps, phis, time_0) |
146 |
! Initialisation du filtre : |
! Initialisation du filtre : |
147 |
CALL inifilr |
CALL inifilr |
148 |
|
|
149 |
! Initialisation de la dissipation : |
CALL inidissip |
|
CALL inidissip(lstardis, nitergdiv, nitergrot, niterh, tetagdiv, tetagrot, & |
|
|
tetatemp) |
|
|
|
|
150 |
call init_dyn_phy |
call init_dyn_phy |
151 |
|
|
152 |
! Initialisation de la physique : |
! Initialisation de la physique : |
176 |
zcufi, zcvfi, rad, g, r, cpp) |
zcufi, zcvfi, rad, g, r, cpp) |
177 |
ENDIF |
ENDIF |
178 |
|
|
|
! Numéro de stockage pour les fichiers de redémarrage : |
|
179 |
! Initialisation des entrées-sorties : |
! Initialisation des entrées-sorties : |
180 |
day_end = day_ini + nday |
day_end = day_ini + nday |
181 |
print *, "day_ini = ", day_ini |
print *, "day_ini = ", day_ini |
183 |
|
|
184 |
CALL dynredem0("restart.nc", day_end, phis) |
CALL dynredem0("restart.nc", day_end, phis) |
185 |
CALL inithist(day_ref, annee_ref, zdtvr, nqmx, histid, histvid, & |
CALL inithist(day_ref, annee_ref, zdtvr, nqmx, histid, histvid, & |
186 |
infile="dyn_hist.nc", t_ops = iecri * daysec, t_wrt = iecri * daysec) |
t_ops = iecri * daysec, t_wrt = iecri * daysec) |
187 |
CALL initdynav(day_ref, annee_ref, zdtvr, nqmx, histaveid, & |
CALL initdynav(day_ref, annee_ref, zdtvr, nqmx, histaveid, & |
188 |
infile='dyn_hist_ave.nc', t_ops = iperiod * zdtvr, & |
t_ops = iperiod * zdtvr, t_wrt = periodav * daysec) |
|
t_wrt = periodav * daysec) |
|
189 |
|
|
190 |
! Choix des fréquences de stockage pour le hors-ligne : |
! Choix des fréquences de stockage pour le hors-ligne : |
191 |
istdyn = day_step / 4 ! stockage toutes les 6 h = 1 jour / 4 |
istdyn = day_step / 4 ! stockage toutes les 6 h = 1 jour / 4 |
192 |
istphy = istdyn / iphysiq |
istphy = istdyn / iphysiq |
193 |
|
|
194 |
! Intégration temporelle du modèle : |
! Intégration temporelle du modèle : |
195 |
CALL leapfrog(ucov, vcov, teta, ps, masse, phis, nq, q, time_0) |
CALL leapfrog(ucov, vcov, teta, ps, masse, phis, q, time_0) |
196 |
|
|
197 |
call histclo |
call histclo |
198 |
print *, 'Simulation finished' |
print *, 'Simulation finished' |