9 |
! l'advection de "q", en modifiant "iadv" dans "traceur.def". |
! l'advection de "q", en modifiant "iadv" dans "traceur.def". |
10 |
|
|
11 |
USE calendar, only: ioconf_calendar |
USE calendar, only: ioconf_calendar |
12 |
use comconst, only: daysec, cpp, dtvr, g, rad, r |
use comconst, only: daysec, dtvr, iniconst |
13 |
use comgeom, only: rlatu, aire_2d, cu_2d, cv_2d, rlonv, inigeom |
use comgeom, only: rlatu, aire_2d, cu_2d, cv_2d, rlonv, inigeom |
14 |
use comgeomphy, only: airephy, cuphy, cvphy, rlatd, rlond |
use comgeomphy, only: airephy, cuphy, cvphy, rlatd, rlond |
15 |
use conf_gcm_m, only: day_step, iperiod, anneeref, dayref, iecri, iphysiq, & |
use conf_gcm_m, only: day_step, iperiod, anneeref, dayref, iecri, iphysiq, & |
16 |
nday, raz_date, periodav, conf_gcm, iflag_phys |
nday, raz_date, periodav, conf_gcm, iflag_phys |
17 |
use dimens_m, only: iim, jjm, llm, nqmx |
use dimens_m, only: iim, jjm, llm, nqmx |
18 |
use dimphy, only: klon |
use dimphy, only: klon |
19 |
|
USE disvert_m, ONLY : disvert |
20 |
use dynetat0_m, only: dynetat0, day_ini |
use dynetat0_m, only: dynetat0, day_ini |
21 |
use dynredem0_m, only: dynredem0 |
use dynredem0_m, only: dynredem0 |
22 |
use grid_change, only: dyn_phy, init_dyn_phy |
use grid_change, only: dyn_phy, init_dyn_phy |
37 |
|
|
38 |
IMPLICIT NONE |
IMPLICIT NONE |
39 |
|
|
|
REAL zdtvr ! time step for dynamics, in s |
|
|
|
|
40 |
! Variables dynamiques : |
! Variables dynamiques : |
41 |
REAL ucov(iim + 1, jjm + 1, llm), vcov(iim + 1, jjm, llm) ! vent covariant |
REAL ucov(iim + 1, jjm + 1, llm), vcov(iim + 1, jjm, llm) ! vent covariant |
42 |
REAL teta(iim + 1, jjm + 1, llm) ! température potentielle |
REAL teta(iim + 1, jjm + 1, llm) ! température potentielle |
60 |
!------------------------------------------------------------ |
!------------------------------------------------------------ |
61 |
|
|
62 |
call new_unit(unit_nml) |
call new_unit(unit_nml) |
63 |
open(unit_nml, file="used_namelists", status="replace", action="write") |
open(unit_nml, file="used_namelists.txt", status="replace", action="write") |
64 |
|
|
65 |
CALL conf_gcm |
CALL conf_gcm |
66 |
|
|
79 |
! 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 |
80 |
call iniadvtrac |
call iniadvtrac |
81 |
|
|
82 |
|
CALL iniconst |
83 |
|
|
84 |
! Lecture du fichier "start.nc" : |
! Lecture du fichier "start.nc" : |
85 |
CALL dynetat0(vcov, ucov, teta, q, masse, ps, phis, time_0) |
CALL dynetat0(vcov, ucov, teta, q, masse, ps, phis, time_0) |
86 |
|
|
102 |
raz_date = .false. |
raz_date = .false. |
103 |
endif |
endif |
104 |
|
|
105 |
! On recalcule éventuellement le pas de temps : |
CALL disvert |
|
zdtvr = daysec / REAL(day_step) |
|
|
IF (dtvr /= zdtvr) THEN |
|
|
print *, 'Warning: the time steps in the ".def" file and in ' // & |
|
|
'"start.nc" are different' |
|
|
print *, 'dtvr (from "start.nc") = ', dtvr |
|
|
print *, 'zdtvr (from ".def") = ', zdtvr |
|
|
print *, 'Using the value from the ".def" file.' |
|
|
dtvr = zdtvr |
|
|
ENDIF |
|
|
|
|
|
CALL iniconst |
|
106 |
CALL inigeom ! initialisation de la géometrie |
CALL inigeom ! initialisation de la géometrie |
107 |
CALL inifilr ! initialisation du filtre |
CALL inifilr ! initialisation du filtre |
108 |
CALL inidissip |
CALL inidissip |
140 |
print *, "day_end = ", day_end |
print *, "day_end = ", day_end |
141 |
|
|
142 |
CALL dynredem0("restart.nc", day_end, phis) |
CALL dynredem0("restart.nc", day_end, phis) |
143 |
CALL inithist(day_ref, annee_ref, zdtvr, nqmx, t_ops = iecri * daysec, & |
CALL inithist(day_ref, annee_ref, dtvr, nqmx, t_ops = iecri * daysec, & |
144 |
t_wrt = iecri * daysec) |
t_wrt = iecri * daysec) |
145 |
CALL initdynav(day_ref, annee_ref, zdtvr, nqmx, t_ops = iperiod * zdtvr, & |
CALL initdynav(day_ref, annee_ref, dtvr, nqmx, t_ops = iperiod * dtvr, & |
146 |
t_wrt = periodav * daysec) |
t_wrt = periodav * daysec) |
147 |
call init_dynzon(dt_app = dtvr * iperiod) |
call init_dynzon(dt_app = dtvr * iperiod) |
148 |
|
|