/[lmdze]/trunk/dyn3d/conf_gcm.f
ViewVC logotype

Annotation of /trunk/dyn3d/conf_gcm.f

Parent Directory Parent Directory | Revision Log Revision Log


Revision 191 - (hide annotations)
Mon May 9 19:56:28 2016 UTC (8 years ago) by guez
Original Path: trunk/Sources/dyn3d/conf_gcm.f
File size: 2616 byte(s)
Extracted the call to read_comdissnew out of conf_gcm.

Made ok_instan a variable of module clesphys, itau_phy a variable of
module phyetat0_m, nid_ins a variable of module ini_histins_m, itap a
variable of new module time_phylmdz, so that histwrite_phy can be
called from any procedure without the need to cascade those variables
into that procedure. Made itau_w a variable of module time_phylmdz so
that it is computed only once per time step of physics.

Extracted variables of module clesphys which were in namelist
conf_phys_nml into their own namelist, clesphys_nml, and created
procedure read_clesphys reading clesphys_nml, to avoid side effect.

No need for double precision in procedure getso4fromfile. Assume there
is a single variable for the whole year in the NetCDF file instead of
one variable per month.

Created generic procedure histwrite_phy and removed procedure
write_histins, following LMDZ. histwrite_phy has only two arguments,
can be called from anywhere, and should manage the logic of writing or
not writing into various history files with various operations. So the
test on ok_instan goes inside histwrite_phy.

Test for raz_date in phyetat0 instead of physiq to avoid side effect.

Created procedure increment_itap to avoid side effect.

Removed unnecessary differences between procedures readsulfate and
readsulfate_pi.

1 guez 3 module conf_gcm_m
2    
3     IMPLICIT NONE
4    
5 guez 154 INTEGER:: nday = 10 ! nombre de jours d'int\'egration
6     integer:: day_step = 240 ! nombre de pas de temps de la dynamique par jour
7     integer:: iperiod = 5 ! periode pour le pas Matsuno (en pas de temps)
8 guez 3
9 guez 39 integer:: iapp_tracvl = 5
10 guez 3 ! Should normally be equal to "iperiod"
11     ! frequence du groupement des flux (en pas de temps)
12    
13 guez 39 integer:: iconser = 240
14     ! number of time steps between output of control variables
15 guez 3
16 guez 39 integer:: iecri = 1 ! time interval between outputs to "dyn_hist.nc" (in days)
17 guez 3
18 guez 40 integer:: iphysiq = 5
19     ! number of time steps of dynamics between calls to physics
20    
21 guez 15 logical:: raz_date = .false.
22 guez 154 ! prise en compte de la date initiale de la namelist et remise \`a
23     ! z\'ero des compteurs de pas de temps (sinon on garde la date du
24 guez 98 ! fichier restart)
25 guez 3
26 guez 56 integer:: periodav = 1
27     ! time interval between outputs in the dynamical part, in days
28 guez 3
29 guez 12 logical:: offline = .FALSE.
30 guez 33 ! permet de mettre en route la nouvelle parametrisation de l'eau liquide
31 guez 3
32 guez 154 integer:: prt_level = 0 ! niveau d'impression souhait\'e (0 = minimum)
33 guez 57
34     LOGICAL:: purmats= .FALSE.
35     ! Help = Choix du schema d'integration temporel.
36     ! y = pure Matsuno sinon c'est du Matsuno-leapfrog
37    
38     INTEGER:: iflag_phys = 1
39 guez 154 ! contr\^ole l'appel \`a la physique :
40 guez 57 ! 0 : pas de physique
41 guez 154 ! 1 : physique normale (appel \`a phylmd, phymars...) (default)
42     ! 2 : rappel Newtonien pour la temp\'erature + friction au sol
43 guez 57
44 guez 3 contains
45    
46 guez 13 SUBROUTINE conf_gcm
47 guez 3
48     ! Auteurs : L. Fairhead, P. Le Van
49     ! Version du 29/04/97
50    
51 guez 33 use abort_gcm_m, only: abort_gcm
52 guez 57 use unit_nml_m, only: unit_nml
53 guez 3
54 guez 129 namelist /conf_gcm_nml/ raz_date, nday, day_step, iperiod, iapp_tracvl, &
55     iconser, iecri, periodav, iphysiq, offline
56 guez 3
57 guez 129 namelist /iniprint_nml/ prt_level
58 guez 57
59 guez 115 namelist /logic_nml/ purmats, iflag_phys
60 guez 57
61 guez 3 !------------------------------------
62    
63     print *, "Call sequence information: conf_gcm"
64 guez 12
65 guez 57 print *, "Enter namelist 'iniprint_nml'."
66     read(unit=*, nml=iniprint_nml)
67     write(unit_nml, nml=iniprint_nml)
68    
69     print *, "Enter namelist 'logic_nml'."
70     read(unit=*, nml=logic_nml)
71     write(unit_nml, nml=logic_nml)
72    
73 guez 3 print *, "Enter namelist 'conf_gcm_nml'."
74     read(unit=*, nml=conf_gcm_nml)
75 guez 57 write(unit_nml, nml=conf_gcm_nml)
76 guez 3
77 guez 171 IF (MOD(day_step, iperiod) /= 0) call abort_gcm("conf_gcm", &
78     'Il faut choisir un nombre de pas par jour multiple de "iperiod".')
79 guez 33
80 guez 171 IF (MOD(day_step, iphysiq)/= 0) call abort_gcm("conf_gcm", &
81     'Il faut choisir un nombre de pas par jour multiple de "iphysiq".')
82 guez 33
83 guez 3 END SUBROUTINE conf_gcm
84    
85     end module conf_gcm_m

  ViewVC Help
Powered by ViewVC 1.1.21