--- trunk/Sources/dyn3d/conf_gcm.f 2015/07/07 17:49:23 154 +++ trunk/dyn3d/conf_gcm.f 2018/08/02 17:23:07 301 @@ -2,44 +2,41 @@ IMPLICIT NONE - INTEGER:: nday = 10 ! nombre de jours d'int\'egration - integer:: day_step = 240 ! nombre de pas de temps de la dynamique par jour - integer:: iperiod = 5 ! periode pour le pas Matsuno (en pas de temps) + INTEGER:: nday = 1 ! nombre de jours d'int\'egration - integer:: iapp_tracvl = 5 + integer, protected:: day_step = 240 + ! nombre de pas de temps de la dynamique par jour + + integer, protected:: iperiod = 5 + ! periode pour le pas Matsuno (en pas de temps) + + integer, protected:: iapp_tracvl = 5 ! Should normally be equal to "iperiod" ! frequence du groupement des flux (en pas de temps) - integer:: iconser = 240 + integer, protected:: iconser = 240 ! number of time steps between output of control variables - integer:: iecri = 1 ! time interval between outputs to "dyn_hist.nc" (in days) - - integer:: iphysiq = 5 + integer, protected:: iphysiq = 5 ! number of time steps of dynamics between calls to physics - logical:: raz_date = .false. + logical, protected:: raz_date = .false. ! prise en compte de la date initiale de la namelist et remise \`a ! z\'ero des compteurs de pas de temps (sinon on garde la date du ! fichier restart) - integer:: periodav = 1 + integer, protected:: periodav = 1 ! time interval between outputs in the dynamical part, in days - logical:: offline = .FALSE. - ! permet de mettre en route la nouvelle parametrisation de l'eau liquide - - integer:: prt_level = 0 ! niveau d'impression souhait\'e (0 = minimum) + integer, protected:: prt_level = 0 + ! niveau d'impression souhait\'e (0 = minimum) - LOGICAL:: purmats= .FALSE. + LOGICAL, protected:: purmats= .FALSE. ! Help = Choix du schema d'integration temporel. ! y = pure Matsuno sinon c'est du Matsuno-leapfrog - INTEGER:: iflag_phys = 1 - ! contr\^ole l'appel \`a la physique : - ! 0 : pas de physique - ! 1 : physique normale (appel \`a phylmd, phymars...) (default) - ! 2 : rappel Newtonien pour la temp\'erature + friction au sol + logical, protected:: iflag_phys = .true. ! call parameterizations of physics + INTEGER, SAVE, protected:: lmt_pas ! number of time steps of "physics" per day contains @@ -49,11 +46,11 @@ ! Version du 29/04/97 use abort_gcm_m, only: abort_gcm - use comdissnew, only: read_comdissnew + use nr_util, only: assert use unit_nml_m, only: unit_nml namelist /conf_gcm_nml/ raz_date, nday, day_step, iperiod, iapp_tracvl, & - iconser, iecri, periodav, iphysiq, offline + iconser, periodav, iphysiq namelist /iniprint_nml/ prt_level @@ -71,21 +68,21 @@ read(unit=*, nml=logic_nml) write(unit_nml, nml=logic_nml) - call read_comdissnew - print *, "Enter namelist 'conf_gcm_nml'." read(unit=*, nml=conf_gcm_nml) write(unit_nml, nml=conf_gcm_nml) - IF (MOD(day_step, iperiod) /= 0) call abort_gcm(modname = "conf_gcm", & - message = & - 'Il faut choisir un nombre de pas par jour multiple de "iperiod".', & - ierr = 1) - - IF (MOD(day_step, iphysiq)/= 0) call abort_gcm(modname = "conf_gcm", & - message = & - 'Il faut choisir un nombre de pas par jour multiple de "iphysiq".', & - ierr = 1) + IF (MOD(day_step, iperiod) /= 0) call abort_gcm("conf_gcm", & + 'Il faut choisir un nombre de pas par jour multiple de "iperiod".') + + IF (MOD(day_step, iphysiq)/= 0) call abort_gcm("conf_gcm", & + 'Il faut choisir un nombre de pas par jour multiple de "iphysiq".') + + call assert(mod(iphysiq, iperiod) == 0, & + "conf_gcm -- iphysiq must be multiple of iperiod") + + lmt_pas = day_step / iphysiq + print *, 'Number of time steps of "physics" per day: ', lmt_pas END SUBROUTINE conf_gcm