8 |
! "divgrad2", "nxgraro2"). Possibilité de choisir le schéma pour |
! "divgrad2", "nxgraro2"). Possibilité de choisir le schéma pour |
9 |
! l'advection de "q", en modifiant "iadv" dans "traceur.def". |
! l'advection de "q", en modifiant "iadv" dans "traceur.def". |
10 |
|
|
|
USE calendar, only: ioconf_calendar |
|
11 |
use comconst, only: daysec, dtvr, iniconst |
use comconst, only: daysec, dtvr, iniconst |
12 |
use comgeom, only: rlatu, aire_2d, cu_2d, cv_2d, rlonv, inigeom |
use comgeom, only: rlatu, aire_2d, cu_2d, cv_2d, rlonv, inigeom |
13 |
use comgeomphy, only: airephy, cuphy, cvphy, rlatd, rlond |
use comgeomphy, only: airephy, cuphy, cvphy, rlatd, rlond |
14 |
use conf_gcm_m, only: day_step, iperiod, anneeref, dayref, iecri, iphysiq, & |
use conf_gcm_m, only: day_step, iperiod, anneeref, dayref, iecri, iphysiq, & |
15 |
nday, raz_date, periodav, conf_gcm, iflag_phys |
nday, raz_date, periodav, conf_gcm, iflag_phys |
16 |
|
use conf_guide_m, only: conf_guide |
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 |
USE disvert_m, ONLY : disvert |
27 |
use initdynav_m, only: initdynav |
use initdynav_m, only: initdynav |
28 |
use inithist_m, only: inithist |
use inithist_m, only: inithist |
29 |
use init_dynzon_m, only: init_dynzon |
use init_dynzon_m, only: init_dynzon |
30 |
|
USE ioconf_calendar_m, only: ioconf_calendar |
31 |
use jumble, only: new_unit |
use jumble, only: new_unit |
32 |
use leapfrog_m, only: leapfrog |
use leapfrog_m, only: leapfrog |
33 |
|
use netcdf95, only: nf95_close |
34 |
use suphec_m, only: suphec |
use suphec_m, only: suphec |
35 |
use temps, only: day_ref, annee_ref, day_end, itau_dyn |
use temps, only: day_ref, annee_ref, day_end, itau_dyn |
36 |
use tracstoke, only: istdyn, istphy |
use tracstoke, only: istdyn, istphy |
37 |
use unit_nml_m, only: unit_nml |
use unit_nml_m, only: unit_nml |
38 |
use yoethf_m, only: yoethf |
use yoethf_m, only: yoethf |
39 |
|
use createnewfield_m, only: NbField, Ncid |
40 |
|
|
41 |
IMPLICIT NONE |
IMPLICIT NONE |
42 |
|
|
58 |
! (mask for points in the "v" grid, first index is for longitude, |
! (mask for points in the "v" grid, first index is for longitude, |
59 |
! second index is for latitude) |
! second index is for latitude) |
60 |
|
|
61 |
|
integer i |
62 |
|
|
63 |
namelist /main_nml/true_calendar |
namelist /main_nml/true_calendar |
64 |
|
|
65 |
!------------------------------------------------------------ |
!------------------------------------------------------------ |
87 |
CALL iniconst |
CALL iniconst |
88 |
|
|
89 |
! Lecture du fichier "start.nc" : |
! Lecture du fichier "start.nc" : |
90 |
CALL dynetat0(vcov, ucov, teta, q, masse, ps, phis, time_0) |
CALL dynetat0(vcov, ucov, teta, q, masse, ps, phis) |
91 |
|
|
92 |
! On remet le calendrier à zero si demandé : |
! On remet le calendrier à zéro si demandé : |
93 |
if (annee_ref /= anneeref .or. day_ref /= dayref) then |
if (raz_date) then |
94 |
print *, 'Attention : les dates initiales lues dans le fichier ' // & |
print *, 'On réinitialise à la date lue dans la namelist.' |
95 |
'"start" ne correspondent pas à celles lues dans "gcm.def".' |
annee_ref = anneeref |
96 |
if (raz_date) then |
day_ref = dayref |
97 |
print *, 'On réinitialise à la date lue dans "gcm.def".' |
day_ini = dayref |
98 |
annee_ref = anneeref |
itau_dyn = 0 |
99 |
day_ref = dayref |
else |
100 |
day_ini = dayref |
print *, 'On garde les dates du fichier "start".' |
|
itau_dyn = 0 |
|
|
time_0 = 0. |
|
|
else |
|
|
print *, 'On garde les dates du fichier "start".' |
|
|
endif |
|
|
ELSE |
|
|
raz_date = .false. |
|
101 |
endif |
endif |
102 |
|
|
103 |
CALL disvert |
CALL disvert |
148 |
istdyn = day_step / 4 ! stockage toutes les 6 h = 1 jour / 4 |
istdyn = day_step / 4 ! stockage toutes les 6 h = 1 jour / 4 |
149 |
istphy = istdyn / iphysiq |
istphy = istdyn / iphysiq |
150 |
|
|
151 |
|
CALL conf_guide |
152 |
|
|
153 |
! Intégration temporelle du modèle : |
! Intégration temporelle du modèle : |
154 |
CALL leapfrog(ucov, vcov, teta, ps, masse, phis, q, time_0) |
CALL leapfrog(ucov, vcov, teta, ps, masse, phis, q) |
155 |
|
|
156 |
close(unit_nml) |
close(unit_nml) |
157 |
call histclo |
call histclo |
158 |
|
|
159 |
|
do i = 1, nbfield |
160 |
|
call nf95_close(Ncid(i)) |
161 |
|
end do |
162 |
|
|
163 |
print *, 'Simulation finished' |
print *, 'Simulation finished' |
164 |
print *, 'Everything is cool' |
print *, 'Everything is cool' |
165 |
|
|