source: trunk/LMDZ.MARS/changelog.txt @ 3491

Last change on this file since 3491 was 3491, checked in by emillour, 2 weeks ago

Mars PCM:
Get rid of "start2archive_SSO.F" and adapt start2archive.F to allow adding
sub-grid-scale fields in start_archive.nc. This optional behavior is
triggered at run time by specifying "start2archive.e --add-sso".
EM

File size: 226.5 KB
Line 
1== 17/09/08 ==
2>>> Build a version with new soil but old radiative transfer,
3    but keeping possibility of switching back to new radiative transfer),
4    which incorporates changes & improvements currently included in the
5    'reference version' GCM (see /u/emlmd/LMDZ.MARS.mixdyn)
6
7>>> start by modifying makegcm as in /u/emlmd/LMDZ.MARS.mixdyn, so that it runs
8    without environment variables and set LIBOGCM to /tmp15/emlmd/libo
9
10>>> directory contents of 'aeronomars', 'grid' and 'filtrez' are simillar
11    to those in /u/emlmd/LMDZ.MARS.mixdyn
12
13>>> in bibio , only file mxva.F needed be upgraded
14
15>>> get phymars and dyn3d contents from /u/emlmd/LMDZ.MARS.mixdyn
16    (and remove all *old files)
17
18>>> check differences between dyn3d and /u/emlmd/LMDZ.MARS.170908/libf/dyn3d
19    and upgrade when necessary:
20    - removed 'netcdf.inc' file (has nothing to do there!)
21    - comgeom.h and comgeom.h : made fortran90 compliant
22    - control.h : made fortran90 compliant
23    - dynredem.F : more read/write controls + comments in english
24    - ini_archive.F : new soil/thermal inertia changes
25    - integrd.F : added additional information to output when crashing
26    - lect_start_archive.F : new soil/thermal inertia changes
27    - newstart.F : new soil/thermal inertia changes + comments in english
28    - start2archive.F : new soil/thermal inertia changes
29    - vanleer.F : removed inapropriate 'external' statement
30    - write_archive.F : enable writting a subterranean field
31
32>>> check differences between phymars and /u/emlmd/LMDZ.MARS.170908/libf/phymars
33    and upgrade when necessary:
34    New soil stuff:
35    - added comsoil.h
36    - iniwrite.F : new soil changes
37    - added iniwritesoil.F90 and writediagsoil.F90 for subterranean fields
38    - added interp_line.F (for subterranean grid interpolation)
39    - adapted phyetat0.F for subterranean temperature & inertia
40    - adapted physdem1.F to include new soil stuff
41    - physiq.F : added calls to writediagsoil
42    - soil.F : new routine (fixed vertical grid + variable thermal inertia)
43    - added soil_settings.F (to read/initialize/interpolate soil properties)
44    - updated surfdat.h (since thermal inertia is now in comsoil.h)
45    - updated tabfi.F : include new soil properties
46    - updated testphys1d.F
47    - updated dimphys.h (set nsoil=18 as default)
48
49== 18/09/08 ==
50>>> add the possibility of easily switching to Tran radiative transfert
51    - updated aerdust.h.ocke97 (changed some variables name) so it can
52      replace aerdust.h (which is currently the same as aerdust.h.clan91).
53    - imported Tran's 'gfluxv.F' routine
54    - imported Trans' version of 'swr.F' routine, saved it as 'swr.F.toon'
55
56>>> Backup of 'old' Morcrette swr.F is 'swr.F.morc'
57    NB: to switch from one radiative transfer to the other, just copy
58    swr.F.morc or swr.F.toon to swr.F (and eventually 'touch swr.F' so that
59    makegcm recompiles swr.F)
60    No other dependencies (swr.F.toon uses 'gfluxv.F' and swr.F.morc uses
61    'dedd.F').
62
63>>> Changed the latter, so that users can switch from one to the other
64    - modified swr.F.toon to become swr_toon.F (and to include gfluxv.F)
65    - modified swr.F.morc to become swr_fouquart.F (and to include dedd.F)
66    - added a flag in callkeys.h, swrtype (parameter to be set/changed by
67      the user 1=Fouquart and 2=Toon)
68    - update readtesassim so that the coefficient by which opacity
69      is multiplied is set according to the 'swrtype' parameter
70
71== 25/09/08 ==
72>>> Implement the use of tracer-by-name in physics
73    - in phymars/tracer.h set 'noms' length to 20 (instead of 10)
74    - in phymars/callsedim2q.F and phymars/callsedim.F, use tracers by name
75    - in phymars/dustopacity.F, use tracers by name
76    - in phymars/vdifc.F, use tracers by name
77
78== 26/09/08 ==
79>>> Change implementation strategy (for now); don't move surface tracer around
80    i.e.: surface ice remains equivalent to qsurf(nqmx)=qsurf(i_h2o_vap)
81          and likewise for surface tendencies ...
82    - modified vdifc.F and callsedim.F back
83    - modified initracer.F (so that water names are h2o_vap & h2o_ice)
84   
85== 29/09/08 ==
86    - modified aeronomars/init_chimie_B (cosmetics)
87    - corrected aeronomars/moldiff.F internal routine tridag; changed
88      "pause" error messages to 'stop' messages
89    - modified phymars/watercloud.F to use tracers by name
90    - corrected aeronomars/molvis.F (undefined 'fac' and 'Akk' written to
91       output at first call)
92   
93== 30/09/08 ==
94    - modified aeronomars/calchim.F to use tracers by name
95    - adapted aeronomars/photochemist_B.F to use tracers by name
96    - adapted aeronomars/chemtermos.F to use tracers by name
97    - adapted aeronomars/concentrations.F to use tracers by name
98    - corrected aeronomars/conduction.F (undefined 'Akk' written to output
99      at first call)
100    - adapted aeronomars/euvheat.F to use tracers by name
101    - adapted aeronomars/moldiff.F and moldiffcoeff.F to use tracers by name
102
103== 01/10/08 ==
104    - For more compatibility with LMDZ4; mimic reading a 'traceur.def' file
105      in the dynamics via a call to a routine 'iniadvtrac.F' and saving
106      tracers names in 'advtrac.h'
107     -> created 'iniadvtrac.F', 'advtrac.h' and modified gcm.F
108    - modified 'dynetat0.F' so that tracers are loaded from 'start.nc' by name
109    - modified 'dynredem.F' so that tracers are written to 'restart.nc'
110      by name
111    - modified 'initracer.F' tu use tracers by name
112
113== 02/10/08 ==
114    - removed use of 'nqchem_min' everywhere:
115      adapted 'euvheat.F','inifis.F','physiq.F'
116      (leave 'inichim.F' for later)
117    - updated 'phyetat0' and 'physdem1.F' to read/write surface tracers by name
118    - modify things so that surface water ice index is the same as
119      atmospheric water ice (except when running without water ice; then
120      simply set i_h2o_ice=i_h2o_vap).
121      NB: the easiest is to have global storage of tracer names/indexes in
122      tracer.h
123      => changed initracer.F & tracer.h to have global igcm_something indexes
124
125== 03/10/08 ==
126    - adaptations for surface ice index, modified files:
127      phyetat0.F : if there is a dynamical tracer 'h2o_vap' then load
128                   surface tracer called 'h2o_ice' instead
129      initracer.F : in 'old' tracer name case: move qsurf(nqmx)->qsurf(nqmx-1)
130                    and set i_h2o_ice=i_h2o_vap if iceparty=.false.
131      physdem1.F : if old tracer names: move qsurf(nqmx-1)->qsurf(nqmx)
132                   if iceparty=.false., write surface tracer 'h2o_ice'
133                   (and not 'h2o_vap') to file.
134      adapted vdifc.F, callsedim.F & watercloud.F & physiq.F so that surface
135      ice is now identified as qsurf(i_h2o_ice)
136    - updated aeronomars/perosat.F (cosmetics)
137
138== 06/10/08 ==
139    - modify newstart.F and lect_start_archive.F to use tracers by name
140== 07/10/08 ==
141    - adapted inichim_newstart.F (added qsurf to arguments)
142      and inichim_readcallphys.F
143== 08/10/08 ==
144    - implement reading traceur.def in dyn3d/iniadvtrac.F
145
146== 16/10/08==
147    -small change in inifis.F (only warn if too many tracers, compared
148     to the expected number, not stop).
149     - corrected bug in initracer.F
150== 21/10/08 ==
151    - modified newstart.F to load B.Diez subsurface ice maps.
152    - corrected small bug (uninitialized variable) in interp_horiz.F
153== 22/10/08 ==
154    - updated iniwritediagsoil.F so that thermal inertia is written to
155      diagsoil.nc
156== 31/10/08 ==
157    - changed xvik.F program so it works even if we don't have atmospheric
158     temperature at hand (then it uses a 10km reference scale height) and so
159     that it does surface pressure interpolation log-wise.
160== 03/11/08 ==
161    - modified physiq to compute (and output) co2 column.
162    - added improvement by Francois in newcondens.F about computing CO2
163      partial pressure. This behavior is turned on by setting internal logical
164      flag 'improved_ztcond' to '.true.' (and running with a co2 tracer)
165    - updated 'start2archive' to work with 'new' gcm output (soil, tracers ...)
166== 04/11/08 ==
167    - upgraded xvik program to look for temperature in 7th layer variable if
168     there is no global atmospheric temperature field at hand.
169== 05/11/08 ==
170    - more modifs to newcondens.F: added another internal flag 'bound_qco2' to
171     enforce (if set to .true.) that co2 mass mixing ratio remains bounded.
172== 07/11/08 ==
173    - corrected 'writediagfi' & 'writediagsoil' so that an error message is
174      issued if called with a variable name which is too long.
175== 18/12/08 ==
176    - corrected bug in dyn3d 'addfi.F', (dimensions of local array p())
177== 23/02/09 ==
178    - modified "aeronomars/param_read.F" to do strictly fortran data
179     initialization (otherwise xlf compiler complains)
180    - changed a few '1.e-30' to '1.d-30' in aeronomars/photochemist_B.F
181     so that max functions has 2 doubles as arguments (otherwise xlf
182     compiler complains)
183
184==07/04/09 ==
185    -cosmetic changes/minor improvements in the handling of tracers in:
186     aeronomars/photochemist_B.F
187     aeronomars/perosat.F
188     aeronomoars/euvheat.F
189     aeronomars/moldiffcoeff.F
190     aeronomars/moldiff.F
191     aeronomars/cocentrations.F
192     aeronomars/chemtermos.F
193     aeronomars/calchim.F
194
195--> NB: still there are differences in outputs when order of tracers is changed
196
197== 09/04/09 ==
198>>> fixed problem in 'vdifc.F' which lead to different results when moving
199    tracers around.
200
201== 10/04/09 ==
202>>> corrected small bug in diagnostic outputs of 'watercloud.F' (tendencies were
203    not added to tracer values).
204
205== 21/04/09 ==
206>>> corrected small bug in "physdem1.F" about writing water ice surface tracer
207    to file
208
209== 07/05/09 ==
210>>> very minor correction (firstcall not set to true after first call
211    if no tracers) in convadj.F
212
213== 30/06/09 ==
214>>> Implement reading *def files with IOIPSL ersatz 'getin' function
215   - import "ioipsl_errioipsl.F90","ioipsl_getincom.F90","ioipsl_stringop.F90"
216     in bibio
217   - adapted 'dyn3d/defrun_new.F' to use "getin" function
218   - adapted 'phymars/inifis.F' to use "getin" function
219
220== 01/07/09 ==
221>>> Adapted 'create_make_gcm' so that the "use" in *.F files is identified and
222    corresponding dependencies included in the makefile rules.
223
224>>> Added the 3D scattering from aerosols by JB Madeleine:
225    - minor changes in aerave.F
226    - added the calls to aeropacity.F, and aeroptproperties.F in callradite.F
227    - changed the calls to lwu.F and swr.F in lwmain.F and swmain.F, respectively
228    - added 3D scattering properties in lwu.F and swr.F
229    - added the new aeroptproperties.F, aeropacity.F and suaer.F90 routines
230        (removed dustopacity.F)
231    - updated aeropacity.F with new tracer names
232    - changed the call to callradite.F in physiq.F, added the initialization
233        of reffrad and nueffrad (aerosol effective radius and variance)
234    - removed all the lines relative to the old "activice" option, including
235        temperature variation due to latent heat release (now in comments)
236    - renamed nsize into naersize in watercloud.F, watersat.F and newsedim.F,
237        to avoid conflicts with another "nsize" variable in the radiative transfer
238    - added the statement of nuice in watercloud.F, which is the effective variance
239        of the log-normal distribution for ice
240    - updated yomaer.h and removed aerice.h (and corresponding "includes")
241
242== 02/07/09 ==
243>>> Adapted 'aeronomars/inichim_readcallphys.F' (called by newstart)
244     to use "getin" routine.
245    + minor correction in 'inifis.F' (close 'iradia.def' file)
246>>> Minor correction in 'dyn3d/dynetat0.F' and 'phymars/phyetat0.F'; do not
247    attempt to reindex tracers if none were found.
248
249>>> in 'deftank' added examples of 'traceur.def' files (traceur.def.co2 : 1
250    co2 tracer; traceur.def.watercycle : 2 traceurs, water vapour and water ice
251    tracer.def.chemistry : all 15 species)
252
253== 06/07/09 ==
254>>> Modified 'makegcm' and makegcm_g95' so that modules files are put
255    with libraries (and not in current directory)
256   
257== 21/07/09 ==
258>>> Added in "testphys1d.F" a check that the (required) 'run.def' file is
259    around (that file should contain the "INCLUDEDEF=callphys.def" instruction
260    otherwise getin() calls won't work.
261    Also added reding of 'traceur.def' (or initialisation of tracer names
262    to dummy values q01,q02, ...) in testphys1d.F
263
264== 22-24/07/09 == JBM
265>>> Removed "iceparty" everywhere (calchim.F, inichim_readcallphys.F,
266        chimie_data.h, inichim_newstart.F, photochemist_B.F, callkeys.h,
267        callradite.F, callsedim.F, aeropacity.F, inifis.F, initracer.F, physdem1.F,
268        physiq.F, watercloud.F). Water = .true. now implies the use of two
269        tracers, i.e. water vapor and water ice.
270
271>>> Removed fisice.h and stated the corresponding variables in the right
272        places (physiq.F, callsedim.F, watercloud.F, newcondens.F, calchim.F);
273        also removed unused cltop and clsurf variables in physiq.F.
274
275>>> Removed the variable's splitting, which is now obsolete, in callradite.F
276        (and its subroutines lwi.F, lwxb.F, lwxn.F, lwflux.F, lwmain.F, lwxd.F).
277        Also removed the variable's splitting in calldrag_noro.F. Finally removed
278        ndomain from dimradmars.h.
279
280>>> Removed useless tests in aeropacity.F.
281
282== 27-30/07/09 == JBM
283>>> Cleaned the WRITEDIAGFI section in physiq.F, and moved the "mtot",
284        "icetot" and "tauTES" variables from watercloud.F to physiq.F. Also
285        cleaned the albedo change due to water ice deposition.
286
287>>> Renamed rdust into rnuclei in callsedim.F, physiq.F and watercloud.F.
288
289>>> Added a logical test for (water.and..not.tracer) in inifis.F.
290
291>>> Removed "qsurf","zls" and "icount" from the list of inputs in
292        watercloud.F (these variables were not used by the subroutine).
293
294>>> Added a call to watercloud.F at firstcall, using typical dust optical
295        depth (taufirstcall), in order to correctly initialize the ice particle
296        size distribution for the radiative transfer scheme. Also created a new
297        subroutine to load the effective radius and variance of the aerosols used
298        by the radiative transfer scheme. Its name is updatereffrad.F, and it is
299        called before aeroptproperties.F in callradite.F.
300
301== 05/08/09 == JBM
302>>> TES water-ice opacity is now fully computed using the radiatively active
303        aerosol scheme. Absorption coefficient is calculated using Qext and
304        omega at the IR reference wavelength. Omega was not computed before; it
305        was only computed in the GCM channels, not at the reference wavelength.
306        Thus it has been added in suaer.F90, aerave.F, yomaer.h, callradite.F,
307        aeropacity.F and aeroptproperties.F. If "activice" is false, the
308        TES opacity is computed using the old method (fit of the Qabs as a
309        function of reff curve).
310
311== 07/08/09 == EM
312>>> Removed "iceparty" option from callphys.def
313
314>>> modified physiq.F and initracer.F so that building of array niqchem() which
315    contains the indexes of all chemistry tracers + water vapour and water
316    ice is done in initracer.F (array niqchem(:) is now a common
317    in tracer.h ).
318    Also had to adapt inichim_newstart.F to behave similarly.
319
320== 24/08/09 == EM included corrections by JBM
321>>> Added declaration of nqchem(nqmx) local array in
322    aeronomars/inichim_newstart.F
323
324>>> Encapsulated calls to writediagfi & wstats in if (ngrid.ne.1) clause
325    in phymars/aeropacity.F (otherwise it crashes in 1D).
326
327== 26/08/09 == EM
328>>> modified tracer.h, initracer.F, inichim_newstart.F and physiq.F to not use
329    an niqchem() array (added in 07/08/09 changes)
330
331>>> modified phymars/readtesassim.F90 and phymars/aeropacity.F so that
332    assimilated dust for MY24 or MY25 or MY26 may be used (with iaervar=
333    24,25 or 26); we keep iaervar=4 to also read MY24 dust for compatibility
334    with older versions of code.
335    Modified deftank/callphys.def : added comments about new iaervar values
336
337== 25/09/09 == EM
338>>> modified phymars/testphys1D.F : added incrementation of tracer values
339    after call to physiq().
340
341== 27/11/09 == EM
342>>> updated comments in makegcm (translated help to english)
343
344>> shifted to reading file traceur.def
345   (dyn3d/iniadvtrac.F) in an Earth-LMDZ4 like way:
346   first line == number of tracers
347   and then tracer name (1 per line; later we'll add advection scheme type)
348>> also updated example 'traceur.def' files in deftank accordingly
349
350== 02/12/09 == EM
351>>> upgraded testphys1d.F and profile.F to load run parameters with getin()
352    function (from run.def ; no need for a "testphys1d.def" any more)
353    added an example 'run.def.1d' file to 'deftank'
354
355==10/12/09 == EM
356>>> minor correction in testphys1d.F (was still checking if there is a
357    testphys1d.def file around ; which is not used anymore)
358
359==15/01/10 == JBM
360>>> aeropacity.F: implemented a weighting of the dust opacity profile
361  by using the dust size vertical profile defined in updatereffrad.F.
362>>> aeroptproperties.F: changed the integration scheme (Gauss-Legendre)
363  of the scattering parameters.
364>>> suaer.F90: removed the use of an ad-hoc "solsir" factor. It is now
365  directly computed from the scattering properties read in the ASCII
366  files. Consequently, the IR extinction coefficient has been divided
367  by solsir=2 in the ASCII file (called optprop_dustir_x0.5.dat instead
368  of optprop_dustir.dat to allow compatibility with the older version
369  and avoid chaos).
370>>> updatereffrad.F: changed the dust size vertical profile.
371>>> yomaer.h: the particle radius variable is now in simple precision,
372  because the new scattering property integration scheme has changed.
373>>> aeronomars/inichim_readcallphys.F (small) bug correction load value of
374    'water' before testing its value...
375
376== 18/01/10 == EM
377>> added possibility to read (in inifis.F and aeropacity.F) the value of
378   dust opacity tauvis from callphys.def file
379
380== 01/02/10 == EM
381>> added JBM updates of "callradite.F" (coments) "aeroptproperties.F" (bug fix
382   of bad array bounds) and "aeropacity.F" (encapsulate wstats calls in
383   if (callstats) )
384>> added implementation of TES Cap albedos: "albedocaps.F90" and adapted
385   "newcondens.F"  (and physiq.F, because added 'zls' argument to newcondens)
386   and surfdat.h
387>> changed default settings for dust : set a 1.3 factor in readtesassim.F90
388   when using Toon radiative transfer, use M.Wolff-T-Matrix files in suaer.F90
389 
390== 03/02/10 == EM
391>> Updated newstart.F in dyn3d, so that sub-surface thermal inertia values may
392   be different in North and South hemispheres.
393
394>> Updated "makegcm" and "makegcm_g95" scripts (cosmetic + default compilation
395   option changes)
396   
397>> Minor changes in aeronomars/init_chimie_B.F (do not use lnblnk(); F90
398   trim() intrinsic is much safer and better), and in initracer.F (better
399   control over a possible array bound underflow).
400   Also, in dyn3d/iniadvtrac.F, close input file properly,
401   and in infis.F, more verbose message to output.
402
403== 26/02/10 == EM
404>> Updated makegcm and makegcm_g95 : default usage is now to set everything
405   ("environment variables") in the script. Changed some default compilation
406   options.
407>>> removed 'float()' instructions in tabfi.F and iniwrite.F
408    use "real()" to be compliant with standards.
409>> Corrected small bug in testphys1d.F (look for file traceur.def)
410   also added initialisation of tracers
411>> Cleaned up inifis.F and initracer.F (some sanity checks were obsolete
412   and/or wrong)
413>> Improved writediagfi.F so that 1D (individual column in the GCM, or
414   fields in testphys1d) data can be written in the diagfi.nc file
415>> Minor changes/improvements in calls to writediagfi from physiq.F for dust
416
417== 08/03/10 == EM
418>> Minor update of "makegcm" and "makegcm_g95": use instruction "./makdim"
419   (instead of "makdim"; in case "." is not in user's path)
420>> put "real()" instructions instead of "float()" in dyn3d routines:
421   disvert.F , dynredem.F , fluxstoke.F , fxhyp.F , fxy.F ,
422   fxysinus.F , fyhyp.F , gcm.F , grid_atob.F , grid_noro.F , grid_noro1.F ,
423   ini_archive.F , inigeom.F , newstart.F , ran1.F , sortvarc.F ,
424   sortvarc0.F
425>> Minor update of aeropacity.F (added if (callstats) around call to wstats)
426
427== 28/04/10 == EM
428>> Put the splitting in radiative transfer back in the model (JB):
429   updated calldrag_noro.F  callradite.F  dimradmars.h  lwflux.F
430   lwi.F lwmain.F lwxb.F lwxd.F lwxn.F swmain.F
431>> Fix bug (AS) in callradite.F (wrong loop boundaries line 332)
432>> Fix bug (AS+JB) in "swr_toon.F" to enable running with more than
433   100 levels...
434>> Fix bug (JBM) in callsedim2q.F about setting pdqs_sed(:niq(iq)) to zero
435
436== 25/08/10 == EM
437>> Add a 'makegcm_gfortran' for compiling with gfortran
438   and a 'makegcm_ifort' for compiling with ifort (on Gnome)
439   
440== 03/09/10 == EM
441>> Modifications to enable running in double precision (using starts in r4
442   or r8); just add options '-r8 -DNC_DOUBLE' to compile GCM in double precision
443   -> adapted dyn3d/dynetat0.F, physmars/physdem1.F, phymars/soil_settings.F,
444      phymars/readtesassim.F90, phymars/writediagfi.F, phymars/def_var.F90,
445      phymars/writediagsoil.F90, phymars/wstats.F90, phymars/inistats.F
446>> Added dyn3d/writediagdyn.F90 routine (to output scalar dynamical fields),
447   adapted 'comconst.h' and 'comvert.h' to be Fortran77/Fortran 90 compatible.
448
449== 14/12/10 == EM
450>> Add -f option to #!/bin/csh in makegcm* scripts (to make sure that it is
451   the bash environment compiler that is used as a default)
452>> Update convadj.F with RW's version (fixes bug of non conservation of tracers
453   in cases where convection stops at one level and starts at the next).
454
455== 13/12/10 == EM
456>> Update testphys1d.F so that initial tracer profiles may be loaded at
457   initialization
458
459== 24/01/11 == JBM(+ some cleanup by EM)
460>> Reactivated the "doubleq" method (two-moment scheme for dust
461   transport) and connected it with the radiative transfer code. The
462   opacity is set constant below a level indicated by the variable
463   cstdustlevel in aeropacity.F to remove the thick layer of
464   dust near the surface created by the constant lifting rate.
465   The "density scaled opacity" used by the MCS team is computed
466   and saved in dsodust.
467   Updated routines: callradite.F, aeropacity.F, updatereffrad.F,
468   callsedim.F, newsedim.F, initracer.F, vdifc.F, suaer.F90.
469>> Added the use of named scatterers (same method as tracer-by-name)
470   in the radiative transfer code. Scatterers are declared at
471   firstcall in callradite.F (which is the equivalent of traceur.def)
472   and the corresponding indices are saved in the common called
473   aerkind.h (the equivalent of tracer.h).
474   Updated routines: callradite.F, updatereffrad.F, aeropacity.F,
475   suaer.F90, aerkind.h.
476   EM: aerdust.h, aerdata.h and aerice.h are not used any more
477>> Merged callsedim2q.F and callsedim.F in one single routine
478   callsedim.F to allow doubleq to be used with other tracers.
479>> Added an input parameter called beta to newsedim.F, that allows
480   to account for the shape of the particles in the computation of
481   the sedimentation velocity.
482>> Added the ability to transport a radiatively active population of
483   submicron dust particles (flag "submicron" in callphys.def).
484   Updated routines: callradite.F, updatereffrad.F, aeropacity.F,
485   initracer.F, vdifc.F, suaer.F90, inifis.F, callkeys.h.
486>> Connected the predicted size and amount of dust to the water
487   cycle. The size of the particles is now given by rdust in
488   updatereffrad.F, and the amount of cloud condensation nuclei
489   (CCN) is given by ccn in aeropacity.F. The calculation of ccn is
490   done in aeropacity.F because it's deduced from the opacity when
491   doubleq is not used. rnuclei and dustcores are removed from
492   watercloud.F and replaced by rdust and ccn.
493   Updated routines: physiq.F, callradite.F, updatereffrad.F,
494   aeropacity.F, watercloud.F.
495>> Removed the "fake" call to watercloud.F in physiq.F which was used
496   to give the size of the ice particles to the radiative transfer
497   code at firstcall. Instead, rice is computed in updatereffrad.F
498   using a simple equation and a typical amount of dust nuclei (ccn0).
499>> Increased the number of Gauss integration points in
500   aeroptproperties.F.
501>> Added the ability to write the 3D scattering parameters of a
502   given aerosol in the outputs using the out_qwg flag in
503   aeroptproperties.
504>> Changed "DO iir=1,4" into "DO iir=1,nir-1" in suaer.F90 (in case
505   the number of infrared channels is changed).
506>> Added nuice_ref in tracer.h and initracer.F, which is the
507   effective variance of the log-normal distribution used for water-ice
508   particles in the radiative transfer code.
509>> Updated the computation of rice, reffice and rsedice in
510   updatereffrad.F and callsedim.F.
511>> Added nuice_sed in callsedim.F, which is the effective variance
512   of the lognormal distribution used for the sedimentation of
513   water-ice particles.
514>> Added ccn_factor in watercloud.F, which is the ratio of the total
515   number of dust particles over the number of condensation nuclei.
516>> The variable beta is not saved anymore in newsedim.F.
517>> Corrected the BIG bug in lwu.F that was responsible for unstabilities
518   when clouds were radiatively active (FF+EM+JBM!)
519>> Turned ilwd, ilwn and ilwb to 1 in inifis.F.
520>> Added dust and ice visible opacities in the outputs.
521   Modified routine: aeropacity.F.
522>> Named water cycle tuneable parameters (nuice_sed, nuice_ref,
523   alb_surfice, ccn_factor) which are mentioned at firstcall by the GCM
524   (flag "water_param"). Modified routines: callsedim.F, physiq.F,
525   watercloud.F.
526
527== 25/01/2011 == EM
528>> updated testphys1d.F: removed #include "aerdust.h"
529>> cleanup in suaer.F90: no more calls to zerophys; added test to check
530   there is no overflow of isize index (in visible domain averaged properties
531   case)
532>> minor cleanup in newsedim.F (make it more F90 oriented)
533>> added flag 'TESicealbedo' (set to .true. to impose polar surface
534   albedos as observed by TES) in callphys.def
535   
536== 28/01/2011 == EM
537>> added additional tests (to check correct reading of input files) in suaer.F90
538>> updated inifis.F  so that the directory where external data files are to
539   be found (e.g. TES opacities, dust properties, etc.) can be specified in
540   run.def (or callphys.def) as " datadir = /path/to/the/directory "
541
542== 29/01/2011 == AS
543>> added updated mesoscale-related routines in phymars:
544   ----------------------------------------------------------------------------
545   NAME                       CHANGES compared to GCM counterpart
546   ----------------------------------------------------------------------------
547   meso_callkeys.h        --> one variable is added [consider merging w/ GCM?]
548   meso_dustlift.F        --> stress + alpha default, or read in a file
549                               stress.def if here [consider merging w/ GCM?]
550   meso_newcondens.F      --> correction on U V T tendencies is switched
551                               off (unstable in mesoscale)
552   meso_physiq.F          --> major modifications mainly related to I/O
553   meso_slope.h           --> additional common for slope scheme
554   meso_dimphys.h_ref     --> reference common serving as a basis for a
555                               compilation script (makemeso)
556   meso_inifis.F          --> major modifications mainly related to I/O
557   meso_param_slope.F90   --> slope scheme by Spiga and Forget GRL 2008
558                               [consider adding to GCM?]
559   meso_readtesassim.F90  --> an old version because the new F90-compliant
560                               version needs the new makegcm scripts [TBD]
561   meso_testphys1d.F      --> similar to GCM except for routine names
562   ----------------------------------------------------------------------------
563    NB: in meso_dustlift.F and meso_readtesassim.F90, the subroutines
564         have the same name as in the GCM.
565         this is because those files are supposed to be copied
566         in specific temporary folders for compilation
567>> any future change in the following GCM routines in phymars:
568      - callkeys.h
569      - dustlift.F
570      - newcondens.F
571      - physiq.F
572      - inifis.F
573      - readtesassim.F90
574      - testphys1d.F
575   will be in need to be impacted to the corresponding meso_ routines
576   [hence it is important to document this README file]
577>> any change in any other GCM routines than the ones listed will
578   have an effect in mesoscale simulations as well:
579     -- the two models are being kept updated at the same time :)
580     -- the two models would be possibly broken at the same time :(
581
582== 15/02/2011 == EM
583>> updated dissipation coefficients in indissip.F
584
585== 25/02/2011 == EM
586>> corrected bug in 'inifis.F' and 'datafile.h' to really be able to
587   specify (in callphys.def; using datadir=/whatever/path/to/use ) the path
588   to external datafiles (topography, surface properties, etc.)
589
590== 28/02/2011 == JBM + AS
591>> used settings reached by JBM to obtain his PhD results
592      alb_surfice = 0.45  ---  in physiq.F and meso_physiq.F
593      ccn_factor = 4.5    ---  in watercloud.F
594      nuice_sed = 0.45    ---  in callsedim.F
595>> NB: this is supposed to be further refined in the future
596
597== 01/03/2011 == AS + JBM
598>> nasty bug in the water cycle when iradia != 1  [no problem when iradia = 1]
599   --> mesoscale runs w/ water cycle had strange 5-hour fluctuations in RICE, from 80mic to 5mic
600>> PB: calculation of ccn [condensation nuclei] is done in callradite.F
601      * ccn must be saved
602        --> corrected in physiq.F and meso_physiq.F
603      * ccn must not be modified elsewhere [e.g. in watercloud, when divided by ccn_factor]
604        --> all calculations on ccn are now moved in callradite
605
606== 03/03/2011 == AS
607>> Added a pre-compilation flag MESOSCALE so that the LMDZ.MARS GCM
608will compile without stating errors because of mesoscale routines.
609[meso_physiq.F, meso_inifis.F]
610>> Now, this MESOSCALE precompilation flag can be used to lower
611the number of meso_* routines when adaptations for mesoscale
612applications are not very extended.
613   --> meso_testphys1d.F, meso_testphys1d.F, meso_dustlift.F
614       routines were deleted and changes are now moved under
615       the MESOSCALE flag in the original GCM routines
616   --> Completely transparent for GCM compilation
617       since it is devoid of the -DMESOSCALE option
618   --> Very good for syncing because changes in dustlift, newcondens
619       will be directly available in the mesoscale model
620
621== 04/03/2011 == AS + JBM
622>> new version version for aeroptproperties.F in phymars to limit uncertainties and be able to play with ngau
623>> this was coded by JBM in his personal reference version but not transmitted to the team reference version
624
625== 10/05/2011 == AS + JF
626>> in newsedim.F used for mesoscale computations, spurious values close to the surface
627   --> this was related to 1 - exp(-x) calculated as zero in w(ig,l) if x is very small
628   --> fix: when this happens, replace exp(-x) by 1 - x since x ~ 0
629>> in newsedim.F, "if (dztop.gt.epaisseur(ig,l)) then" was closed too soon by an "endif"
630   --> hence basically the simple method was never used
631       and useless calculations with the complex method were carried out
632   --> fix by moving the closing "endif" [in addition to corrections mentioned in the previous point]
633
634== 17/05/2011 == EM
635>> set internal computations using double precision in growthrate.F and
636   watercloud.F (otherwise we sometimes end up with Nans).
637>> add extra checks in newcondens.F to avoid possibility of out of bounds
638   evaluation of array masse()
639 
640== 25/05/2011 == AS
641>> found that the 10/05/2011 bug fix in newsedim.F is also useful for GCM runs.
642>> no more need to modify callradite.F prior to compilation [but still dimradmars.h must be modified]
643   --> in callradite.F we now have
644       -- DEFAULT name_iaer(1) is "dust_conrath"
645       -- IF (doubleq.AND.active) name_iaer(1) = "dust_doubleq"
646       -- IF (water.AND.activice) name_iaer(2) = "h2o_ice" 
647
648== 27/05/2011 == EM
649>> minor bug correction in writeg1d (JYC)
650>> add "-check" to debug option in makegcm_ifort
651
652== 08/06/2011 == EM
653>> minor bug fix in lect_start_archive.F (using wrong surface temp. array).
654   + swiched output messages to english and added that tracers not found
655   in file must be initialized by user.
656>> minor bug fix in datareadnc.F : 'datafile' path must be initialized.
657
658== 08/06/2011 == EM
659>> Significant update on how the number of scatterers is managed:
660   Instead of having to manualy change 'nearkind' in dimradmars.h, the
661   number of scatterers must now be set when compiling, using makegcm
662   "makegcm -s 1" for one scatterer (dust) or "makegcm -s 2" (e.g. dust
663   and water ice), default behaviour (ie not specifying -s #) is -s 1
664   Modified phymars/dimradmars.h , added directory phymars/scatterers
665   with script make_scatterers , and adapted makegcm* scripts.
666
667== 17/06/2011 == AC
668================================================
669======== IMPLEMENTATION OF THERMALS ============
670================================================
671The main goal of this revision is to start including the thermals into the model
672for development purposes. Users should not use the thermals yet, as
673several major configuration changes still need to be done.
674
675This version includes :
676- updraft and downdraft parametrizations
677- velocity in the thermal, including drag
678- plume height analysis
679- closure equation
680- updraft transport of heat, tracers and momentum
681- downdraft transport of heat
682
683This model should not be used without upcoming developments, namely :
684- downdraft transport of tracers and momentum
685- updraft & downdraft transport of q2 (tke)
686- revision of vdif_kc to compute q2 for non-stratified cases
687
688Thermals could also include in a later revision :
689- momentum loss during transport (horizontal drag)
690
691Compilation of the thermals has been successfully tested on ifort, gfortran and pgf90
692
693================================================
694================================================
695
696M      libf/phymars/callkeys.h
697M      libf/phymars/inifis.F
698
699Added new control flags to call the thermals :
700- calltherm (false by default) <- to call thermals
701- outptherm (false by default) <- to output thermal-related diagnostics (for dev purposes)
702================================================
703M      libf/phymars/vdifc.F
704^------> added a temporary output for thermal-related diagnostics
705M      libf/phymars/testphys1d.F
706^------> added treatment for a initialization from a profile of neutral gas (ar)
707      -> will be transformed in a decaying tracer for thermal diagnostics
708M      libf/phymars/physiq.F
709^------> added a section to call the thermals
710      -> changed the call to convadj
711      -> added thermal-related outputs for diagnostics
712M      libf/phymars/convadj.F
713^------> takes now into account the height of thermals to execute convective adjustment
714      => note : convective adjustment needs to be activated when using thermals, in case of a
715         second instable layer above the thermals
716================================================
717A      libf/phymars/calltherm_interface.F90
718^------> Interface between physiq.F and the thermals
719A      libf/phymars/calltherm_mars.F90
720^------> Routine running the sub-timestep of the thermals
721A      libf/phymars/thermcell_main_mars.F90
722^------> Main thermals routine specific to Martian physics
723A      libf/phymars/thermcell_dqupdown.F90
724^------> Thermals subroutine computing transport of quantities by updrafts and downdrafts
725A      libf/phymars/thermcell.F90
726^------> Module including parameters from the Earth to Mars importation. Will disappear in future dev
727================================================
728================================================
729
730== 17/06/2011 == EM
731>>> Updates and corrections (to enable compiling/running in debug mode with
732    ifort)
733- removed option "-free-form" from makegcm_ifort and set mod_loc_dir="."
734  so that module files (produced in local directory by ifort)
735  are moved to LIBO
736- updated initracer.F, physdem1.F, physiq.F, inichim_newstart.F
737  to avoid referencing out-of-bound array indexes (even if unused)
738- cosmetic updates on inwrite.F, datareadnc.F
739- updated newstart.F to initialize and use 'datadir' when looking for files
740- corrected bug on interpolation of sub-surface temperatures in
741  lect_start_archive.F
742
743== 17/06/2011 == AC
744>>> Important updates to thermals parameters
745- Tuned aspect ratio of thermals to suit Buoyancy estimations from LES in CLOSURE relation
746- Renormalization of alim_star after plume
747- Removed alimentation mixing of estimated Teta in plume
748>>> Minor change in makegcm_ifort
749
750== 22/06/2011 == EM
751- added modifications (from JYC & FGG) to tracer.h & initracer.F for ions
752- minor improvement to newstart.F (q=x option, check that tracer index
753  provided by user is valid).
754- minor correction to callradite.F (to enable compilation in debug mode
755  with ifort when there is only one tracer).
756
757== 17/06/2011 == AC
758- Added maximum vertical velocity and heat flux output from thermals
759- Added buoyancy diagnostics
760- Minor modifications in thermals routines
761
762== 23/06/2011 == EM
763- correct bug (introduced previously) in lect_start_archive.F on loop
764  boundaries for soil temperature.
765
766== 01/07/2011 == AC
767- Added new settings for the Martian thermals from new LES observations
768- Revamped thermcell's module variables to allow it's removal
769- Minor changes in physiq and meso_physiq for the call to thermals
770- Switched from dynamic to static memory allocation for all thermals variable
771to gain computation speed
772
773== 04/07/2011 == AC
774- Minor setting modification to thermals
775- Added new flux optimization in thermcell_main_mars.F90, to run properly in 3D
776
777== 14/07/2011 == JBM
778- Tidying up dust properties in DATAFILE for better consistency (cf. suaer.F90)
779- Cosmetic changes in aeropacity.F (changed comment and put a print inside a water flag)
780
781== 15/07/2011 == EM
782>> Implemented using 'z0' roughness length map (important: 'z0' reference
783   field is in datafile surface.nc, which has also been updated).
784- made z0 a z0(ngridmx) array and moved 'z0' from 'planete.h' to 'surfdat.h';
785  added a 'z0_default' (common in surfdat.h) corresponding to the 'control'
786  array value (contole(19) in startfi.nc).
787- adapted 'tabfi.F' to use 'z0_default'.
788- adapted 'phyetat0.F' to look for a 'z0' field in startfi.nc. If 'z0' is not
789  found in the startfi.nc file, then the uniform default value (z0_default)
790  is used.
791- modified 'physdem1.F' to write 'z0' field to restart.nc
792- adapted use of z0() in 'physiq.F' (diagnostic computation of surface stress),
793  'vdifc.F' and 'vdif_cd.F'.
794- adapted 'dustdevil.F' to use 'z0_default'.
795- 'testphys1d.F' now uses 'z0_default', and the value to use can be set
796  in run.def (with "z0=TheValueYouWant").
797- modified 'datareadnc.F' to load reference map of 'z0' from surface.nc, and
798  added a 'z0' option in 'newstart.F' to force a uniform value of z0. Note
799  that the use of the z0 map is automatic when using newstart, but only when
800  it loads a start_archive.nc file.
801
802== 15/07/2011 == AS
803- Modified the mesoscale part so that the previous change by EM does not
804  imply an error in the mesoscale case. More development is needed though
805  to get the "varying z0" capability in the mesoscale model.
806- Worked on versions of meso_physiq and meso_inifis as close as possible
807  to physiq and inifis for more continuity in the process of impacting changes
808  (and even possibly to reach a common version of physiq and inifis).
809  >>> The main point is to make the mesoscale significant specific parts
810  coded into include files in meso_inc so that meso_physiq and meso_inifis
811  looks very close to physiq and inifis.
812  >>> This is completely transparent for GCM users who does not need the
813  contents of meso_inc.
814- Slight cosmetic changes to physiq.f and inifis.F
815  --- some of them e.g. to prepare convergence between meso_physiq and physiq
816- Dropped the meso_ prefix from the slope routines
817  (currently those are only used in the mesoscale model,
818   but one could imagine using those in hi-res GCM runs)
819- Added a MESOSCALE flag to writediagfi so that mesoscale simulations
820  are not bothered with calls put in routines by GCM people
821
822== 19/07/2011 == AS
823- Finished converging meso_physiq.F and meso_inifis.F towards physiq.F and inifis.F
824  --> see previous point 15/07/2011
825  --> meso_ routines no longer exist (everything is in meso_inc and transparent to GCM users)
826  --> GCM routines include mesoscale parts within MESOSCALE precompiler commands
827  --> MESOSCALE parts are as hidden as possible not to mess up with GCM users/developers
828- Cleaned inelegant or useless #ifdef [or] #ifndef MESOSCALE in physiq and inifis so that
829  a minimum amount of such precompiler commands is now reached [mainly related to I/O]
830- Added the SF08 slope insolation model in the general physics parameterizations.
831  Added a callslope keyword in inifis.F and callkeys.h
832  --> This keyword is False by default / True if you use -DMESOSCALE
833- Removed the obsolete call to Viking Lander 1 diagnostic
834  Replaced it with a diagnostic for opacity at the domain center [valid for GCM and mesoscale]
835
836== 01/08/2011 == EM
837- Fixed bug in readtesassim (timeflag was not always set before being used)
838
839== 03/08/2011 == AC
840- Modified physiq.F to interface new SL parametrization
841- New SL parametrization based on a bulk Richardson Monin-Obukhov theory formulation
842   Stability functions are taken from D.E. England et al. (95)
843   Similarity functions coefficients based on Dyer and Hicks (70).
844   Includes thermal roughness length computation, heat and momentum drag coefficient computation
845   Can be used to output hydrodynamic-related SL quantities (bulk Richardson, turbulent Prandtl number estimation, Reynolds number)
846- Minor modification in thermcell_dqupdown.F to suit picky compilers
847- vdifc.F Now takes into account sub-grid gustiness, evaluated from thermals activity (it's proxy being the maximum vertical velocity)
848- Minor modification in meso_inc_les.F: u* is now taken from the new vdifc and not recomputed from a simple law
849== 08/08/2011 == AC
850- Formula correction for the Reynolds in vdif_cd : will affect the thermal roughness length. Results obtained with the precedent formula (previous commit) probably underestimate by about 1K the temperature in the mixing layer.
851- Added a new subroutine to libf/phymars called surflayer_interpol.F. This routine can be called as a diagnostic for interpolation of horizontal velocity norm and temperature in the surface layer, in 1D or 3D. The output height is controlled by a parameter z_out, to be set in physiq.F. This might be later added to a .def file. z_out is set to 0. by default, resulting in no call to this subroutine.
852
853== 16/08/2011 == AC
854- Minor modification in physiq.F to pass Ch from vdifc to meso_inc_les
855- Major modification to the formulation of integrals in surflayer_interpol.F
856  Now stable for most cases. Some cases with highly negative Monin Obukhov length
857  remain to be explored.
858- Added gustiness to the Richardson computation in vdif_cd.F. Gustiness factor is for now of beta=1., after
859  several comparisons with LES aerodynamic conductances. May be subject to a minor change (+/- 0.1)
860  in the near future. (almost transparent for the user)
861- Minor modifications relative to variables in vdifc.F.
862- Esthetic change to calltherm_mars.F
863- Changed the definition for HFX computation in the LES in meso_inc/meso_inc_les.F. New definition yields
864  very similar results to old one and follows a strict definition of what HFX should be.
865
866== 24/08/11 == TN
867Attempts to tune the water cycle by adding outliers
868       + A few structural changes !!
869* watercap.h is now obsolete and removed -- all is in surfdat.h
870* watercaptag initialized in surfini.F (up to 7 areas defined) instead of initracer.F
871  - settings proposed by AS commented
872  - experiments by TN decommented. use with caution.
873* water ice albedo and thermal inertia in callphys.def and inifis.F
874* water ice albedo in surfini.F
875* water ice albedo computation in albedocaps.F90
876* alb_surfice is now obsolete in physiq.F, albedo_h2o_ice is used instead
877* frost_albedo_threshold defined in surfdat.h
878* water ice thermal inertia in soil.F
879TODO: * calibrate thermal inertia and ice albedo
880      * have a look at subgrid-scale ice with dryness ?
881
882== 07/09/2011 == AC
883
884- Added new flag for the Richardson-based surface layer :
885
886callrichsl, can be changed in callphys.def
887
888One should always use the thermals model when using this surface layer model.
889Somes cases (weakly unstable with low winds), when not using thermals, won't be well represented by the
890Richardson surface layer. This stands for Mesoscale and Gcm but not for LES model.
891
892Correct configs :
893
894callrichsl = .true.
895calltherm = .true.
896
897callrichsl = .false.
898calltherm = .false.
899
900callrichsl = .false.
901calltherm = .true.
902
903Previously unstable config :
904
905callrichsl = .true.
906calltherm = .false.
907
908- To be able to run without thermals and with the new surface layer, a modification has been made to
909physiq.F to account for gustiness in GCM and MESOSCALE for negative Richardson, so that :
910
911callrichsl = .true.
912calltherm = .false.
913
914can now be used without problems, but is not recommended.
915
916- Consequently, callrichsl = .false. is now the default configuration for thermals.
917
918We recall the available options in callphys.def for thermals :
919
920outptherm = BOOLEAN (.false. by default) : outputs thermals related quantities (lots of diagfi)
921nsplit_thermals = INTEGER (50 by default in gcm, 2 in mesoscale) : subtimestep for thermals model.
922         It is recommended to use at least 40 in the gcm, and at least 2 in the mesoscale.
923         The user can lower these values but should check it's log for anomalies or errors regarding
924         tracer transport in the thermals, or "granulosity" in the outputs for wmax, lmax and hfmax.
925
926== 08/09/11 == AS
927LMDZ.MARS + MESOSCALE.
928---> Setting up a more realistic water ice source at the poles (notably outliers)
929
930[[ surfini.F ]]
931Main changes and bug fixes
932* reference to comcstfi.h was wrong. big problem because e.g. pi was not known.
933* commented about a problem to be fixed, due to surfini being called before initracer.
934* MESOSCALE: put the mesoscale north cap definition into a precompiling flag #MESOSCALE
935             for the moment: if [alb_mean_TES > 0.26 and lat > 70] then outliers
936             (previously done in meso_inc_caps.F)
937   
938[[ inifis.F ]]
939Just changed a comment with wrong formatting
940
941--> below, only MESOSCALE
942
943[[ soil.F ]]
944if somewhere IT > IT_outliers, then makes it = IT_outliers
945
946[[ physiq.F ]]
947[[ meso_inc/meso_inc_caps.F ]]
948[[ meso_inc/meso_inc_ini.F ]]
949meso_inc_caps no longer called. keep for reference for the moment.
950
951[[ meso_inc/meso_inc_var.F ]]
952deleted lines with *_lim variables, now useless
953
954== 08/09/11 == EM
955-Fixed problem about undefined tracer names in 'surfini.F' by calling
956 'initracer' before 'surfini' in physiq.F
957
958== 09/09/11 == AS
959--> Fixed a problem with .eq. used with booleans in physiq.F
960[some good picky compilers complain about this]
961--> Added a warning in inifis about using
962callrichsl = .false.
963calltherm = .true.
964which is not recommended. The new surface layer has been built to go
965with the new mixing layer scheme (thermals). And anyway it is a much
966better scheme than the previous one.
967
968== 09/09/11 == AC
969
970 This is a major update for thermals and richardson layer parametrization. This update stabilizes thermals (further
971 studies might show that we can reduce the value of nsplit in gcm. To be tested.), and prevent downdrafts from descending into
972 the surface layer, which was acting as a cold feedback on the thermals. The Richardson surface layer now features
973 different gustiness coefficients for Richardson, heat and momentum so that u* and t* are correctly represented.
974 
975 Upcoming updates will change surflayer_interpol.F90 to implement those changes in the interpolation scheme as well.
976 
977 ***************************
978 IMPORTANT : several parts of the vdifc code might want to use these new definitions for gustiness, u* and t*. exemple : dust devil routines
979 that recompute u* ? lifting routines ? TODO !
980 **************************
981 
982 
983 M             289   libf/phymars/thermcell_main_mars.F90
984 ^-----------------> Added iterations to the velocity / buoyancy / entrainment / detrainment
985                     computation to ensure correct convergence. Iteration number is for now set to
986                     4, which is probably too much. This will be changed once several cases are tested.
987                     The minimum is probably 2 iterations.
988 
989 M             289   libf/phymars/vdifc.F
990 ^-----------------> Subgrid gustiness parametrization now uses different gustiness beta coefficients
991                     for heat and momentum. Comparisons with LES at Exomars landing site, matching u*
992                     and teta* suggests values of beta=0.7 for momentum and beta=1.2 for heat, where
993                     the formula for large scale horizontal winds in the first layer is :
994                          U0^2 = pu^2 + pv^2 + (beta*wmax_th)^2
995 
996 M             289   libf/phymars/vdif_cd.F
997 ^-----------------> LES data suggests that Richardson number distribution during daytime has a very large
998                     standart deviation due to highly negative Richardsons on several gridpoints. As a consequence,
999                     the mean Richardson in daytime in the LES is much more negative than in LES. In the gcm,
1000                     parametrized subgrid turbulence prevents such cases, which can be dangerous in nearly unstable conditions.
1001                     Hence, we use beta=0.5 instead of one, so that we keep the anti-crazy-hfx function of beta and we increase the
1002                     norm of negative Richardsons in general for daytime conditions. This is set in conjonction with
1003                     beta settings for heat and momentum in vdifc.
1004 
1005 M             289   libf/phymars/meso_inc/meso_inc_les.F
1006 ^-----------------> HFX and USTM computations now uses the different betas for heat and momentum.
1007
1008== 21/09/11 == AS
1009--> Added MESOINI precompiler flag so that all fields needed to initialize the mesoscale model
1010     are being output in the diagfi.nc file. Previously it was made through a separate physiq.F
1011     which needed to be updated every time...
1012--> This is completely transparent to the casual GCM users and only appears in the WRITEDIAGFI section of physiq.F
1013
1014== 21/09/11 == AC
1015
1016Revision on several settings for the thermals model. This version relies on fits done for an article to be published, and is more precise.
1017
1018 M             299   libf/phymars/thermcell_main_mars.F90
1019 ^-----------------> Changed downdraft to updraft mass flux ratio from -1.8 to -1.9
1020                     Changed first level for downdraft mixing from k=3 to k=2. Only level 1 is non-mixed now.
1021                     Changed coefficients for downdraft to updraft thermal buoyancy ratios.
1022
1023 M             299   libf/phymars/calltherm_mars.F90
1024 ^-----------------> Changed r_aspect_thermals from 2. to 1.5 for the GCM version to better match buoyancy profiles.
1025
1026== 29/09/11 == AS
1027--> To easily explore sensitivity to lifting thresholds: in dustlift.F, ustar_seuil=sqrt(stress/rho)
1028    and alpha_lift[dust_mass] can be prescribed through an external stress.def parameter file.
1029    --- alpha_lift[dust_number] is computed from alpha_lift[dust_mass] as in initracer.F
1030    --- ustar_seuil is more user-friendly than stress because direct comparison with ustar from model
1031--> For the moment this is MESOSCALE only, but potentially useful to everyone
1032
1033== 30/09/11 == TN
1034>> Bug correction in lect_start_archive.F ; in some cases layer(:) was not
1035   initialized.
1036
1037
1038== 10/10/2011 == AC
1039
1040***********
1041This commit aims at increasing the thermals speed. Using these corrections, gcm performances in 64x48x32 using 1 tracer goes from 27.9% elapsed time in thermals to 18.76%.
1042
1043***********
1044Additional work needs to be done in tracer advection to gain speed in high tracer number configuration. (tracer advection (but not momentum nor temperature) could be decoupled from sub-timestep, as they do not act on the thermals scheme (water vapor is neglected as we use theta and not theta_v, and radiative effect of dust is not computed in the thermals.))
1045
1046***********
1047=> TOP 5 of routine contributions to gcm runtime :
1048
1049Each sample counts as 0.01 seconds.
1050  %   cumulative   self              self     total
1051 time   seconds   seconds    calls   s/call   s/call  name
1052 18.76      6.33     6.33      960     0.01     0.01  thermcell_main_mars_
1053 17.19     12.13     5.80                             __svml_powf4.A
1054 13.72     16.76     4.63    10369     0.00     0.00  filtreg_
1055  3.94     18.09     1.33                             __intel_new_memset
1056  3.73     19.35     1.26     2880     0.00     0.00  thermcell_dqupdown_
1057
1058note: thermcell_main_mars_ does call quite a lot power computations (see __svml_powf4.A), but this number will not increase with tracer numbers.
1059
1060***********
1061=> LOG:
1062
1063M             312   libf/phymars/thermcell_main_mars.F90
1064^------------------- removed (commented) computations on buoyancy which is purely diagnostic
1065                     tuned internal convergence loop and added convergence criterion
1066
1067M             312   libf/phymars/thermcell_dqupdown.F90
1068^------------------- removed (commented) downdraft-related if-loops (as we do not advect tracers and momentum in downdrafts for now)
1069
1070M             312   libf/phymars/calltherm_mars.F90
1071^------------------- removed (commented) diagnostic-related computations
1072                     changed default thermals spliting and aspect ratio
1073                     corrected a bug where maximum height was not correctly computed and could result in convective adjustment used in place of thermals
1074                     when using certains sets of nsplit and r_aspect (was not happening with the baseline version, so that this correction is transparent to
1075                     users)
1076********************
1077
1078== 14/10/2011 == AS + AC
1079- Monin-Obukhov length is now output from surflay_interpol and written in diagfi if z_out not 0.
1080- in calltherm_interface, defaut settings for qtransport_thermals and dtke_thermals
1081
1082== 20/10/2011 == EM
1083- added FF's upgrade of writediagfi. Now, if at runtime there is a diagfi.def
1084  file, it should contain the list of variables (1 per line) than will be put
1085  in the diagfi.nc file. If there is no diagfi.def file, then all variables
1086  are put in the diagfi.nc file (as was the case before).
1087 
1088== 21/10/2011 == EM
1089- Corrected small bug in newstart: initracer was not always used and thus
1090  some tracer indexes (igm_co2, igcm_h2o_vap,...) were not set. This
1091  however means that we now also call inifis from newstart and that we read
1092  in flags set in 'callphys.def' (required for sanity checks in initracer).
1093  Also adapted 'inichim_readcallphys': removed some obsolescent tests on
1094  number of tracers for given combinations of options.
1095
1096== 21/10/2011 == AS
1097- Added possibility for CH4 tracer in tracer.h and initracer.F
1098
1099== 27/10/11 == AS
1100--> Added geticecover.F90 which computes seasonal ice cover given ls, lati(ngrid), long(ngrid)
1101    as proposed by T. Titus from TES observations [fitting functions for crocus line]
1102    ... output is icecover(ngrid) which value is 0 [no ice cover] or 1 [ice cover]
1103    ... no calculations are done for latitudes between -40 and +40 [ice cover is directly set to 0]
1104--> In physiq.F, co2ice is set to a dummy high value to simulate a CO2 cap
1105    wherever icecover(ngrid) is 1. This is done at each timestep before newcondens is called.
1106--> For the moment this is MESOSCALE only, but potentially useful to everyone.
1107
1108== 28/10/11 == FL + AS
1109ADDED THE NEW FRAMEWORK FOR PHOTOCHEMISTRY
1110This is not the last version. A new rewritten version of calchim.F [using LAPACK] is yet to be committed.
1111--> A new version for photochemistry routines : *_B.F no longer exists, new routines in aeronomars
1112D              333   libf/aeronomars/photochemist_B.F
1113D              333   libf/aeronomars/init_chimie_B.F
1114A                0   libf/aeronomars/read_phototable.F
1115M              333   libf/aeronomars/calchim.F
1116A                0   libf/aeronomars/photochemistry.F
1117M              333   libf/aeronomars/chimiedata.h
1118--> Changed calls to calchim and watercloud [surfdust and surfice needed] in physiq.F
1119--> Left commented code for outputs in physiq.F [search for FL]
1120--> Added settings which works for 35 levels in inidissip.F according to FL. Commented for the moment.
1121--> Checked compilation and run, looks fine. Note that 'jmars.20101220' is needed.
1122
1123== 02/11/2011 == AC
1124
1125***********
1126This commit aims at increasing the thermals speed, especially for large tracer number configurations. The idea behind this commit is to advect non-active conserved variables outside of the sub-timestep of the thermals. Because these variables are not used in thermals computation, we can decouple them:
1127
1128momentum: can be decoupled because we assume a constant ratio between horizontal velocity in alimentation layer and maximum vertical velocity in the thermal
1129s.
1130
1131tracer: can be decoupled because we do not take condensation of any tracer into account and hence do not liberate latent heat nor form clouds in the thermal
1132s.
1133
1134temperature: cannot be decoupled (of course)
1135***********
1136
1137D             336   libf/phymars/thermcell_dqupdown.F90
1138^----------------   Deleted and replaced by a simpler version. Notes about downdraft advection are still available from revision 336 of SVN in thermcell_dqu
1139pdown.
1140
1141A               0   libf/phymars/thermcell_dqup.F90
1142^----------------   New upward advection for tracers and momentum in thermals. Several changes are done compared to the old approach:
1143                          - Updraft quantities are not longer computed by making hypothesis on the amount of advected air.
1144                          - In general, the formalism for updraft computation is much simpler and clearer.
1145                          - Tracer tendancies are no longer computed using the conservation equation. Instead, we use the divergence
1146                          of an approximated turbulent flux of the concerned quantity, where downdraft are also neglected.
1147
1148M             336   libf/phymars/thermcell_main_mars.F90
1149^----------------   The Main does not call anymore thermcell_dqupdown, which it was doing 2+tracer_number times per subtimestep (140 times per physical step for a 2 tracer config)
1150
1151M             336   libf/phymars/calltherm_mars.F90
1152^----------------   Entrainment, detrainment and mass-fluxes are recomputed in  the sub-timestep loop. Their final value after iterations is used by the new
1153 advection routine to compute tracer and momentum fluxes.
1154
1155*********** Results
1156
1157- Conservation of tracers has been assessed over 1 yr in 1D and found to be comparable to that obtained with the simple convective adjustment. (it actually
1158seems to be better by a factor of 10%!)
1159- GCM speed-up is of about 20% compared to the old thermal configuration, for a 2 tracer case.
1160- Advection of sharp tracer profiles has been successfully observed, similar to the old method.
1161
1162== 07/11/11 == JBM
1163>>> Changed watercloud.F to call two separate routines,
1164simpleclouds.F or improvedclouds.F, which are a simplified and
1165full microphysical scheme for cloud formation, respectively.
1166Removed the tag called "improved" in watercloud.F, and added
1167another tag called "microphys" which is defined in callphys.F
1168instead. Changed routines: callkeys, inifis, physiq, watercloud.
1169
1170>>> Reimplemented the use of typical profiles of dust particle sizes
1171and CCNs in simpleclouds.F. Corrected the previously used
1172analytical CCN profile. Moved ccn_factor to simpleclouds.F,
1173which won't be used in the new microphysical scheme. Changed
1174routines: aeropacity, physiq, simpleclouds, watercloud.
1175
1176>>> Computed rdust at the end of callsedim instead of updatereffrad,
1177except at firstcall. Renamed rfall into rsedcloud and moved it
1178in simpleclouds. Moved nuice_sed to initracer.F and added it to
1179tracer.h. Changed routines: callsedim, physiq, tracer.h,
1180watercloud, initracer, simpleclouds, updatereffrad.
1181
1182>>> Added two tracers for the CCNs. Added the different tests in
1183initracer.F to make sure that, for example, microphys is not
1184used without doubleq, etc. Corrected an inconsistency in
1185callsedim.F, and changed the way r0 is updated. Changes
1186routines: callsedim, inifis, initracer, physiq, testphys1d,
1187tracer.h.
1188
1189>>> Added the ability to have a spatially variable density in
1190newsedim (same method as that used for the radius of
1191sedimentation). Required the addition of one input to newsedim,
1192which is the size of the density variable "rho". Changed
1193routines: callsedim, newsedim.
1194
1195>>> Added an output to aeropacity called "tauscaling", which is a
1196factor to convert dust_mass and dust_number to true quantities,
1197based on tauvis. Removed ccn and qdust from aeropacity, which
1198are obsolete now.
1199
1200>>> Wrote improvedcloud.F which includes all the microphysical
1201scheme, and connected it to the sedimentation scheme. Added and
1202changed routines: callsedim, physiq, growthrate, nuclea,
1203improvedclouds, initracer, watercloud, microphys.h.
1204
1205== 07/11/11 == TN
1206
1207>> Added CCN & dust tracers updates in physiq.F
1208Corrected a bug that can give negative CCN numbers, due to the
1209use of single precision values (only 6 decimals) whereas up to 10E+10
1210CCN can be formed or disappears...
1211
1212>> Corrected physical bug that causes h2o_vap or h2o_ice
1213to be negative in improvedclouds.F.
1214
1215>> Corrected physical bug that causes CCN & dust tracers
1216to be negative in improvedclouds.F when all ice sublimates and
1217releases dust
1218
1219>> Added parameter contact mteta in callphys.def
1220Default value is still 0.95, see inifis.F
1221
1222>> Changed tendancy computation for dust_number in improvedclouds.F
1223that was not the right one. Indeed, the scavenged dust_number tracer
1224is computed from the dust_mass one, and its tendancy before scavenging
1225must be taken into account to compute its scavenging's tendancy.
1226
1227== 09/11/11 == AS
1228
1229Added a more recent version of concentrations.F by FL
1230
1231== 22/11/11 == EM
1232>> Added FL corrections to aeronomars/photochemistry.F :
1233- Bug correction on the chemistry time step (now set to 1/3rd of the
1234  physics time step)
1235- Updated kinetics coefficients (according to JPL 2011)
1236
1237== 22/11/11 == TN
1238
1239>>Changed scavenging in improvedclouds.F : CCNs are now virtual like dust
1240to avoid tauscaling divergence.
1241
1242>>Water ice radius is now updated after sedimentation in callsedim.F.
1243Added tau, tauscaling and zzlay as arguments
1244
1245>>Commented aggressive outputs at first call in suaer.F90, aeropacity.F
1246
1247== 23/11/11 == FGG + MALV
1248
1249>> New parameterization of the NLTE 15 micron cooling. The old parameterization is kept as an option, including or not variable atomic oxygen concentration. A new flag is introduced in callphys.def, nltemodel, to select which parameterization wants to be used (new one, old one with variable [O], or old one with fixed [O], see below). Includes many new subroutines and commons in phymars. Some existing routines are also modified:
1250
1251-physiq.F. Call to the new subroutine NLTE_leedat in first call. Call to nltecool modified to allow for variable atomic oxygen. Depending on the value of nltemodel, the new subroutine NLTEdlvr09_TCOOL is called instead of nltecool.
1252
1253-inifis.F. Reading of nltemodel is added.
1254
1255-callkeys.h Declaration of nltemodel is added.
1256
1257The following lines should be added to callphys.def (ideally after setting callnlte):
1258
1259# NLTE 15um scheme to use.
1260# 0->  Old scheme, static oxygen
1261# 1->  Old scheme, dynamic oxygen
1262# 2->  New scheme
1263nltemodel = 2
1264
1265A new directory, NLTEDAT, has to be included in datagcm.
1266
1267>> Improvements into NLTE NIR heating parameterization to take into account variability with O/CO2 ratio and SZA. A new subroutine, NIR_leedat.F, and a new common, NIRdata.h, are included. A new flag, nircorr, is added in callphys.def, to include or not these corrections. The following files are modified:
1268
1269-nirco2abs.F: nq and pq are added in the arguments. The corrections factors are interpolated to the GCM grid and included in the clculation. A new subroutine, interpnir, is added at the end of the file.
1270
1271-physiq.F: Call to NIR_leedat added at first call. Modified call to nirco2abs
1272
1273-inifis: Reading new flag nircorr.
1274
1275-callkeys.h: Declaration of nircorr.
1276
1277The following lines have to be added to callphys.def (ideally after callnirco2):
1278
1279# NIR NLTE correction for variable SZA and O/CO2?
1280# matters only if callnirco2=T
1281# 0-> no correction
1282# 1-> include correction
1283nircorr=1
1284
1285A new data file, NIRcorrection_feb2011.dat, has to be included in datagcm.
1286
1287>> Small changes to the molecular diffusion scheme to fix the number of species considered, to avoid problems when compiling with more than 15 tracers (for example, when CH4 is included). Modified subroutines: aeronomars/moldiff.F and aeronomars/moldiffcoeff.F
1288
1289== 24/11/11 == TN
1290
1291>> corrected minor bug in updatereffrad.F : reffdust was not saved
1292
1293>> ccn_factor as not correctly used in sedimentation.
1294It is now initialized in inifis.F, declared in tracer.h and
1295used in both simpleclouds.F & callsedim.F to update ice radius.
1296
1297>> Commented diagfi outputs in aeropacity.F & improvedclouds.F for
1298non scavenging users.
1299
1300
1301== 06/12/11 == TN
1302
1303>> tiny change : nuice_sed initialisation is now done in inifis. Also changed initracer and improvedclouds.
1304
1305
1306== 08/12/2011 == EM
1307>> Include changes and updates for photochemistry by FL:
1308- aeronomars/calchim.F : change in units of surface density.
1309- aeronomars/surfacearea.F : new routine to compute ice and dust surface area
1310                             (m2/m3) available for heterogeneous reactions.
1311- phymars/initracer.F : bug correction: initialize igcm_ch4 and change loop
1312                        bounds (when guessing tracer names/properties with
1313                        old input files).
1314- phymars/watercloud.F : cleanup.
1315- phymars/physiq.F : add call to surfacearea; photochemistry is now called
1316                     after sedimentation to take into acount updated rdust
1317                     and rice.
1318 
1319== 08/12/2011 == EM
1320>> more updates for photochemistry:
1321-aeronomars/inichim_newstart.F : add methane + bug correction in "oldnames" case
1322-aeronomars/read_phototable.F : adapt routine so that photolysis table file
1323                                name may be set in the def file with
1324                                phototable = filename
1325                                (default is "jmars.20111014")
1326
1327
1328== 09/12/2011 == EM
1329>> more updates for photochemistry from FL: improved aeronomars/surfacearea.F ,
1330  with a change in arguments.
1331
1332== 14/12/2011 == EM
1333>> fixed bug in callsedim.F: recomputation of rdust and rice should only be done
1334   if the appropriate tracers and flags are set.
1335>> commented out call to uertst in ch.F (uertst crashes with gfortran and is
1336   moreover puerly diagnostic messages).
1337>> In nltecool.F: Enforced using igcm_* indexes to identify tracers and not
1338   hard coded fixed numbers (which would lead to a disaster in cases where the
1339   order of tracers was changed).
1340
1341== 14/12/2011 == AC
1342>> Improved computation of mixing in vdifc for temperatures less than the saturation
1343   temperature.
1344   The scheme works by computing mixing of T and then liberating latent heat when T<Ts.
1345   Taking into account the mass of co2 ice condensated, a new mixing profile for T is computed.
1346   When the computation has converged, the tendancy for mixing of T is taken with respect to
1347   the initial T profile for which co2 ice has been condensated.
1348>> This scheme is based on initial work done by Melanie Vangvichith and has been adapted/tested/bug-fixed
1349   and improved to Mars.
1350
1351== 15/12/2011 == EM
1352>> minor correction in aeronomars/calchim.F and aeronomars/surfacearea.F :
1353   calls to wstats should always be embeded in if (callstats) condition.
1354   
1355== 19/12/2011 == TN
1356>> new option in newstart: 'ini_h2osurf', water ice surface initialisation to keep seasonal frost
1357   but get rid of polar cap positive or negative values.
1358
1359== 20/12/2011 == AS
1360>> new option possible in callphys.def: tituscap [logical]
1361.true. will call functions geticecover to yield a nice evolving CO2 cap as measured by Titus (mostly useful for mesoscale)
1362.false. is the default option, so this change is transparent to the casual user
1363
1364== 11/01/2012 == AC
1365>> Corrections to the thermals scheme following latest revisions of the related paper. Replaced the surface layer interpolator by a more
1366complete routine, that will ultimately become a post-processing utility (and disappear from libf) and a subroutine in the MCD.
1367
1368== 23/11/11 == FGG
1369>> Cleanup of the NLTE routines which have been packed together to limit the
1370   number of files. Also enforced that file names are non-capitalized (needed
1371   by the create_make_gcm scripts to better evaluate dependencies when
1372   building the makefile).
1373   
1374== 07/02/12 == JYC
1375>> Adding the new molecular diffusion routines (old "moldiff" and "moldiffcoeff"
1376   are kept for now and if further tests are needed):
1377   moldiffcoeff_red.F, moldiff_red.F90, diffusion.h
1378   Also updated "phymars/comdiurn.h", "aeronomars/conc.h" and
1379   "aeronomars/chimiedata.h" to be fixed/free form compatible.
1380
1381== 09/02/12 == EM
1382>> Updated the makegcm(s) so that default behaviour is to set LMDGCM env variable
1383   to be the directory in which the makegcm script is. Updated the makegcm_*
1384   to use "SOURCE" to identify main program to compile
1385>> Adapted "create_make_gcm" script so that it can compile a main program that
1386   is either something.F or something.F90. Also added that object files are
1387   removed from archive before compiling a new version.
1388
1389== 10/02/12 == TN
1390>> Major update on watercycle: a smaller integration timestep is now used
1391   in watercloud.F, sedimentation of clouds is done in watercloud instead of
1392   callsedim.F
1393>> Temperature-dependant contact parameter in nuclea.F
1394>> No dust lifting if CO2 ice in vdif.c
1395>> Ice integrated column opacity is written in diagfi from physiq.F, instead
1396   of aeropacity.F. Mandatory if iradia is not 1.
1397>> New definition of permanent ice in surfini.F and possibility to have an ice
1398   cap in it in 1d.
1399>> Update in deftank: callphys.def.outliers,run.def.1d; added traceur.def.scavenging
1400
1401== 15/02/12 == AS
1402>> Optimization of watercycle new capabilities, e.g.:
1403   ... in nuclea, removed 'if' from function fshape, modified **, decrease number of overall variables
1404   ... in growthrate and newsedim, modified **
1405   ... in improvedclouds, modified **, improved recursive calls to erf (now loop w/ 2 erf + 1 log instead of 4 erf + 4 log)
1406>> Checked consistency with previous formulations
1407>> Code 35% faster with a Valles Marineris mesoscale run in springtime (set imicro=25)
1408   ... probably even better at cloudier seasons
1409
1410== 23/02/12 == AS
1411>> In improvedclouds and waterclouds, added optimizations
1412   ... moved calculations to firstcall
1413   ... moved 'if' statement so that only useful calculations are performed
1414>> Code about 10% faster [tests carried out with mesoscale summer Tharsis run]
1415>> Check with a GCM run that results similar
1416
1417== 27/02/12 == AC
1418>> Continuation of thermals setting, comparisons with mesoscale results on Case C
1419>> Added possibility to call gcm (or 1d) with constant prescribed sensible heat flux, in the spirit of direct comparisons with LES
1420   ... This is directly comparable to the variable tke_heat_flux in namelist.input
1421   ... Requires the use of yamada4.F from terrestrial GCM (mixes more, seem more numerically stable)
1422   ... Usually requires high timesteps (>1000) to avoids crashes. Best approach is to compare
1423   height of first model level z1 and teta_1 between LES and 1D, and increase the timesteps until results
1424   between the two models are comparable (might require a slitghly different tke_heat_flux between the two models
1425   due to difference in vertical diffusion schemes and subgrid effects)
1426   ... Syntax for use is to add "tke_heat_flux = ..." in callphys.def
1427>> Corrected some stuff with tke transport in thermals (which is anyway deactivated but one day maybe...)
1428
1429== 02/03/12 == EM
1430>> bug fix in "aeronomars/moldiff_red.F90" (wrong mmol array size in included
1431   subroutine) + adapted extreme limit test for H to altitudes of ~4000km
1432   (compatble with 50 layer model).
1433>> bug fix in "nirco2abs.F" index of "co2" and "o" tracers were hard coded as
1434   1 and 3!
1435>> updates from FGG of euvheat.F, callkeys.h and inifis.F to have the
1436   "euveff" parameter read from callphys.def
1437>> added missing call to surfacearea before call to calchim in physiq (mea
1438   culpa) and also moved photochemistry so it occurs after sedimentation.
1439
1440== 06/03/12 == EM
1441>> Added option "q=profile" in newstart to initialize a given tracer with
1442   a profile specified in an ASCII file.
1443>> Minor fix on lect_start_archive : when tracers were not found, a default
1444   value was asked to user, but twice! Once is enough.
1445
1446== 07/03/12 == AC
1447********************************************************
1448>> UPDATE ON PARAMETERS TO SET TO USE THE THERMALS MODEL
1449********************************************************
1450
1451>> IN CALLPHYS.DEF <<
1452---------------------
1453
1454- calltherm = .true.       > activates the thermals
1455- callrichsl = .true.      > activate the Richardson Monin Obukhov surface layer
1456with subgrid gustiness, and the yamada4 diffusion model from earth (corrected version of vdif_kc)
1457- leave calladj = .true.   > so that the convective adjustment may work ABOVE the PBL.
1458
1459>> IN RUN.DEF <<
1460----------------
1461
1462- 96 physicial timesteps per day (the internal sub-timestep of thermals will adapt
1463so that it costs only 10% more CPU time to go from "48pdt+thermals" to "96pdt+thermals".)
1464> this has to be respected because of a coupling between the radiative transfer and thermals
1465> if you really wish to run with 48 pdt/day, you may want to deactive the thermals...
1466
1467>> USEFULL DIAGNOSTICS <<
1468-------------------------
1469
1470- activating the thermals will automatically add 3 2D-outputs to diagfi.nc files:
1471> zmax_th : interpolated boundary layer height (m)
1472> hfmax_th : maximum vertical eddy heat flux reached in thermals (K.m/s)
1473> wstar : free convection velocity reached in thermals (m/s)
1474
1475A rule of thumb for determining the mean velocities in subgrid-scale structures is:
1476
1477Mean updraft velocity : ~ wstar
1478Maximum updraft velocity : ~ 2 or 3.*wstar
1479Mean downdraft velocity : ~ 0.66*wstar
1480Maximum absolute value of downdraft velocity : ~ 2.*wstar
1481
1482>> AT COMPILATION TIME <<
1483-------------------------
1484
1485- +1 vertical level during the compilation, and then using the updated z2sig.def
1486
1487>> UPDATED Z2SIG.DEF <<
1488-----------------------
1489
1490- one level has been added in the PBL, so that to reach 150km you have to compile with
149133 vertical levels instead of 32.
1492
149310.00000     H: atmospheric scale height (km) (used as a reference only)
14940.0020736
14950.015735
14960.0600151
14970.163344
14980.36358
14990.708007
15001.25334
15012.06571
15023.22069
15034.80327
15046.90787
15059.63834
150613.108
150718.9666
150825.0626
150931.5527
151038.4369
151145.4369
151252.4369
151359.4369
151466.4369
151573.4369
151680.4369
151787.4369
151894.4369
1519101.4369
1520108.437
1521115.437
1522122.437
1523129.437
1524136.437
1525143.437
1526150.437
1527157.437
1528164.437
1529171.437
1530178.437
1531185.437
1532192.437
1533199.437
1534206.437
1535213.437
1536220.437
1537227.437
1538234.437
1539241.437
1540248.437
1541255.437
1542262.437
1543269.437
1544276.437
1545283.437
1546290.437
1547297.437
1548304.437
1549311.437
1550318.437
1551325.437
1552332.437
1553339.437
1554346.437
1555353.437
1556360.437
1557367.437
1558374.437
1559381.437
1560388.437
1561395.437
1562
1563********************************************************
1564>> END OF UPDATE ON PARAMETERS FOR THE THERMALS MODEL
1565********************************************************
1566
1567== 12/03/12 == EM
1568>> correction in nirco2abs: io and ico2 should be declared as integers
1569>> Update sponge: remove posibility of specifying 'hsponge', all modes
1570   apply to the last upper "nsponge" layers (default nsponge=3) and
1571   sponge time scale doubles with every level, starting from top.
1572
1573== 12/03/12 == FL + EM
1574>> update a coefficient in photochemistry.F and some cleanup in watercloud.F
1575  and physiq.F.
1576
1577== 29/03/12 == JYC + EM
1578>> Update vertical grid resolution for diffusion.
1579 
1580== 30/03/12 == EM
1581>> Updated model so that 1) reference pressure for opacity is now 610 Pa (and
1582   not 700 Pa anymore) and 2) the new MY24-MY30 dust scenarios (input files
1583   dust_MY24.nc, dust_MY25.nc, ..., dust_MY30.nc) can be used
1584   (when setting iaervar=24,25,...,30 in callphys.def): changed
1585   "readtesassim.F90" into "read_dust_scenario.F90" and apadpted aeropacity.F.
1586   one can still use the "old" MY24-MY25-MY26 (input files dust_tes_MY24.nc,
1587   dust_tes_MY25.nc and dust_tes_MY26.nc) scenarios by setting
1588   iaervar=124, 125 or 126 in callphys.def.
1589
1590== 31/03/12 == AS & FF
1591>> Deleted obsolete lines in solarlong   
1592
1593== 13/04/12 == FL
1594>> Update of the chemistry package:
1595- calchim.F90 :
1596  - upgraded from calchim.F
1597  - can run with or without CH4
1598  - fixed the mass conservation scheme
1599- photochemistry.F :
1600  -chemistry timestep is now independant from physics timestep
1601  -can run with or without a CH4 tracer
1602  - removed initial tests on species, since these are already done in calchim
1603- removed inichim_readcallphys.F (not used any more)
1604- concentrations.F: adaptated to better handle indexes and molar masses of
1605                    tracers. "ncomp" (in chimiedata.h) no longer needed.
1606- inichim_newstart.F90 : rewritten and cleaned (won't be compatible with
1607                         old start files where tracer names are q01,...).
1608                         Now handles hybrid levels and automaticaly adapts
1609                         depending on which tracers are available.
1610- newstart.F : adapted to followup changes in inchim_newstart.F90 and some
1611               cleanup around the initialization of tracer names and surface
1612               values.
1613
1614== 18/04/12 == TN
1615>> New scheme in improvedclouds.F based on an analytical solution of the crystal radius growth equation
1616>> Sedimentation of clouds done in callsedim.F, as it was done before version 520
1617>> Latent heat release of sublimating ground ice in vdifc.F
1618>> Bug corrected in lwu.F, that was a source of NaN for very thick water ice clouds
1619>> Bug corrected in updatereffrad.F, ice and dust radius are now updated each timestep before radiative transfer
1620
1621== 20/04/12 == EM
1622>> Some cleanup on messages and comments in code about the reference pressure
1623   for dust opacity which is now 610 Pa.
1624
1625== 25/04/12 == TN
1626>> The new scheme does not work for now. Instead, use of a subtimestep for nucleation and growth.
1627
1628== 26/04/12 == FGG+FL
1629>> Update of the chemistry package, including:
1630- 93 reactions are accounted for (instead of 22); tracking 28 species (instead
1631  of 11)
1632- computation of photoabsorption using raytracing
1633- improved time stepping in the photochemistry
1634- updated parameters (cross-sections); with this new version input files
1635   are in 'EUV/param_v5' of "datafile" directory.
1636- transition between lower and upper atmosphere chemistry set to 0.1 Pa
1637  (calchim.F90)
1638- Lots of code clean-up: removed obsolete files column.F, param_v3.h,
1639  flujo.F, phdisrate.F, ch.F, interpfast.F, paramfoto.F, getch.F
1640  Converted chemtermos.F -> chemthermos.F90 and euvheat.F -> euvheat.F90.
1641  Added paramfoto_compact.F , param_v4.h and iono.h
1642- Upadted surfacearea.F
1643- Cleaned initracer.F and callkeys.h (removed use of obsolete "nqchem"
1644  and "oldnames" case when initializing tracers).
1645- Minor correction in "callsedim": compute "rdust" and/or "rice" only when
1646  it makes sense.
1647
1648== 03/05/12 == JYC+EM
1649- Update of molecular diffusion routines (diffusion.h, moldiff_red.F90
1650  and moldiffcoeff_red.F): optimized to run faster and diffuse only
1651  specific tracers (if they are present).
1652- bugs fixed in simpleclouds.F (extra arguments) and watercloud.F (wrong
1653  arguments in call to simpleclouds and rdust() should only be recomputed
1654  if dust_mass & dust_number tracers are available).
1655
1656== 04/05/12 == JYC+EM
1657- some syntax corrections in thermcall_main_mars, vdif_cd, pbl_parameters
1658  which cause problems when compiling with some strict compilers (g95, gfortran)
1659- added an initialisation of 'varian' in initracer for cases when using
1660  conrath dust; because that value can be is used elsewhere (e.g. surfacearea)
1661
1662== 11/05/12 == FGG+FL
1663- aeronomars/inichim_newstart.F : initialization of chemistry now handles
1664  nitrogen species and ions
1665- aeronomars/conc.h : cleanup of obsolete variables
1666- aeronomars/chimiedata.h : cleanup of obsolete variables
1667
1668== 12/05/12 == FGG+JYC+EM
1669- updated high atmosphere photochemistry (jthermcalc.F, param_v4.h, iono.h,
1670  paramfoto_compact.F, param_read.F , thermosphere.F).
1671- minor change in calchim.F90 (to not use maxloc(zycol, dim = 2) function
1672  which seems to be a problem for g95) .
1673- minor bug fix in perosat.F; set tendency on pdqscloud for h2o2 to zero if
1674  none is computed.
1675- in "moldiff.F", changed "tridag" to "tridag_sp", "LUBKSB" to "LUBKSB_SP"
1676  and "LUDCMP" to "LUDCMP_SP" to avoid possible conflicts with same routines
1677  defined in "moldiff_red.F". Added use of automatic-sized array in "tridag"
1678  and "tridag_sp" local array "gam" (to avoid using an a priori oversized
1679  local array).
1680
1681== 21/05/12 == JYC+FL
1682- corrected bug in computation of HCO2+ in paramfoto_compact.F
1683- avoid infinite H2O saturation ratio at very low temperatures in improvedclouds.F
1684
1685== 29/05/12 == EM
1686- Added the possibility to use the "cold" (iaervar=6) or "warm" (iaervar=7)
1687  dust scenarios (derived from the 7 MY24 to MY30 scenarios) in
1688  aeropacity.F and read_dust_scenario.F
1689
1690== 04/06/12 == AC
1691- Code re-organization in diverse parts of the GCM code. These are NOT cosmetic
1692changes, but are needed for compilation of the Mesoscale model in NESTED configuration
1693using the new physics.
1694
1695== 05/06/12 == AS
1696- Change few function names in nlte_aux.F so that nesting is possible. This is
1697completely transparent to GCM users.
1698
1699== 06/06/12 == EM
1700- Minor cleanup in surfini.F
1701- Corrected the polar mesh surface area which was wrong in the physics (changes
1702  in phyetat0.F, calfis.F and newstart.F)
1703
1704== 14/06/12 == EM
1705- update z2sig.def file in deftank with improved vertical discretization for
1706  better thermals (this update should should have been done a while back...)
1707
1708== 14/06/12 == FGG
1709- Added possibility to run with a varying EUV cycle following real one.
1710  The flag solvarmod=1 triggers this behaviour, with companion flag
1711  solvaryear=## , where ## is the Mars Year (from 23 to 30).
1712  Setting solvarmod=0 reverts to 'old' behaviour, where there is a constant
1713  EUV forcing throughout the run, set by the "solarcondate" flag.
1714- Needs corresponding input data files ("param_v6" subdirectory of "EUV"
1715  subdirectory in "datadir").
1716- Added files jthermcalc_e107.F and param_read_e107.F in "aeronomars",
1717  modified files euvheat.F90, hrtherm.F, chemthermos.F90, param_v4.h and
1718  param_read.F in "aeronomars" and files inifis.F, physiq.F and callkeys.h
1719  in "phymars".
1720
1721== 15/06/12 == EM
1722- Minor fix in "nuclea.F", max() and min() functions must have arguments
1723  of identical types.
1724- Bug correction in "physiq.F": only water (and possibly dust and cnn if
1725  using microphysics) tracer tendencies should be updated after call
1726  to watercloud.
1727
1728== 22/06/12 == EM
1729- Enforce that imposed TES ice albedo can never be greater than 0.9
1730
1731== 28/06/12 == JYC+EM
1732- Decreased time step for molecular diffusion (diffusion.h) for better stability
1733- Added test in moldiff_red.F90 to enforce that the system can't be stuck in an
1734  infinite loop.
1735- The creation and output of coefficients in file 'coeffs.dat' in moldiff_red.F
1736  is now controled by an internal flag (by default set to false).
1737
1738== 12/07/12 == TN
1739- Use of stats.def to write variables in stats.nc, same as diagfi.def
1740- some outputs in physiq.F
1741
1742== 25/07/12 == TN
1743- Added module updaterad.F90, that computes ice and dust radius:
1744  ---> for ice particles: typical profile (even if doubleq is used) or microphysics
1745  ---> for dust particles: geometric mean radius (sedimentation,radiative transfer)
1746                           or mass mean radius (for heterogenous nucleation of microphysics)
1747- Possibility to use microphys without scavenging:
1748     dust population will not be affected by nucleation and CCN release
1749- New ice definition in surfini, based on latest CO2 cycle parameters
1750
1751== 07/08/12 == FGG + MALV
1752- Improvement of the NLTE 15um scheme (for running with nltemodel = 2); now
1753  MUCH faster than previously (by a factor 5 or so):
1754- Improvements included to the parameterization:
1755  - Cool-to-space calculation included above P(atm)=1e-10, with a soft
1756    merging to the full result (without the CTS approximation) below that
1757    level
1758  - exhaustive cleaning of the code, including FTNCHK and reordering of
1759    loops, subroutines and internal calls
1760  - simplification of the precomputed tables of CO2 bands' atmospheric
1761    transmittances
1762  - the two internal grids (the one used in the CTS region and the one
1763    below) have been , in order to reduce the CPU time consumption
1764  - reading of the spectroscopic histograms is made only once, at the
1765    beginning of the GCM, to avoid repetitive readings of ASCII files
1766  - F90 matrix operations (matmul,...) included.
1767- Changes in routines:
1768  - removed nlte_leedat.F
1769  - updated nlte_calc.F, nlte_tcool.F, nlte_aux.F
1770  - updated nlte_commons.h, nlte_paramdef.h
1771  - added nlte_setup.F
1772- Important: The input files (in the NLTEDAT directory) read as input by
1773  these routines have changed. the NLTEDAT directory should now on contain
1774  only the following files:
1775   deltanu26.dat  enelow27.dat  hid26-3.dat  parametp_Tstar_IAA1204.dat
1776   deltanu27.dat  enelow28.dat  hid26-4.dat  parametp_VC_IAA1204.dat
1777   deltanu28.dat  enelow36.dat  hid27-1.dat
1778   deltanu36.dat  hid26-1.dat   hid28-1.dat
1779   enelow26.dat   hid26-2.dat   hid36-1.dat
1780
1781== 08/08/12 == EM
1782>> Some minor changes and adaptations for the MCDv5 runs:
1783- removed the 'nice' instruction from run0 script
1784- update dissipation factors in inidissip.F (fac_mid=3,fac_up=30,startalt=70)
1785- add some outputs in physiq.F
1786- put example def files used for MCDv5 simulations in deftank:
1787  callphys.def.MCD5 run.def.64x48x49.MCD5 traceur.def.MCD5
1788
1789== 08/08/12 == FGG
1790>> commented out some messages in nlte_tcool.F (which were informations
1791   useful and meaningful during code development only)
1792
1793== 27/08/12 == FGG
1794>> bug correction in the varying EUV case; now correctly account for things
1795   as the year cycles.
1796
1797== 20/09/2012 == EM
1798>> update of zrecast utility: add possibility to have automatic "MCD/GCM"
1799   altitude above surface levels as well as the possibility to specify min,
1800   max and number of levels.
1801
1802== 21/09/2012 == EM
1803>> Adapted code so that it can run fractions of days: e.g. if "nday=1.5" in
1804  run.def, then run a sol and a half, "nday=0.75" to run three quarters of
1805  a sol... Of course the fraction should correspond to a number of complete
1806  dynamics/physics cycles. The fraction of the sol that a (re)start.nc
1807  file corresponds to is (read)written as 'Time' in the file.
1808
1809== 25/09/2012 == EM
1810>> Minor improvement for running fractions of sols; enforce some rounding of
1811   'Time' (ie: fraction of day) read from the start.nc file in order to limit
1812
1813== 05/11/2012 == TN
1814>> Added new option : ndynstep in run.def, that allows to run for a specific number a dynamical timesteps.
1815   If ndynstep is not specified or is negative, nday is used. Otherwise nday value is discarded.
1816   The problem with nday alone is that one can only run the GCM for a decimal fraction of one sol.
1817
1818== 06/11/2012 == EM
1819>> update of zrecast utility: now the planetary constants (radius, gravity,
1820   reduced gas constant) are read from the "controle" array in the file and
1821   not hard coded. That way zrecast can also be used for the generic model.
1822   Note that the "distance to center of Mars" and "MCD" options still contain
1823   some hard coded Mars constants.
1824
1825== 15/02/2013 == TN
1826>> Various bugs
1827- watercloud.F : latent heat release was not correctly added
1828- updaterad.F90 : minimal rdust is changed from 0.1 to 0.01 microns
1829- vdifc.F : The scheme with potential temperature mixing that takes into acount CO2 condensation
1830            could not work without CO2 condensation (callcond=false) -- see commit r473
1831            This caused a quick GCM crash. Now there is no condensation at all with callcond=false
1832- physiq.F : pressure levels are now correctly used with surface pressure changes due to CO2
1833             condensation. Only zplev and zplay variables should be used in physiq.
1834             Bug corrected in case of scavenging=false that led to instabilities. CCN tracers were not checked.
1835- makegcm : use of phy$physique instead of phymars for scatterrers
1836 
1837== 25/02/2013 == EM
1838- added "-fp-model precise" option when compiling with ifort (fixes unexplained
1839  mass loss of tracer in the dynamics)
1840 
1841== 27/02/2013 == EM
1842- minor bug correction in newcondens.F and some code tidying (in co2snow.F also).
1843
1844== 12/03/2013 == EM
1845- added possibility to set slope parameters in testphys1d
1846
1847== 12/03/2013 == TN
1848- added possibility to use the radiative slope scheme in the 3D-GCM
1849
1850== 10/05/2013 == FGG
1851- bug correction in "extract" utility
1852
1853== 02/07/2013 == TN
1854>> Added the possibility to store multiple initial states in one start/startfi
1855>> New option 'ecrithist' in run.def to write data in start/startfi every ecrithist
1856   dynamical timestep (default is to write it at the end of the GCM run).
1857>> New option 'timestart' in run.def to initialize the GCM with the time timestart
1858   stored in start (default is last time).
1859>> This new feature is (supposedly) totally RETROCOMPATIBLE. Changes are:
1860  - Time axis added in startfi
1861  - Time axis can be longer than one in start/startfi
1862  - Possibility to initialize the GCM with old start/startfi
1863  - Compatibility with start2diagfi, newstart, testphys1d, expandstartfi
1864  - Absolute date is stored in diagfi for less-than-a-day runs
1865>> Quick documentation about dates :
1866  - Day at the beginning of the start (integer) is stored in controle(4)
1867    for start and diagfi and controle(3) for startfi.
1868  - Fraction of the day at the beginning of the start (real between 0 included and 1 excluded)
1869    is stored in controle(29) for start, controle(27) for diagfi and controle(4) for startfi.
1870  - The "Time" variable stores all the dates from the beginning of the start (positive real)
1871    for start, startfi and diagfi
1872  - Time is stored in start_archive in the "Time" variable.
1873  - Time-related data in the controle field of start_archive are useless.
1874For instance the i-th date of diagfi is controle(4)+controle(27)+Time(i)
1875
1876== 04/07/2013 == EM
1877- Removed options "-static" and "-xSSE4.2" from ifort default options from
1878  makegcm_ifort (-static not usable on Gnome computer, and not much benefit
1879  anyways, and -xSSE4.2 causes unexplained crashes with thermosphere on
1880  Gnome)
1881
1882== 18/07/2013 == EM
1883- Bug fix: when running with photochemistry, ccns did not sediment! Fixed
1884  initracer.F. Also added that callsedim/newsedim use updated temperatures.
1885- Converted run0 and run_mcd scripts to bash.
1886
1887== 26/07/2013 == FGG +JYC
1888- Upgrade on the thermospheric photochemical reaction rates. These are now
1889  read in from a file "chemthermos_reactionrates.def".
1890
1891== 06/09/2013 == AC + EM + AS
1892- Cleaned and commented version of thermal plume model with automatic arrays
1893- Checked: exact same results than before modifications
1894
1895== 11/09/2013 == EM
1896- Bug fix in vdifc.F: in some cases, some elements of pdqsdif() were not given
1897  any value. In all cases, it is safer to start with clean initialization of
1898  output tendencies to zero.
1899- Bug fix in concentration.F: error in cpi() and aki() indexes led to
1900  wrong computation of atmospheric conductivity and specific heat.
1901
1902== 11/09/2013 == EM
1903- IMPORTANT CHANGE: Implemented dynamic tracers. It is no longer necessary to
1904  compile the model with the '-t #' option, number of tracers is simply read
1905  from tracer.def file (as before).
1906  Adapted makegcm_* scripts (and co.) accordingly.
1907  Technical aspects of the switch to dynamic tracers are:
1908  - advtrac.h (in dyn3d) removed and replaced by module infotrac.F
1909  - tracer.h (in phymars) removed and replaced by module tracer_mod.F90 (which
1910    contains nqmx, the number of tracers, etc. and can be used anywhere in the
1911    physics).
1912- Included some side cleanups: removed unused files (in dyn3d) anldoppler2.F,
1913  anl_mcdstats.F and anl_stats-diag.F, and all the unecessary dimensions.*
1914  files in grid/dimension.
1915- Checked that changes are clean and that GCM yields identical results (in
1916  debug mode) to previous svn version.
1917
1918== 13/09/2013 == AS
1919- Performed the necessary modifications for dynamic tracers
1920  to work with the mesoscale model
1921- Added precompiling flag MESOSCALE around pressure modifications
1922  done in revision 883. This makes the mesoscale model become crazy.
1923
1924== 21/09/2013 == EM
1925- Bug fix in yamada4.F: values for near-surface diffusion coefficients were
1926  used but not set.
1927- NB: FH recommends updating to latest yamada4 from Earth GCM and using
1928  their iflag_pbl=11 scheme.
1929
1930== 23/09/2013 == EM
1931- IMPORTANT CHANGE: Removed all reference/use of ngridmx (dimphys.h) in
1932  routines (necessary prerequisite to using parallel dynamics); in most
1933  cases this just means adding 'ngrid' as routine argument, and making
1934  local saved variables allocatable (and allocated at first call).
1935  In the process, had to convert many *.h files to equivalent
1936  modules: yomaer.h => yomaer_h.F90 , surfdat.h => surfdat_h.F90 ,
1937  comsaison.h => comsaison_h.F90 , yomlw.h => yomlw_h.F90 ,
1938  comdiurn.h => comdiurn_h.F90 , dimradmars.h => dimradmars_mod.F90 ,
1939  comgeomfi.h => comgeomfi_h.F90, comsoil.h => comsoil_h.F90 ,
1940  slope.h => slope_mod.F90
1941- Also updated EOF routines, everything is now in eofdump_mod.F90
1942- Removed unused routine lectfux.F (in dyn3d)
1943
1944== 31/10/2013 == TN
1945- Added a freedust mode, to be used with doubleq :
1946  Dust is not lifted, not rescaled, dust opacity is predicted instead of being forced.
1947  A corresponding freedust option is added in newstart to rescale dust to acceptable values
1948  before such a GCM run, although 'q=profile' could be used too.
1949
1950== 13/11/2013 == AS
1951--> Added precompiling flag MESOSCALE around pressure modifications
1952    done in revision 883. This makes the mesoscale model become crazy.
1953
1954== 20/11/2013 == EM
1955- Correction: in physiq.F, move newcondens (CO2 condensation routine) so that
1956  it is the last atmospheric physical process to be computed.
1957- Also corrected the setting of the South Pole surface temperature to
1958  CO2 condensation temperature (when obliquity < 27) to account for varying
1959  CO2 mixing ratio. This operation is now done in newcondens.
1960
1961== 28/11/2013 == FGG
1962- Bug fix: Sun-Mars distance was not correctly taken into account in the
1963  solvarmod==1 (daily varying realistic EUV input) case.
1964
1965== 10/12/2013 == FGG
1966- Improved 15um cooling routines, with also better handling of errors.
1967
1968== 18/12/2013 == EM
1969- Bug fix in thermcall_main_mars, layer thickness "zdz" must be recomputed
1970  in every do ig=1,ngrid loop.
1971
1972== 20/12/2013 == EM
1973Series of changes to enable running in parallel (using LMDZ.COMMON dynamics);
1974Current LMDZ.MARS can still notheless be compiled and run in serial mode
1975"as previously".
1976Summary of main changes:
1977- Main programs (newstart, start2archive, xvik) that used to be in dyn3d have
1978  been moved to phymars.
1979- dyn3d/control.h is now module control_mod.F90
1980- rearanged input/outputs routines everywhere to handle serial/MPI cases.
1981  physdem.F => phyredem.F90 , phyetat0.F => phyetat0.F90 ; all read/write
1982  routines for startfi files are gathered in module iostart.F90
1983- added parallelism related routines init_phys_lmdz.F90, comgeomphy.F90,
1984  dimphy.F90, iniphysiq.F90, mod_grid_phy_lmdz.F90, mod_phys_lmdz_mpi_data.F90,
1985  mod_phys_lmdz_mpi_transfert.F90, mod_phys_lmdz_omp_data.F90,
1986  mod_phys_lmdz_omp_transfert.F90, mod_phys_lmdz_para.F90,
1987  mod_phys_lmdz_transfert_para.F90 in phymars
1988  and mod_const_mpi.F90 in dyn3d (for compliance with parallel case)
1989- created generic routines 'planetwide_maxval' and 'planetwide_minval', in
1990  module "planetwide_mod", that enable obtaining the min and max of a field
1991  over the whole planet.
1992
1993== 08/01/2014 == EM
1994- Update of the read_dust_scenario routine: when input dust scenarios file
1995  contain variable "dustop", it is assumed to be visible extinction opacity,
1996  and if it is "cdod" (recent change, for the MCDv5.1 dust scenarios), then
1997  it is IR absorption opacity (and is multiplied by 2.6 to be converted to
1998  visible extinction opacity).
1999
2000== 12/03/2014 == EM
2001- Bug fix in surfini.F, nb_ice array should be the size of the full grid.
2002  Only was an issue when runiing in MPI and mode icelocationmode = 1
2003  Note that it would make more sense for the initialization of watercaptag and co.
2004  to be done in newstart, and that these values be stored in startfi.nc
2005
2006== 12/03/2014 == TN
2007- Added tauscaling (the conversion factor from virtual to real dust) in startfi.nc file.
2008  It is needed for 3 cases:
2009  1. Compute ice particles size when using microphysics on the first physics step
2010     before the call to the radiative transfer (updatereffrad)
2011  2. The conversion to real dust values with newstart, to be used for the freedust mode.
2012  3. It brings the necessary information for the calculation of the dust 3D opacity
2013     from start & startfi files only when using virtual dust.
2014  If tauscaling is not present, the default value is 10^-3 everywhere when needed.
2015  If the freedust mode is used, tauscaling is equal to 1 everywhere.
2016  Modified accordingly startfi and start_archive writing and reading routines.
2017
2018== 24/03/2014 == AS
2019--> fixed a potential bug in thermal plume model because zlmax was computed both in thermcell_main_mars and calltherm_interface... so made it an OUT argument
2020 of calltherm_interface. also: changed the name to limz. and added precompiling flags to avoid the use of planetwide in MESOSCALE. in MESOSCALE we just go hi
2021gh enough (nlayer-5) and do not care about computational cost (although we certainly gain from not using MAXVAL).
2022--> moved allocations upward in inifis. does not change anything for GCM, but make MESOSCALE modifications simpler, and overall make inifis better organized:
2023 first allocations, then reading callphys.def file.
2024--> added precompiling flags around lines that are both useless for MESOSCALE (notably I/O) and recently adapted to parallel computations in the GCM
2025--> tidied up what is MESOSCALE vs. GCM in surfini
2026
2027== 15/04/2014 == AS
20281. No more SAVE,ALLOCATABLE arrays outside modules.
2029     This is important to solve the nesting conundrum in MESOSCALE.
2030     And overall this is good for the harmony of the universe.
2031     (Joke apart, this is good for any interfacing task. And compliant with a F90 spirit).
2032     Note that bit-to-bit compatibility of results in debug mode was checked.
20332. inifis is split in two : phys_state_var_init + conf_phys
2034     This makes interfacing with MESOSCALE more transparent.
2035     This is also clearer for LMDZ.MARS.
2036     Before, inifis has two very different tasks to do.
20373. a bit of cleaning as far as modules and saves are concerned
2038
2039== 15/04/2014 == AS
2040Replaced comcstfi and planete includes by modules
2041
2042== 18/04/2014 == EM
2043Some minor fixes and cleanup.
2044- use surfdat_h, ... qsurf was missing in start2archive
2045- 'tauscaling' was missing from argument list when calling physdem1
2046  in testphys1d
2047
2048== 19/04/2014 == FF+EM
2049Add "composition" option in newstart to enable global modification of
2050CO2,N2,Ar,O2 and CO mixing ratios. Plus some cleanup on physics variables
2051(saved arrays) which have been moved to modules.
2052
2053== 01/05/2014 == AS
2054- Filling geom arrays is now out of phys_var_state_init. Done
2055  through a merged function ini_fillgeom within the comgeomfi_h module.
2056- Cosmetic changes
2057- New interface with the mesoscale model: lesser amount of dirty MESOSCALE includes
2058
2059== 04/05/2014 == AS
2060- Further reduction of the amount of MESOSCALE precompiling steps and code bits
2061- Changed the I/O interface with the mesoscale model
2062  --> I are not longer arguments but are passed through modules
2063  --> O are no longer generated as additional includes
2064      but passed through the module comm_wrf.F90
2065      !! this new module is harmless
2066      !!   in GCM applications
2067      !!   (arrays are not allocated)
2068- Note: the easiest for interfacing is to put all fields
2069        to be output in a module with allocatable arrays.
2070        see for instance in turb_mod for ustar.
2071        but this could conflict with GCM developers' habits
2072        so we use the comm_wrf.F90 strategy instead for
2073        several arrays (radiative transfer, clouds, etc...)
2074
2075== 07/05/2014 == EM+FF
2076Some fixes and updates:
2077- addfi (dyn3d): Add correction on theta when surface pressure changes
2078- vdif_cd (phymars): Correction for coefficients in stable nighttime case
2079- jthermcalc (aeronomars): Fix for some pathological cases (further investigations
2080  on the origin of these is needed)
2081
2082== 09/05/2014 == AS
2083- Added a flag callyamada4 in callphys.def to activate or not the latest version
2084for subgrid-scale mixing. It is T by default.
2085- Warnings in conf_phys modified accordingly.
2086
2087== 10/05/2014 == AS
2088- Further reduction (or 'factorisation') of mesoscale includes
2089- ustar and tstar are calculated in vdifc. so no need to recalculate
2090  those elsewhere. use turb_mod module to store it.
2091
2092== 11/05/2014 == AS
2093- Number of scatterers no longer prescribed at compiling time
2094- Number of scatterers must now be set in callphys.def (keyword: naerkind)
2095- Added in dimradmars_mod a subroutine ini_scatterers to initialize arrays once naerkind is known
2096  -- NB: ini_scatterers is not called in phys_var_init
2097  --     but rather in conf_phys once naerkind is read in callphys.def
2098- Checks + names of scatterers moved from callradite to conf_phys
2099- Put what was in scatterers.h in dimradmars_mod
2100- Put what was in aerkind.h in dimradmars_mod
2101- Put what was in yomaer_h in dimradmars_mod
2102- Moved conc_mod in phymars rather than aeronomars.
2103  Otherwise pb of cyclic dependencies (plus compiling without aeronomars is impossible).
2104
2105== 14/05/2014 == FGG
2106- Bug fix in jthermcalc.F: rounding issues in computation of the solar zenith
2107  angle when SZA slightly greater than 90
2108- Corrected misleading warning in nlte_tcool.F
2109
2110== 20/05/2014 == AS
2111IMPORTANT CHANGE
2112- Remove all reference/use of nlayermx and dimphys.h
2113- Made use of automatic arrays whenever arrays are needed with dimension nlayer
2114- Remove lots of obsolete reference to dimensions.h
2115- Converted iono.h and param_v4.h into corresponding modules
2116   (with embedded subroutine to allocate arrays)
2117   (no arrays allocated if thermosphere not used)
2118- Deleted param.h and put contents into module param_v4_h
2119- Adapted testphys1d, newstart, etc...
2120- Made DATA arrays in param_read to be initialized by subroutine
2121   fill_data_thermos in module param_v4_h
2122- Optimized computations in paramfoto_compact (twice less dlog10 calculations)
2123- Checked consistency before/after modification in debug mode
2124- Checked performance is not impacted (same as before)
2125
2126== 21/05/2014 == EM
2127- Bug fix in thermosphere.F, always initialize all tendencies to zero. (only
2128  really matters in cases when only some of the included parametrizations
2129  are used).
2130
2131== 02/06/2014 == EM
2132- Add possibility to use clim or MY31 dust scenarios (and realistic EUV for MY31).
2133
2134== 11/07/2014 == EM
2135- Changed the variable passed from LMDZ.MARS dynamics to physics: it is now
2136a mass flux (kg/s) which is then converted to a vertical velocity (m/s) in
2137the physics. This is to be consistent with what is done in LMDZ.COMMON.
2138
2139== 26/08/2014 == FGG
2140- Bug fix: Enforce recomputation of reaction rates at every call of
2141  routine prodsandlosses (in paramfoto_compact.F)
2142
2143== 06/10/2014 == TN
2144- New option dustiropacity in callphys.def to change the reference IR opacity
2145  of dust. Default is 'tes' (like before), the new one is 'mcs'. A new output,
2146  dsodust, is the density scaled opacity of dust, to be compared with MCS
2147  measurements, along with dustiropacity='mcs'. Future evolutions of this option
2148  could include other instruments, or be used for water ice.
2149
2150== 20/10/2014 == JYC
2151- Update and bug correction on the escape fluxes of H and H2.
2152
2153== 13/02/2015 == EM
2154- Update pbl_parameter with corrected version by Anne-Flore Moreau.
2155
2156== 26/02/2015 == EM
2157- Update default location for "datadir" files, now at
2158  http://www.lmd.jussieu.fr/~lmdz/planets/mars/datadir
2159  or /u/lmdz/WWW/planets/mars/datadir for local users.
2160
2161== 04/03/2015 == FF+EM
2162- Some cleanup in iniorbit.F
2163
2164== 12/03/2015 == EM
2165- Some cleanup in the dynamics/physics interface.
2166
2167== 23/03/2015 == EM
2168- Follow-up to cleanup in dynamics/physics interface. Add iniprint.h to be
2169  in line with what is done in LMDZ.COMMON dynamics.
2170
2171== 31/03/2015 == EM
2172- Reorganizing the physics/dynamics interface, for better compatibility
2173  between models and with the parallel LMDZ.COMMON dyn core. Main structural
2174  changes are:
2175* misc: (replaces what was the "bibio" directory)
2176- Should only contain extremely generic (and non physics or
2177  dynamics-specific) routines
2178* dynlonlat_phylonlat: (new interface directory)
2179- This directory contains routines relevent to physics/dynamics grid
2180  interactions, e.g. routines gr_dyn_fi or gr_fi_dyn and calfis
2181- Moreover the dynlonlat_phylonlat contains directory "phymars".
2182  This subdirectories should only contain specific interfaces (e.g.
2183  iniphysiq) or main programs (e.g. newstart or xvik).
2184* phymars/dyn1d: this subdirectory contains the 1D model.
2185
2186== 24/06/2015 == EM
2187- Missing "use logic_mod" added in testphys1d
2188- Changed the "use comconst_mod" inistats to use information from physics
2189  (comconstfi_h module) rather than dynamics.
2190- Moved "iniprint.h" back to dyn3d (and added link to it in dyn1d), as it
2191  is preferable to not share modules/commons between physics and dynamics.
2192
2193== 04/08/2015 == TN
2194- New option supersat to allow for the supersaturation of water vapor.
2195  Default value is True. The goal is to disable supersaturation even
2196  with microphysics for comparison purposes.
2197
2198== 19/11/2015 == EM
2199- Added option "-cpp" so that users can add the definition of specific
2200  precompiling flags in makegcm_* scripts (and added default BLAS and
2201  LAPACK flags for ifort on Gnome and Ada).
2202- Put calls to dgesv (Lapack) routine in photochemistry_asis.F90 under the
2203  LAPACK preprocessing flag. Moved secondary routines in photochemistry.F and
2204  photochemistry_asis.F90 into the main (via contains instruction) to avoid
2205  multiple definitions of routines with identical names.
2206
2207== 19/11/2015 == EM
2208- set things in param_read_e107.F and read_dust_scenario.F90 to read MY32
2209  EUV and dust forcings.
2210
2211== 13/01/2016 == EM
2212- Improvement on planetwide_min/max/sum for the 3D fields which assumed the vertical dimension to be klev.
2213  Now works for any (klon,...) field.
2214
2215== 25/03/2016 == EM
2216- Code reorganization (to mach comming evolutions on all planetary models),
2217  created a "phy_common" directory to contain routines common (wrt structural
2218  nature of underlying code/grid) to all LMDZ-related physics packages.
2219- Adapted "create_make_gcm" and "makegcm*" scripts accordingly
2220  (deleted obsolete makegcm_g95)
2221
2222== 28/03/2016 == EM
2223- Added module "regular_lonlat_mod.F90" (to store information on global
2224  lon-lat grid) in phy_common.
2225- Turned iniphysiq (in dynlonlat_phylonlat/phymars)into module
2226  "iniphysiq_mod.F90".
2227
2228== 29/03/2016 == EM
2229- Added "time_phylmdz_mod.F90" module to store information on time and
2230  calendar in the physics, should be used instead of accessing "temps_mod"
2231  from the dynamics. And moved daysec and dtphys from module "comcstfi_h"
2232  to module "time_phylmdz_mod".
2233- Made "phys_state_var_init" a module
2234
2235== 30/03/2016 == EM
2236- Got rid of references to "control_mod" from the physics. Added a couple
2237  of relevent variables for outputs in time_phylmdz_mod.
2238
2239== 02/04/2016 == EM
2240- Got rid of references to "dimensions.h" from physics packages:
2241  use nbp_lon (=iim), nbp_lat (==jjp1) and nbp_lev
2242  from module mod_grid_phy_lmdz (in phy_common) instead.
2243- Added "ioipsl_getin_p_mod.F90" (getin_p routine) in phy_common to
2244  correctly read in parameters from *.def files in a parallel environment.
2245
2246== 07/04/2016 == EM
2247- Some fixes for buggy outputs in 1D introduced by previous code modifications.
2248- made statto.h a module.
2249- ecritphy in dyn3d/control_mod.F90 should be an integer, not a real.
2250
2251== 08/04/2016 == EM
2252- Fix for the 1D model initializations.
2253
2254== 13/04/2016 == EM
2255- Some code reorganization: "dynlonlat_phylonlat" directory becomes
2256  "dynphy_lonlat".
2257- "iniprint.h" moved from "dyn3d" to "misc".
2258
2259== 17/04/2016 == EM
2260- fix for 1D in writediagfi to enable writing at
2261  "ecritphy" rate.
2262- removed iniprint.h from phymars/dyn1d since it is in "misc"
2263- Some code cleanup in anticipation of future updates:
2264 - changed variable names in comgeomphy.F90: give them more
2265   explicit names: rlond => longitude ,
2266   rlatd => latitude, airephy => cell_area,
2267   cuphy => dx , cvphy => dy
2268 - removed long(), lati() and area() from comgeomfi_h.F90,
2269   use longitude(), latitude() and cell_are() from
2270   comgeomphy.F90 instead
2271
2272== 22/04/2016 == EM
2273- Updates and cleanup wrt dynamics/physics separation:
2274  Removed init_phys_lmdz.F90 and comgeomphy.F90 from phymars;
2275  comgeomphy is replaced by geometry_mod (located in phy_common).
2276  Added physics_distribution_mod.F90 in phy_common and
2277  mod_interface_dyn_phys.F90 in dynphy_lonlat.
2278  Added nrtype.F90 (contains math const. like PI, etc.) in "misc"
2279
2280== 25/04/2016 == LS
2281- Bug fix in read_dust_scenario.F90 to handle the limit case
2282  of identical realday and time() values at the end of the year.
2283
2284== 02/05/2016 == JL+EM
2285- bug fix in calfis: wrong array (pw) sent to physics: the transfered
2286  mass flux should be on the physics grid, not the dynamics grid.
2287  Moreover values at the poles needed to be correctly recomputed.
2288
2289== 06/05/2016 == EM
2290- turn physiq.F into module physiq_mod.F
2291
2292== 07/05/2016 == EM
2293- Bug fix in testphys1d, enforce iphysiq=1 after conf_phys (where its
2294  value might be modified).
2295
2296== 12/05/2016 == EM
2297- Fix in wstats: use "def_var_stats" and not "def_var" (intended for
2298  writediagfi) or else outputs are always single precision.
2299
2300== 20/05/2016 == AS+EM
2301- cleanup around iniphysiq: separate things between planet-independent
2302  initializations (now done by inigeomphy in dynphy_lonlat) and
2303  mosre physics-package specific things (remain in iniphysiq).
2304
2305== 27/05/2016 == EM
2306- missing libf/dynphy_lonlat/phymars/inigeomphy_mod.F90 in previous commit
2307
2308== 12/07/2016 == EM
2309- move initialization of dimphy from inigeomphy to iniphysiq (initializations
2310related to routines in phy_common or dynphy_lonlat can be done in
2311inigeomphy, but any initialization for modules/routines in a physics
2312package (directory phymars) must be done in the related phymars/iniphysiq
2313routine.
2314
2315== 27/07/2016 == EM
2316- further cleanup in the dynamics/physics interface: stop sending information
2317  about tracer advection (tracerdyn) back from physics to dynamics as this
2318  input parameter can be read and set in the dynamics.
2319
2320== 09/09/2016 == EM
2321- Some code cleanup (and harmonization with LMDZ.COMMON): remove "ecritphy"
2322  from the dynamics (since it is read/used in the physics) and remove
2323  "grireg" (unused) and "physic" (use iflag_phys instead) parameters from
2324  the dynamics.
2325- turn sponge.F into sponge_mod.F90 (and remove sponge.h)
2326
2327== 13/09/2016 == EM
2328- Further cleanup to harmonize with LMDZ.COMMON turn "idissip" into
2329  "dissip_period".
2330
2331== 10/10/16 == J. Audouard
2332- Added CO2 clouds : if co2clouds is set to .true., physiq_mod will call co2cloud.F which contains a co2 clouds microphysics scheme (improvedCO2clouds.F). 3 tracers are needed: co2_ice, ccnco2_mass and ccnco2_number.
2333- Routines added:
2334 co2cloud.F (called by physiq_mod.F, contains the microtimestep)
2335 co2sat.F
2336 improvedCO2clouds.F (called inside the microtimestep, contains the microphysics)
2337 massflowrateCO2.F (CO2 ice growth rate)
2338 nucleaCO2.F (CO2 ice nucleation)
2339 
2340- The following routines/files have been modified to take co2 clouds into account :
2341 callkeys.h (added logicals co2clouds and microphysco2)
2342 callsedim.F (CO2 clouds tracers are ignored : their sedimentation is done in the microtimestep inside co2cloud.F)
2343 conf_phys.F (added CO2 clouds logicals and some variables needed by the CO2 microphysics)
2344 initracer.F (added CO2 clouds tracers)
2345 microphys.H (added some values needed by the CO2 microphysic scheme)
2346 physiq_mod.F (now calls co2cloud.F if co2cloud is set to .true.)
2347 tracer_mod.F90 (added some variables needed by CO2 microphysics)
2348 updaterad.F90 (added a routine for CO2 clouds)
2349 
2350== 25/10/2016 == EM
2351Updates for full physics/dynamics separation:
2352- introduced module vertical_layers_mod.F90 in phy_common to store information
2353  about the vertical grid to be used in the physics. Routines in the physics
2354  should "use vertical_layers_mod" and not "use comvert_mod".
2355- created an "ini_tracer_mod" routine in module "tracer_mod" for a cleaner
2356  initialization of the later. Module tracer_mod should be used in the
2357  physics, not infotrac (belongs to the dynamics).
2358- removed some purely dynamics-related outputs (etot0, zoom parameters, etc.)
2359  from diagfi.nc and stats.nc outputs as these informations are not available
2360  in the physics.
2361- added scalheight (atmospheric scale height) in comvert_mod
2362
2363== 16/11/2016 == EM
2364Bug fix in 1D in physiq, missing "if (co2clouds)" around some operations to
2365be done only when that option is set.
2366
2367== 22/11/2016 == JA
2368-  Bug fix concerning the "riceco2" variable which was declared as a double or as areal in different routines. riceco2 is now correctly declared as a double evrywhere (updaterad.F and co2cloud.F)
2369-  Moved CO2 clouds outuputs from physiq_mod.F to co2cloud.F
2370-  Removed some CO2 clouds properties computation in physiq_mod.F (now done in post-treatment)
2371
2372== 24/01/2017 == JA
2373-Modification of CO2 clouds routines : removal of some screen ouputs, modification for 3D of the writediagfi outputs in co2cloud.F, improvedCO2clouds.F and physiq_mod.F
2374-callphys.def.co2clouds was added in deftank. It contains the necessary flags and constant for including co2clouds
2375-traceur.def.co2clouds was added in deftank. It supplies the necessary tracers for running the co2 clouds scheme
2376
2377== 30/01/2017 == JA
2378-Modification of CO2 clouds microtimestep : now is set by imicro in callphys.def together with the water ice clouds microtimestep
2379-Addition of a meteoritic flux of dust is now possible:
2380          meteoriticflux_mod.F90 was added, it contains 3 variables that are provided in callphys.def (default values = no flux): meteo_flux_mass, meteo_flux_number and meteo_alt (in km)
2381          meteo_flux_mass and meteo_flux_number are added to the dust tracers at the z-level corresponding to meteo_alt at every timestep inside co2cloud.F
2382          conf_phys.F was modified to perform the initialization of the meteoritic flux with the callphys.def values (default values = no flux)
2383          callphys.def.co2clouds in deftank has been accordingly modified
2384         
2385== 08/02/2017 == JYC+EM
2386- Added possibility to run with an Helium "he" tracer (to be initialized
2387  at constant value of 3.6e-7 kg/kg_air, i.e. the 4ppm of Krasnopolsky 1996
2388  EUVE satellite, using newstart).
2389- corrected case for CH4 in aeronomars/photochemistry.F (was using undefined
2390  indexes when there is no CH4).
2391- updated aki/cpi coefficients for Argon used to compute mean atmospheric
2392  Cp and thermal conductivity in aeronomars/concentrations.F
2393
2394== 30/03/2017 == EM
2395Keep up with updates in LMDZ.COMMON:
2396In dynphy_lonlat :
2397- inigeomphy_mod.F90 : add ind_cell_glo computation and  transfer
2398                       to init_geometry
2399- mod_interface_dyn_phys.F90 : use is_north_pole_dyn and is_south_pole_dyn
2400                               (instead of is_north_pole, is_south_pole)
2401In phy_common:
2402- abort_physic.F90 : to properly abort from physics (to be used instead
2403                     of abort_gcm which is for within the dynamics)
2404- geometry_mod.F90 : add ind_cell_glo module variable to store global
2405                     column index
2406- mod_phys_lmdz_mpi_data.F90 : use print_control_mod (rather than iniprint.h)
2407                               and define is_north_pole_dyn, is_south_pole_dyn
2408                               (instead of is_north_pole, is_south_pole)
2409- mod_phys_lmdz_mpi_transfert.F90 : use is_north_pole_dyn, is_south_pole_dyn
2410                                    (instead of is_north_pole, is_south_pole)
2411- mod_phys_lmdz_omp_data.F90 : add is_omp_master (alias of is_omp_root) module
2412                               variable and use print_control_mod (rather than
2413                               iniprint.h), and introduce is_north_pole_phy
2414                               and is_south_pole_phy
2415- mod_phys_lmdz_para.F90 : use print_control_mod (rather than iniprint.h)
2416- physics_distribution_mod.F90 : add call to init_dimphy in
2417                                 init_physics_distribution
2418- init_print_control_mod.F90 : added to initialize print_control_mod module
2419                               variables
2420- print_control_mod.F90 : make initialization occur via init_print_control_mod
2421                          to avoid circular module dependencies
2422
2423== 31/03/2017 == EM + FGG
2424Add possibility to fix EUV input as E10.7 value and remove previous system
2425(which used parameter solarcondate). The E10.7 value is now set via
2426callphys.def by parameter "fixed_euv_value" which is only used if
2427solvarmod==0.
2428Guidelines for min/ave/max EUV input:  fixed_euv_value=80/140/320.
2429
2430
2431== 03/04/2017 == JA
2432further work on the CO2 clouds scheme:
2433-water ice clouds can now serve as condensation nucleii for CO2 clouds. Memory of CO2 CCN origin is kept, but a study of the water cycle is needed to know ig further work is necessary.
2434-co2cloud.F, improvedCO2clouds.F, nucleaCO2.F, massflowrateCO2.F and physiq_mod.F have been modified accordingly.
2435-co2 cloud scheme tuning has been improved for more stability.
2436-a new contact parameter for CO2 ice on silicate is used (mtetaco2=0.78) in microphys.h. Reference in microphysic.h
2437-CO2 ice temperature is computed as a function of temperature in CO2cloud.F and improvedCO2cloud.F. Reference is in initracer.F
2438
2439== 07/04/2017 == EM
2440Fixing a big bug (dating from revision 1528) in wstats.
2441
2442== 19/05/2017 == MV
2443- implementation of a sub-grid water cloud fraction scheme (by A. Pottier): If CLFvarying is set to true in callphys.def,
2444  then the sub-grid cloud fraction routine is applied in watercloud.F and aeropacity.F.
2445- accordingly modified files are: watercloud.F, aeropacity.F, callradite.F, conf_phys.F, phyetat0.F, phyredem.F90, physiq_mod.F,
2446  testphys1d.F, callkeys.h, newtsart.F, start2archive.F, lect_start_archive.F
2447- added file: tcondwater.F90, used by watercloud.F to calculate the condensation temperature of water
2448- watercloud.F, aeropacity.F, callradite.F are converted to module files as watercloud_mod.F, aeropacity_mod.F, callradite_mod.F
2449
2450== 24/05/2017 == EM
2451- remove writing a "nebuldata.out" file in physiq introduced by previous update.
2452  It is not necessary and causes issues when in parallel.
2453
2454== 27/06/2017 == FGG
2455- add possibility to read in MY33 EUV forcing.
2456
2457== 06/07/2017 == JA
2458- Update for CO2 clouds scheme.
2459- Several bugs have been corrected.
2460- Two .dat files are necessary (1 containing the CO2 ice Extinction coefficients is mandatory).
2461 They are in /data/jaudouard/datadir on ciclad if you need.
2462- Several logical can now be set in callphys.def. Explained in co2clouds.F:
2463 if co2useh2o=.true., water ice particles can serve as CCN for CO2 microphysics
2464 if meteo_flux=.true., meteoritic particles are supplied to the CO2 nucleation, according to John Plane values.
2465 if CLFvaryingCO2=.true, a sub-grid temperature distribution is applied for the CO2
2466microphysics (just like water clouds). The amplitude is spantCO2, also read from callphys.def
2467- The previous logical microphysco2 has been removed.
2468- Cloud opacity at 1µm is now computed in the co2cloud.F routine
2469- Most of the co2 ice clouds scheme writediagfi are now in co2clouds.F
2470- Some cleaning of the CO2 ice clouds routine has been done. Not perfect yet!
2471 
2472== 02/11/2017 == JA
2473- Update for CO2 clouds scheme.
2474- Several bugs have been corrected, further cleaning performed.
2475- The main routine of co2 clouds is co2cloud.F. Please read its comments if interested.
2476
2477== 03/11/2017 == JA
2478- Further cleaning of the CO2 ice clouds code
2479- We can now have different micro-timesteps bewteen the water ice clouds and the co2 ice clouds
2480- callphys.def needs imicroco2 = integer (typically 50) (water microtimestep is imicro=integer)
2481- A filter based on Spiga et al 2012 Saturation index has been implemented. It is supposed to represent
2482  if a gravity wave propagates to the mesosphere or not (wheter the wave saturates on its way or not).
2483  The sub-grid temperature distribution is cancelled if the saturation index value of the column (between 12 and 80 km) is > 0.1, and is applied (+/- 3K) otherwise. if the keyword satindexco2=.true. in callphys.def (only applies if CLFvaryingCO2=.true. anyway). If set to .false., deactivate this filter and the sub grid T distribution applies everywhere and everytime. See comments in co2clouds.F
2484- All that you need to launch a GCM run with co2 clouds is described in co2clouds.F comments. Ehouarn Millour and Anni Määttänen have the files.
2485 
2486== 15/11/2017 == EM
2487- Bug fix in co2cloud.F (in the computation of the saturation index) along
2488  with some code tidying.
2489
2490== 18/12/2017 == EM
2491- Add possibility to load a dust MY33 scenario.
2492
2493== 22/12/2017 == MV
2494-In the sub-grid scale cloud scheme zt is replaced is by ztclf and zq by zqclf ('clf' for 'cloud fraction') in order to avoid any confusion for the further schemes, which need initialization.
2495-zteff and pqeff are initialized in the first part of the CLFvarying scheme, section 0 of the code, instead of been initialized in section 1 (tendencies) with the sub-timesteps.
2496-The cloud fraction cannot be lower than the settled value mincloud.
2497
2498== 05/01/2018 == CL+EM
2499- updated massflowrateCO2 routine which now uses an analytical formula rather
2500  than an iterative solver
2501- some code tidying in improvedCO2clouds.F
2502
2503== 05/01/2018 == EM
2504- fix in co2cloud.F: use "co2cloudfrac" instead of "cloudfrac" to avoid
2505  output naming collisions with the water cycle.
2506
2507== 09/01/2018 == FGG
2508Updated the calculation of the dissociation and ionization
2509branching ratios, using the values in the Schunk and Nagy book.
2510New datafiles *branchingratio_schunkandnagy2000_param.dat must be loaded
2511for the "EUVDAT" subdirectory of the standard "datadir" directory.
2512Main changes are:
2513- param_v4_h.F90  -> New definition for the O2 ionization branching ratio
2514- param_read_e107.F -> Read the new files containing the S&N branching ratios
2515- paramfoto_compact.F -> Mainly cleaning of the code and the comments.
2516Also correction of a bug affecting the calculation of CO losses
2517- chemthermos.F90 -> Small modification to add the possibility of including
2518NO and O2 nightglow rates to the outputs
2519- calchim.F90 and calchim_asis.F90 -> account for change in arguments in
2520calls to chemthermos
2521
2522== 09/03/2018 == MV
2523"Cosmetics" changes in watercloud_mod and improvedclouds to better understand the roles of variables :
2524- in watercloud_mod : change of variables subpdq and subpdt to sum_subpdq and sum_subpdt to make clear we are making the sum of the tendencies in the microphysics loop.
2525- in improvedclouds : change of the names of input and output variables according to their names in watercloud_mod in order to not confuse them (in improvedclouds "ptimestep" corresponds actually to "microtimestep").
2526- in watercloud_mod, CLFvarying block : change of the name zteff in pteff to be logical with the other variables names, and writediagfi lines have been moved to the CLFvarying block.
2527
2528== 09/03/2018 == MV
2529"cosmetics" changes in co2cloud and improvedCO2clouds to better understand the role of the variables:
2530- in co2cloud : - change of variables subpdq and subpdt in sum_subpdq and sum_subpdt to make clear we are making the sum of the tendencies in the microphysics loop.
2531                - change of variables pdqsed in subpdqsed as these are tendencies inside the microphysics loop
2532                - flag "sedimentation" has been added for the sedimentation block
2533                - variables names in the sedimentation block have been changed (tempo_traceurs becomes zqsed, sav_trac becomes zqsed0)
2534                - variable sum_subpdqs_sedco2 was added in the microphysics loop to make clear we make the sum of the surface sedimentation flux, output variable is still pdqs_sedco2
2535                - variable sum_subpdqs_sedco2 has been initialized to zero
2536                - zteff has been changed to pteff to be logical with the other variables names
2537- in improvedCO2clouds : change of the names of input and output variables according to their names in co2cloud in order to not confuse them (in improvedCO2clouds "ptimestep" corresponds actually to "microtimestep").
2538
2539== 03/04/2018 == EM
2540Tidying the gravity wave routines by turning them into modules:
2541orodrag.F -> orodrag_mod.F : note that the declared size of pvar(), which is
2542used in call to gwstress was wrong.
2543calldrag_noro.F -> calldrag_noro_mod.F
2544drag_noro.F -> drag_noro_mod.F
2545gwstress.F -> gwstress_mod.F
2546
2547== 04/04/2018 == EM
2548- Forgotten in previous commit:  gwprofil.F -> gwprofil_mod.F (here also the
2549size of an argument, rho, was incorrect in caller orodrag).
2550- Turned newsedim.F into a module newsedim_mod.F
2551- Adapted co2cloud.F and improvedCO2clouds.F to not use "newunit" to open file
2552(it is perfectly legitimate F2008 Fortran, but older compiler such as gfortran
2553on local LMD machines are not there yet).
2554
2555== 10/04/2018 == EM
2556Code cleanup: get rid of routine "zerophys".
2557
2558== 12/04/2018 == EM
2559Code cleanup:
2560- remove "comorbit.h" since it is no longer used.
2561- turn "datafile.h" into module datafile_mod.F90 (and rename variable
2562  "datafile" as "datadir" since it stores the path to the datafile directory).
2563
2564== 17/04/2018 == MV
25651D code cleanup:
2566- in testphys1d.F variable totcloudfrac is directly called from dimradmars_mod (which notably prevents from errors when tracer=F)
2567
2568== 17/04/2018 == MV
25691D code cleanup:
2570- in testphys1d.F variable cell_area is intialized to 1 before being called
2571
2572== 17/04/2018 == DB
2573CO2 code update:
2574- nucleaCO2.F: code cleanup and use co2useh2o flag to handle cases where
2575               h2o ccns have to be tracked and accounted for.
2576- co2cloud.F & improvedco2clouds.F: code cleanup and use co2useh2o flag to
2577               control updates on water variables if necessary.
2578- physiq.F : cleanup on outputs & compute mtotco2 and icetotco2
2579
2580== 19/04/2018 == DB
2581CO2 code updates:
2582- make co2cloud a module and save mem_* variables (initialized via phys_state_var_init)
2583- make improvedCO2cloud a module
2584- read/write mem_* variables in phyetat0.F and phyredem.F
2585
2586== 05/06/2018 == EM
2587A first step towards 1+1=2 (for now only works without tracers):
2588- store and load "albedo" (surface albedo) and wstar (thermals' max vertical
2589  velocity) in physics (re)start file.
2590- turn phyetat0 into a module in the process.
2591
2592== 21/06/2018 == EM
2593- Make a "doc" subdirectory to store the documentation source files with the code
2594
2595== 27/06/2018 == EM
2596- Fix problematic writediagfi call in physiq (should not write a "Time" variable
2597  as "Time" is already defined as a dimension) and added some extra tests in
2598  writediagfi to better detect similar issues.
2599
2600== 05/07/2018 == MV
2601- callsedim.F changed to module callsedim_mod.F
2602
2603== 05/07/2018 == MV
2604- improvedclouds.F changed to module improvedclouds_mod.F
2605
2606== 11/07/2018 == EM
2607Some cosmetic changes:
2608- make watercloud less verbose
2609- turn vdifc.F into a module
2610- turn updatereffrad.F into a module
2611
2612== 17/07/2018 == MV
2613Cosmetic changes:
2614- variables suffixes for sub-grid scale cloud scheme changed from --1 to --clf
2615
2616== 18/07/2018 == EM+MV
2617Integration of the detached dust layer parametrizations (rocket dust storm, slope wind lifting, CW, and dust injection scheme, DB).
2618Still experimental, default behaviour (rdstorm=.false., dustinjection=0) identical to previous revision.
2619NB: Updated newstart requires an updated "surface.nc" containing the "hmons" field.
2620
2621== 19/07/2018 == MV
2622Cosmetic/practical changes:
2623- Addition of the intent in/out characteristics of variables in watercloud_mod and improvedclouds_mod subroutines
2624
2625== 27/07/2018 == EM
2626Update xvik.F main program to work with current diagfi outputs.
2627
2628== 01/08/2018 == MV
2629Cosmetic/practical changes:
2630- swmain and lwmain become modules swmain_mod, lwmain_mod
2631- Addition of the intent in/out characteristics of variables in swmain_mod and lwmain_mod subroutines
2632Correction:
2633- in callsedim_mod, declaration of variable tau(ngrid,nlay) corrected to tau(ngrid,naerkind)
2634
2635== 09/08/2018 == MV
2636Correction of the dust storm scheme:
2637- in rocketduststorm_mod.F90 the case of not daytime and no storm was not taken into account (it was actually in comment), which lead to NaNs in the calculation of pdqrds (scheme=0, division by alpha=0.)
2638Useful:
2639- in compute_dtau_mod.F90, the writediagfi of tauref_scenario has been added
2640
2641== 13/09/2018 == DB + EM
2642- Turn watersat into a module.
2643CO2 cloud updates:
2644- compute co2 condensation tendencies in the co2 cloud scheme and pass them
2645  on to vdifc (for tests; they might not be needed) and adapt newcondens.
2646
2647== 19/09/2018 == EM
2648- Bug fix in newstart. lon/lat and cell_area were not correctly sent to
2649  the restartfi.nc file.
2650
2651== 18/10/2018 == FL
2652- Remove old (Euler Backward) photochemistry code
2653
2654== 18/10/2018 == EM
2655- cleanup "newcondens" (remove obsolete options), change its name
2656  to co2condens and turn it into a module.
2657
2658== 24/10/2018 == EM
2659- Fix writediagsoil so that it also works in parallel.
2660
2661== 15/11/2018 == FGG
2662Modifications to use the parametrized photoabsorbtion coefficients;
2663a first step towards implementing ionospheric chemistry in the new
2664chemical solver:
2665- change in species indexes in chemthermos.F90, paramfoto_compact.F,
2666  hrtherm.F and euvheat.F90
2667- calchim.F90: added a variable in call to photochemistry
2668- photochemistry.F90: added calls to jthermcalc_e107 and phdisrate,
2669  with an additionlal flag, jparam (.false. by default). The
2670  computed photodissociation coefficents are sent to v_phot, which
2671  is used in the chemistry. Thus concentrations computed in
2672  chimtogcm are now done over all atmospheric layers.
2673
2674et jthermcalc.F
2675
2676== 22/01/2019 == MV
2677- Fix a typo in the Van Leer routine vlz_fi.F in the case of w < 0 (negative vertical velocity).
2678
2679== 22/01/2019 == MV
2680- Update of rocketduststorm_mod.F90 :
2681We want to separate both parametrizations related to the formation of the detached dust layers. Therefore, rocketduststorm_mod.F90 now only comprises the rocket dust storm scheme, whereas it contained also before the calculation of the vertical velocity induced by the presence of the sub-grid scale topography. This latter part is under development and will be integrated as a fully independant parametrization: the aim is to simulate the entrainment of dust by slope winds, from the boundary layer up to the top of the sub-grid scale topography.
2682- Addition of initial surface parameters "summit" and "base" to prepare the previously described slope wind parametrization
2683
2684== 22/01/2019 == MV
2685- typo in vdifc.F (visible in debug mode) in the case of rdstorm=false, condition for defining pdqsdif(stormdust_mass/number)
2686- typo in physiq_mod.F (visible in debug mode): wrong indices for tracers in aerosol(:,:,:)
2687
2688== 23/01/2019 == MV
2689- follow-up of the last change in physiq_mod.F: put iaer indices (defined in dimradmars_mod.F) for aerosol(:,:,:) in writediagfi calls.
2690
2691== 23/01/2019 == MV
2692- follow-up of the last change in datareadnc.F
2693
2694== 24/01/2019 == MV
2695- follow-up and correction of the last change in rocketduststorm_mod.F90: coefdetrain has to be a vector
2696
2697== 05/02/2019 == MV
2698- follow-up of the last change in rocketduststorm_mod.F90
2699
2700== 06/02/2019 == MV
2701- follow-up of the last change in rocketduststorm_mod.F90: corrections in vector definitions
2702
2703== 14/02/2019 == MV
2704- handling of a particular case in Van Leer advection in rocketduststorm_mod.F90: when the vertical velocity is very large at a particular layer and null below or above, mass fluxes must not entrain more tracers than available in the layer
2705
2706== 06/03/2019 == MV
2707- correction of the Van Leer scheme in vlz_fi.F, used by the sedimentation routine (particular case evoked previously)
2708
2709== 02/04/2019 == MV
2710- correction of the Van Leer scheme in vlz_fi.F, used by the sedimentation routine, and rocketduststorm_mod.F90 (particular case evoked previously --> update)
2711
2712== 24/04/09 == EM+FF
2713- Updated co2condens to correctly conserve tracer mass
2714
2715== 10/05/2019 == EM
2716- updates in code to be able to read in the MY34 dust scenario and the MY34
2717  solar EUV input
2718 
2719== 14/06/2019 == EM
2720- minor updates: enable output of Ls in diagfi files and make an error
2721  message more verbose.
2722
2723== 19/07/2019 == GG+EM
2724- Add F.Lott's non-orographic GW parametrization. Disabled by default for now,
2725  activated by setting calllott_nonoro=.true. in callphys.def
2726
2727== 05/09/2019 == AS
2728- Changed dlog/dexp in log/exp
2729- Added a double() instance to improvedCO2clouds so that the model works in simple precision [e.g. mesoscale]
2730
2731== 10/09/2019 == JYC
2732- Use Wilke's formulation for molecular diffusion
2733
2734== 11/09/2019 == FGG
2735- Updated chemical core to include ionospheric chemistry
2736
2737== 12/09/2019 == MV
2738- Update of compute_dtau_mod.F90: dtau is calculated in function of the dust opacity given by the dust scenario the day after
2739
2740== 23/09/2019 == MV
2741Set adpatable parameters for the rocket dust storm scheme (parameters included in callkeys.h, and adaptable according to the callphys.def with the function "call getin" in conf_phys.F):
2742- ti_injection, tf_injection (by default: ti_injection=10. and tf_injection=12., impacted files: compute_dtau_mod.F90, vdifc_mod.F)
2743- coeff_detrainment (by default: coeff_detrainment=0., impacted files: rocketduststorm_mod.F90)
2744
2745== 24/09/2019 == EM
2746- Reactivate output of density scaled opacity
2747
2748== 24/09/2019 == AB+EM
2749Some code cleanup (and preparing next steps):
2750- Turn calchim into a module and make tendencies module variables
2751  in calchim_mod and watercloud_mod
2752- Externalize in "physiq" the computation of solar zenithal angle
2753  (it should be computed at every physics timestep, regardless of iradia)
2754
2755== 25/09/2019 == AB+EM
2756Add the possibility to super-cycle chemistry computations. Chemistry will
2757be computed every "ichemistry" physics step (but chemistry tendencies are
2758added every physics step). Default is ichemistry=1.
2759
2760== 04/10/2019 == AB+EM
2761Handle case when injecting without dust scenario (iaervar=1) in compute_dtau_mod
2762
2763== 09/10/2019 == EM
2764Big cleanup: remove obsolete compilation scripts (makgcm_*) and dynamical core
2765(since the one in LMDZ.COMMON should be used instead).
2766
2767== 11/10/2019 == EM
2768Add new version of z2sig.def to "deftank" (and keep a copy of the old one
2769as z2sig.def.MCD5)
2770
2771== 22/10/2019 == MV
2772Add z2sig.def.hr to "deftank" corresponding to the high vertical resolution with 177 levels from the surface to the exobase. 
2773
2774== 05/11/2019 == EM
2775Update non orographic GW routine so that key parameter RUWMAX is read in
2776from callphys.def
2777
2778
2779== 07/11/2019 == JN
2780File "newstart.F", option "composition". Added the possibility to change atmospheric
2781composition when non-co2 gases (ar, n2, co, o2) are implicit. When this case is met,
2782we assume the molar mass of non-co2 atmosphere to be the one measured by MSL at Ls~184.
2783Atmospheric composition is changed at a selected grid point, and horizontal and vertical
2784gradients are preserved.
2785
2786== 14/11/2019 == MV
2787Add the sublimation/condensation latent heat release from the surface water ice in vdifc_mod.F. It can be activated or deactivated with the new flag "latentheat" (for now latentheat=false by default).
2788
2789== 24/11/2019 == EM
2790Fix in surfini for the 1D model when imposing watercaptag.
2791Protect output of CO2 saturation in physiq to when there is a CO2 tracer.
2792
2793== 04/12/2019 == AB
2794Add the instantaneous scavenging by CO2 of dust, ccn and water ice in co2condens_mod. It can be activated or deactivated with the new flag "scavco2cond" (=false by default). Expected to be replaced by the CO2 clouds microphysics in the future.
2795
2796== 12/12/2019 == EM
2797Bug fix in the scavenging routine (missing initialisation of tendencies of
2798surface tracers) in co2condens.
2799
2800== 13/12/2019 == MV
2801Implementation of a new parametrization of the dust entrainment by slope winds above the sub-grid scale topography. The parametrization is activated with the flag slpwind=.true. (set to "false" by default) in callphys.def. The new parametrization involves the new tracers topdust_mass and topdust_number.
2802
2803== 18/12/2019 == MV
2804Update of the rocketduststorm parametrization: clean-up of the code + back to the sub-timesteps method for the Van Leer transport, homogeneous with the one used in topmons_mod.F.
2805
2806== 20/12/2019 == AB
2807Add the observer simulator program simu_MCS_temp.F90 to the LMDZ.MARS/util/ directory, as well as a simu_MCS_temp.def. This program reads a MCS file (binned by Luca Montabone), extracts the daytime and nighttime temperatures from a GCM simulation file, and outputs a netcdf file in the same format as the MCS file.
2808More details in simu_MCS_temp.def and in the preface of simu_MCS_temp.F90.
2809
2810== 07/01/2020 == AD
2811Correction of Mars GCM utility by EM (r2204):
2812(Bug fix for when input file of the localtime utility is the ouput of zrecast and has aps()/bps() arrays which may not be of the same size as number of vertical layers.)
2813Variables declaration changed in order to be compiled with ifort
2814Manual User Update: Old stuff removed from part4: Running the model
2815
2816== 08/01/2020 == EM
2817Bug fix in calchim (only had an impact when computations include the
2818ionosphere), parameters should not be reset at every call.
2819
2820== 10/01/2020 == EM
2821Fix a minor bug in the 1D model when initializing the time of day at the
2822begining of the run.
2823
2824== 14/01/2020 == EM
2825Bug fix in newstart "composition" option; added option "q=factor" in
2826newstart to multiply a tracer mixing ratio by a constant factor.
2827
2828== 16/01/2020 == EM
2829Change "latentheat" flag to a more descriptive "latentheat_surfwater" and
2830set its default value to .true.
2831
2832== 22/01/2020 == DB (the return!)
2833Update the nonorographic gravity waves drag parametrization (from the r3599 of Earth s model LMDZ6): 1) add east_ and west_gwdstress variables, 2) delete aleas function: random waves are producted by the MOD function, 3) reproductibility concerning the number of procs is now validated, 4) changing name of some variables like RUW, RVW, ZOP, ZOM,..., 5) tendency of winds due to GW drag are now module variables and written in restart files.
2834
2835== 23/01/2020 == EM
2836First implementation of XIOS in the physics
2837
2838== 24/01/2020 == BR+JN+AB
2839Bug fix in physiq_mod for 1D runs, where the routine getslopes reinitialized the slope inclination and orientation to 0, while they were assigned in the input files.
2840
2841== 24/01/2020 == EM
2842Further cleanup of nonorographic gravity waves drag parametrization east_gwstress
2843and west_gwstress need be initialized and are better as module variables.
2844
2845== 24/01/2020 == EM
2846Bug fix in rocketduststorm & topmons routines; "tauscaling" sould not be a local
2847(moreover uninitialized) variable. Added it to the arguments of the routines.
2848
2849== 27/01/2020 == AB+EM
2850Bug fixes in localtime.F90 : 1) Following of the correction by EM (r2215), separation of the "valid_range" and "missing_value" indicators, which prevented localtime to write the missing_value attribute in the output file and was making r2215 useless ; 2) Altitude attributes written in the output file are no more specified by default but are read in input file (important for zrecasted files).
2851
2852== 28/01/2020 == JN
2853Adding a new flag 'paleomars' (default false) in 1d GCM in order to use
2854eccentricity and solar longitude of perihelion as input parameters.
2855Added variables : halfaxe, excentric, Lsperi. New routine call_dayperi.F from FF to
2856compute perhelion date from prescribed eccentricity & Lsperi.
2857
2858== 04/02/2020 == AB
2859Small improvements in simu_MCS_temp.F90 : 1) The binning method is now more consistent with the MCS file ; 2) stats files are more rigorously recognized.
2860
2861== 10/02/2020 == CM
2862Initialization of mu0_int and ztim1 in 'nirco2abs.F' to prevent crash during debug mode simulations.
2863
2864== 27/02/2020 == AB
2865Resolved ticket #32 : 1) dsodust is now calculated only once in the InfraRed by aeropacity_mod (used to be wrongly calculated twice, such as dsodust=IR_part+Visible_part) ; 2) dsords is now calculated in the IR by aeropacity_mod (used to be calculated in the Visible) ; 3) dsotop is added and calculated in the IR in aeropacity_mod
2866+ some cleaning and commenting of the code
2867
2868== 04/03/2020 == AB
2869Resolved ticket #14 : when calling writediagfi for all kinds of dust Density-Scaled Opacity (dsodust,dsords,dsotop,dso), an information about the IR wavelength used by the GCM is added in the "title" attribute of the netcdf variable ("tes" = 9.3micron ; "mcs" = 21.6micron).
2870NB : these dust DSO calculated by the GCM are extinction opacities, hence not always corresponding to the actual opacity/optical depth measured by the instruments (ex: TES = 9.3micron absorption optical depth).
2871
2872== 04/03/2020 == AB
2873Bug fixes in the slope winds parametrization and its interactions with rocketduststorm : now, it is considered that the sub-grid dust storm is decorrelated from the dust entrainment above the sub-grid scale topography, so that : 1) the background dust available for slope winds is updated after the rocketduststorm parametrization ; 2) the extra-heating on top of the mountains is calculated regarding topdust and background dust tracers' optical depths only (and not stormdust optical depth).
2874
2875== 06/03/2020 == AB
2876Bug fix following r2248 in aeropacity_mod and topmons_mod : since dsodust, dsords and dsotop are diagnostic physiq_mod variables, we don't want them to be reinitialized at each call of aeropacity_mod and topmons_mod, but we initialize them once and for all at the beginning of physiq_mod instead.
2877
2878== 10/03/2020 == AB
2879Bug fix in topmons_mod : the array rhobarz(ig,l) (density at interlayer levels) had only nlayer allocated instead of nlayer+1 (caused issues in calculating the topdust detrainment at the top of the model)
2880
2881== 12/03/2020 == EM
2882Transparent adaptations to be able to compile using the PGI compiler:
2883- look for NaN using logical test a/=a instead of isnan() which is not standard
2884- use erf() function as it handles single/double precision (derf is obsolete)
2885
2886== 12/03/2020 == FL+EM
2887Update newstart option "composition" with Trainer et al 2019. (and ACS)
2888values.
2889 
2890== 13/03/2020 == JN
2891Adding a new 2D variable "watercap", perennial ground water ice.
2892qsurf(ig,igcm_h2o_ice) can no longer be negative.
2893When watercaptag=true, ie when there is an infinite amount of water avalaible for sublimation,
2894and there is no more h2o frost, sublimation digs into watercap reservoir.
2895For now watercap can't grow, even on watercaptag, and has same albedo than qsurf(h2o_ice).
2896When using old start file, watercap is automatically initiated as 0.
2897Added watercap in newstart.F aswell.
2898
2899== 19/03/2020 == JN
2900Adding watercap in start2archive. When absent in the start files, it is initialized at 0,
2901and qsurf(igcm_h2o_ice) can no longer be negative. The negative fraction of qsurf(h2o_ice),
2902if it exists, is set in watercap.
2903
2904== 20/03/2020 == EM
2905Cleanup of phyetatO and only apply conversion of negative water ice surface
2906to the watercap variable if there was is initial "watercap" field in the
2907start file.
2908
2909== 20/03/2020 == EM
2910Save "dtau", the opacity difference between model and target dust scenario
2911in the restartfi.nc file so that we have 1+1=2 when running with dust
2912injection schemes.
2913
2914== 28/03/2020 == AD
2915Minor update to be able to compile Mars physics with Dynamico
2916Abort_physics (abort routine in LMDZ.MARS) instead of abort_gcm (in LMDZ.COMMON) in jthermcalc.F
2917
2918== 02/04/2020 == FGG
2919A first step towards water ion chemistry. Add a new reaction and modify reaction
2920rates for HCO2+
2921
2922== 02/04/2020 == EM
2923Some code cleanup:
2924- move profile.F to dyn1d since it is only used by the 1D model
2925- remove scatter.F, which is not used (and moreover a synonym of the scatter
2926  routine from the "mod_phys_lmdz_para" module)
2927- remove obsolete "multipl.F" routine, replace the calls to it in vdifc_mod
2928  by modern Fortran syntax.
2929
2930== 07/04/2020 == AB
2931Add the program terminator.F90 to the LMDZ.MARS/util/ directory, as well as a terminator.def
2932This program can be used to interpolate GCM files at one terminator (morning or evening) all around the globe.
2933+ a fix of localtime.F90 which didn't work for stats files.
2934
2935== 08/04/2020 == AD
2936Martian physics is now able to start without startfi.nc
2937Major update for phyetat0_mod and physiq_mod based on what have been done for the Generic physics
2938
2939== 09/04/2020 == AB
2940Resolved Ticket #41 : the density-scaled opacities are now multiplied by tauscaling before being
2941written in the output files (have an effect only when working with freedust=false)
2942
2943== 13/04/2020 == FGG
2944- Adding HCO+ ion chemistry.
2945
2946== 14/04/2020 == AD
2947Minor update of revision 2281 in order to run martian physics with callsoil option when no startfi.nc
2948
2949== 16/04/2020 == EM
2950Update reference run.def.64x48x49.MCD5 to keep up with recent (r2181) changes
2951dissip_fac_mid and dissip_fac_up are now read in from the run.def file.
2952
2953== 16/04/2020 == AB
2954Add the program solzenangle.F90 to the LMDZ.MARS/util/ directory, as well as a solzenangle.def
2955This program actually replaces the former program terminator.F90, and can be used to interpolate GCM
2956files at one given solar zenith angle (on the morning-side or the evening-side) all around the globe
2957(the terminator corresponding to sza = 90deg)
2958
2959== 20/04/2020 == EM
2960Fix for the 1D, follow up from the recent addition of watercap.
2961
2962== 22/04/2020 == AD
2963Minor update of revision 2281 about initialisation of emissivity and albedo when no startfi
2964Now default emissivity/albedo is 0.95/0.1
2965Flags to change these fields are now more explicit: surfemis_without_startfi instead of surfemis (idem for surfalbedo)
2966
2967== 24/04/2020 == MV
2968dyn3dpar: Implementation in the parallel version of the dynamics of the dynamical transport of the isotopes using the same scheme as the one implemented by Camille Risi in the Earth GCM (see LMDZ6/libf/dyn3dmem, and Risi et al. 2009: genealogy of the tracers+transport of the isotopic ratio). This is added to prepare the future implementation of the HDO cycle in the GCM. These changes had been already added in the sequential part.
2969dyn3d: corrections to prevent from dividing by zero in the case of the use of the isotopes scheme.
2970traceur.def.isotopes: example of how to write the traceur.def if you want to use the new dynamics with the genealogy of the isotopes: air is the father of all, H2O is the father of HDO.
2971
2972== 27/04/2020 == MV
2973follow-up of the last commit: add the routine check_isotopes_p.F in dyn3dpar. Note: this routine is used in the Earth GCM to check the aberrant values but for now it is inactive in our version, as long as variable "ok_isotopes" in /dyn3d_common/infotrac.F90 remains "false". This routine was already present in the sequential version of the dynamics dyn3d.
2974
2975== 28/04/2020 == FGG
2976Add H2O+ ion chemistry
2977
2978== 28/04/2020 == AB
2979Resolved Ticket #46 : it is now possible to concatenate concat files with a coherent
2980time axis. NB : the program puts now a higher importance in respecting the controle
2981variable of all the input files (when there is one).
2982Example : concat[diagfi2 (66sols from sol 61); diagfi4 (65sols from sol 193)]
2983Old output Time: [61.08,..127,|127.08,..192]; New output Time: [61.08,..127,|193.08,..258]
2984
2985== 28/04/2020 == EM
2986Some code tidying: use getin_p() instead of getin() and use "call abort_physic"
2987instead of "stop" or "call abort"
2988
2989== 30/04/2020 == MV
2990follow-up of the commit regarding the dynamical transport of isotopes: new variables for the thresholds for zq(pere) and masseq in the transport of the isotopic Ratio
2991
2992== 04/05/2020 == AB
2993Following r2303 (concatenate concat files) and truly resolving Ticket #46 :
29941) little bugs fixed from the previous revision ; 2) add the possibility to change the
2995offset of the output file time axis by asking the user the new offset and the level of
2996priority to put on it over the starting day stored in the first input file
2997(NB: this last point also implies a change in concatnc.def, but retrocompatibility
2998with old concatnc.def files has been ensured)
2999
3000== 06/05/2020 == EM
3001More code tidying: use getin_p() instead of getin() and use "call abort_physic"
3002instead of "stop" or "call abort"
3003
3004== 06/05/2020 == LR
3005Implementation of HDO in the physics
3006New tracers hdo_vap and hdo_ice are added. Cf. traceur.def.isotopes in deftank for exemple of traceur.def.
3007All HDO related computations are activated by flag hdo=.true. in callphys.def. (see callphys.def.hdo in deftank for an example)
3008Additional option hdofrac (true by default) allows for turning on/off fractionation (for tests).
3009For now, only functional with simplified cloud scheme (so microphys=.false. and activice=.false. also recommended).
3010Initialisation of start files can be done with option 'inihdo' in newstart.
3011
3012== 07/05/2020 == AB
3013Following r2303 and r2308 and truly truly resolving Ticket #46 on concatnc:
3014Improved ergonomics of the user interface, with no more request to the user
3015in the midst of computations
3016
3017== 12/05/2020 == LR
3018Fixing some errors in vdifc_mod related to variable watercap. This variable was also integrated to the hdo cycle.
3019Also added watercap output for the 1D model.
3020
3021== 12/05/2020 == AB
3022Creation of the utilitary program aeroptical.F90, whose goal is to compute the opacities [1/km]
3023of dust and water ice aerosols, from their mass mixing ratios and their effective radius
3024stored in a GCM file, all at a wavelength given by the user. To that end, it reads optical
3025properties stored in files of the datadir/ directory.
3026+ associated aeroptical.def
3027
3028== 13/05/2020 == FGG
3029- Finalized water ion chemisty (added H3O+ and OH+ ions). Added an example
3030  of relevent traceur.def file in deftank.
3031- Added the computation of NO nightglow.
3032
3033== 13/05/2020 == MV
3034Extent of the transport of the isotopic ratio implemented in the dynamics to all the Van Leer transport schemes used in the physics (for now it only concerns the tracer HDO).
3035- libf/dynphy_lonlat/phymars/:
3036 iniphysiq_mod.F90: transmission of the content of variables describing the isotopes defined in the dynamics (precisely by dyn3d_common/infotrac.F90, which reads traceur.def) to the physics
3037- libf/phymars/:
3038  phys_state_var_init_mod.F90, tracer_mod.F : initialisation of the variables describing the isotopes in the physics
3039  callsedim_mod.F: implementation of the transport of the isotopic ratio in the Van Leer scheme used for sedimentation (applies to hdo ice)
3040  co2condens_mod.F: implementation of the transport of the isotopic ratio in the Van Leer scheme used for condensation of CO2 (applies to hdo ice and vapour)
3041
3042== 14/05/2020 == MV
3043Follow-up of the last commit for the transport of the isotopic ratio: forgot the initialisation of zq0() in callsedim_mod.F !
3044
3045== 15/05/2020 == MV
3046Follow-up of the last commit for the transport of the isotopic ratio: cleaning to help the user:
3047-initracer.F: hdo must be defined as an isotope (meaning its "father" has to be precised in traceur.def) and must be placed at the end of the list of tracers in traceur.def.
3048-/deftank/traceur.def.isotopes: writing of traceur.def in the case of hdo=true has been simplified to match both the 3D and the 1D simulations.
3049-simpleclouds.F,hdo_surfex_mod.F,physiq_mod.F: thresholds of 1.e-16 have been replaced by the variable qperemin defined in tracer_mod.F.
3050
3051== 18/05/2020 == TP
3052- Update of the program xvik.F
3053- Useless code removed
3054- Add some comments about xvik outputs
3055- Declaration of physics constants inside the program as variable and not as inputs like before
3056- Temporal shift due to viking landing sol removed : xvik outputs are given in real sol
3057- Add the possibility to choose the format of time dimension for xvik outputs : ls, sol or both
3058- Path to input and output files removed from the code and put as input
3059- List of input files removed from code and put as input
3060
3061== 18/05/2020 == AB
3062Some improvements in aeroptical.F90 :
30631) add the possibility to input a diagfi_P.nc file (with pressure as altitude coordinates) ;
30642) replace all "title" attributes into "long_name" attributes in accordance with ticket #48
3065
3066== 26/05/2020 == MV
3067Follow-up of the last commit for the transport of the isotopic ratio: simplification of the transmission of variables from the dynamics to the physics:
3068- libf/dynphy_lonlat/phymars/:
3069 iniphysiq_mod.F90: transmission of the content of 2 variables describing the isotopes instead of 4 (nqperes: number of tracers "peres", nqfils: number of tracers "fils")
3070- libf/phymars/:
3071  phys_state_var_init_mod.F90, tracer_mod.F: idem
3072  callsedim_mod.F: idem
3073  co2condens_mod.F: idem
3074- libf/phymars/dyn1d:
3075  testphys1d.F: idem (the reading interface for traceur.def has been completed to fill the variables nqperes and nqfils).
3076
3077== 29/05/2020 == AD
3078More outputs with xios from physics
3079physics is now able to transmit soil fields to xios
30802334:Update of xios ouput file definition
3081
3082== 08/06/2020 == TP
3083Add folder "xvik" in util that contains a program called "fit_Iceinertia_MONSicedepth.F" that is used to compute best-fit cap albedo, ICE DEPTH  and total CO2 inventory. The diretory also contains :
3084- a file "VL1" of harmonics of VL1 surface pressure
3085- a file "compile_fit" to compile the main program
3086- a README explaining how to use the program
3087- a .def file to use as input for the main program
3088
3089== 09/06/2020 == CM
3090Improvement in the reading of input profiles for 1D simulation.
3091 - add: dyn1d/read_profile_mod.F90
3092
3093== 10/06/2020 == CM
3094CO2 microphysics is now available.
3095/!\ Add a new file: co2condens_mod4micro.F90 => It is a copy of co2condens_mod.F, but adapted to the case of co2
3096                                                microphysics. This could be temporary, but don't forget to modify
3097                                                these two subroutines if there is a change in one of them.
3098
3099== 11/06/2020 == AD
3100New tool to convert a startarchive from LMDZ (lonlat) into start.nc and startfi.nc adapted to DYNAMICO
3101Still under development: be careful when using it
3102
3103== 12/06/2020 == EM
3104Minor fix to r2362 (addition of CO2 microphysics): make CO2 conservation
3105tests only if CO2 microphysics is on.
3106
3107== 18/06/2020 == LR
3108HDO
3109Correction of an error in newstart for inihdo.
3110Other minor corrections for HDO cycle.
3111Transition from fractionation coefficients from Merlivat et al. 1967 to Lamb et al. 2017
3112
3113== 02/07/2020 == CM
3114CO2 microphysics: correction on improvedco2cloud.F90
3115                  sublimation of co2_ice if ccnco2 number < 1
3116
3117== 03/07/2020 == EM
3118nirco2abs: handle the (rare) case when input O mixing ratio is negative to avoid
3119generating NaN heating rates.
3120
3121== 06/07/2020 == EM
3122Some code cleanup: use "call abort_physic()" instead of "stop" or "call abort"
3123
3124== 07/07/2020 == DB
3125Add kstar parameter to control kmin value. kmi=1/lambda_max, to ensure the "subgrid scale" characteristic, we have to constrain the GW's wavelength by the size of the mesh
3126
3127== 07/07/2020 == EM
3128Improve "zrecast" utility: add possibility to transfer 3D (lon-lat-time)
3129variables to output file and add some extra sanity checks of user inputs.
3130
3131== 10/07/2020 == AB
3132Add the new version of the MCS observer simulator program simu_MCS.F90, replacing the old version simu_MCS_temp.F90.
3133The program can now handle (ie, interpolate and bin like the MCS file) any 4D GCM variable, by linking them to
3134a MCS variable among temp (default), dust and water ice, serving as reference for the binning.
3135More details in the preface of simu_MCS.F90 and in simu_MCS.def
3136
3137== 01/09/2020 == MV
3138Implementation of HDO in the microphysics of water ice clouds:
3139- improvedclouds_mod.F: calculation of the HDO flux
3140- growthrate.F, microphys.h: addings to take into account the effect of diffusion kinetics on fractionation
3141- callsedim_mod.F: sedimentation of HDO as an isotope of water in the microphysics case
3142
3143== 17/09/2020 == EM
3144Code tidying : make a "dust_param_mod" module to store dust cycle relevant flags
3145and variables (and remove them from callkeys.h)
3146
3147== 25/09/2020 == AB
3148In conf_phys.F :
3149Put the default value of rocketduststorm detrainment coefficient at 0.05 instead of 0. previously,
3150in order to have an column-integrated dust optical depth that better follows the scenario and doesn't
3151madly skyrocket in the dusty season.
3152+ correction of a comment for abort_physic
3153
3154== 30/09/2020 == EM
3155Cleanup around "aeropacity" to prepare future evolutions; added module
3156dust_scaling_mod to handle computation of tauscaling.
3157
3158== 06/10/2020 == AB
3159Correction of a bad unit for qdusttotal0 and qdusttotal1 (diagnostic outputs of the stormdust scheme)
3160+ some corrections of comments about aerosol and tauref in aeropacity
3161
3162== 13/10/2020 == EM
3163Code cleanup: remove "tauref" and replace it with two distinct variables,
3164"tau_pref_gcm" and "tau_pref_scenario" which are repectively the visible
3165dust opacity column (at 610 Pa) in the GCM and prescribed by a dust scenario.
3166
3167== 15/10/2020 == AB
3168Correction in solzenangle.F90 : the missing value was not initialized when the attribute was not
3169present in the input file.
3170+ Resolved Ticket #61 : add comments in the code and in the output file to make the program more
3171transparent for the users
3172
3173== 16/10/2020 == EM
3174Add a new scheme to handle the dust and its radiative impact. Triggered using
3175a new flag dustscaling_mode=2 (dustscaling_mod=0: no rescaling at all, and
3176dustscaling_mode=1: full rescaling using tauscaling, GCMv5.3 style). Rescaling
3177is then only done on the radiative impact (see dust_scaling_mod.F90) of dust.
3178Moreover the scaling factor "dust_rad_adjust" is evaluated using the target dust
3179scenario opacity for the next sol and left to evolve linearly until then to not
3180impose the diurnal evolution of dust.
3181In practice, main changes or additions in the code are:
3182- renamed flag "tauscaling_mode" as "dustscaling_mode"
3183- moved parameter "t_scenario_sol" to "dust_param_mod"
3184- adapted "compute_dustscaling" routine in "dust_scaling_mod"
3185- added module "dust_rad_adjust_mod"
3186- 2D fields "dust_rad_adjust_prev" and "dust_rad_adjust_next" required to
3187  compute coefficient "dust_rad_adjust" need to be stored in (re)startfi files
3188
3189==02/11/2020 == EM
3190Adaptation for when using dust injection and/or dustscaling_mode==2. The
3191dust scenarios are then meant to just hold one value per sol deemed to
3192be valid for a given local time (t_scenario_sol in dust_param_mod). Thus
3193to avoid unwanted temporal interpolation in read_dust_scenario, the time
3194axis there should simply contain integers.
3195
3196== 05/11/2020 == FGG
3197Bug fix in jthermcalc_e107.F: correctly account for the actual Sun-Mars
3198distance.
3199
3200== 14/11/2020 == FF + EM
3201- Make a single README file (get rid of REAME.exec) and update "compile"
3202  script to (hopefully) better illustrate how to compile utilities
3203- Update utilities zrecast and lslin:
3204  zrecast.F90: Force the vertical interpolation of any variable starting
3205  by "rho" to be in log space (as it should for density, molecular
3206  concentration in mol.cm-3 etc..). Set missing value to 1.E20
3207  lslin.F90: fix various problems in the output.
3208 
3209== 17/11/2020 == FF + AB
3210Update utilities :
3211concat.F90
3212- rewrite and simplify the handling of time and offset so that any file
3213  can be concatenated, including files from different years or stats file
3214- use modulo to shift starting sols in concat.nc to values between 0 and 669
3215- add a "adls" option in addition to "sol" or "ls" to add a Ls 1D variable
3216   while keeping "sol" as the Time axis
3217- add conservation of altitude attributes (long_name,units,positive)
3218- enable absence of both hybrid (aps,bps) and sigma levels
3219
3220solzenangle.F90
3221- improve calculation for 1 sol file (stats) to use all local time data
3222- read the starting sol in the file instead of asking it to the user
3223  (except for stats file) ; keep the possibility for user to change it
3224- ask mean Ls value for stats file instead of sol number
3225- fix crash when using "all variable" option (ticket #66)
3226- fix bug on aps,bps by using GCM_layers dimension instead of altitude
3227
3228localtime.F90
3229- fix crash when using "all variable" option (ticket #66)
3230- fix bug on aps,bps by using GCM_layers dimension instead of altitude
3231
3232For all 3 utilities :
3233- handle all ndim cases for the variables (ticket #52)
3234- change "title" attribute into "long_name" by default (ticket #48)
3235- extend size of long_name character string (ticket #57)
3236- remove the use of #ifdef NC_DOUBLE (ticket #67)
3237 
3238== 23/11/2020 == AB
3239Add stormdust in the aerosol opacities computed by aeroptical.F90
3240+ add a description of aeroptical in util/README
3241
3242== 01/12/2020 == MV
3243- improvedclouds_mod.F: update of the nucleation equation with its analytical resolution
3244- writediagmicrofi.F: makes it possible to get outputs from the microphysics (call example in watercloud_mod.F)
3245
3246== 16/12/2020 == AB
3247Fix a typo made in r2434 in localtime.F90, that replaced the long_name attribute
3248of variables by "Time"
3249
3250== 12/01/2021 == AB
3251Harmonization of the utility programs lslin, concatnc and localtime when dealing
3252with Solar longitude as the Time variable (for localtime, the check on long_name
3253attribute is still compliant with files from previous versions)
3254
3255== 15/01/2021 == AB
3256Changes in aeroptical.F90 :
3257- add the flag nf90_64bit_offset when creating the output file. Without it, the
3258  program couldn't deal with large files (concat) with multiple aerosols
3259- modify the code structure to make it a bit less memory-intensive
3260- add topdust in computed aerosol opacities
3261- add the possibility to compute absorption opacities, instead of extinction :
3262  the user must specify 'ext' or 'abs' in aeroptical.def
3263- update the description of aeroptical in util/README
3264
3265+ adapt simu_MCS to take into account aeroptical output variables when choosing
3266  the binning reference
3267+ add outputs for topdust in physiq_mod
3268
3269== 25/01/2021 == EM
3270- Minor cleanup and update in aeropacity_mod.F and read_dust_scenario.F90 to be
3271  able to use MY35 dust scenario
3272
3273== 25/01/2021 == AB
3274Changes in lslin.F90 :
3275 - make sure the interpolation takes into account potential missing values in
3276   the input file fields, especially when the average/binning option is not used
3277   (ticket #68)
3278 - enable the averaging option even when the Ls timestep is set automatically
3279 /!\ previous lslin.def must be updated in consequence !
3280 - code clean-up, especially remove duplicates on controle field and altitude units
3281 - replace all the tests "if (ndim.ge.3) then" by a unique test at the beginning
3282   of the var loop
3283 - change "title" attribute into "long_name" by default (ticket #48)
3284
3285+ add an indicative updated lslin.def
3286+ update util/README
3287
3288== 16/02/2021 == FGG+JYC
3289- Adding the deuterium chemistry now that the HDO cycle is included.
3290- Chemistry still works as before if deuterium tracers are not present.
3291- Added handling of hdo in molecular diffusion (moldiff_red).
3292
3293== 24/02/2021 == MV
3294Correction in lect_start_archive.F:
3295- adds the variable "watercap" to insure its transmission in the case newstart.F 
3296  uses start_archive.nc to create the start files.
3297
3298== 03/03/2021 == FGG
3299- bug fix in the diagnostic of H, H2, and D total escape which was wrong
3300  when running in parallel. The escape rates can now also be included as
3301  outputs in diagfi.
3302
3303== 18/03/2021 == EM
3304- change outputs names for species number densities (in molecules/cm3)
3305  from "rho_*" to "num_*" and add possibility to output only first layer
3306  atmospheric temperatures as "temp_layer1".
3307
3308== 07/04/2021 == CM
3309- add co2_ice as scatterer in radiative transfert. Need co2clouds and
3310   activeco2ice .eqv. True. Files involved:
3311      - aeropacity_mod.F
3312      - callradite_mod.F
3313      - physiq_mod.F
3314      - updatereffrad_mod.F
3315      - suaer.F90
3316- determine co2_ice density from temperature. Used in riceco2 computation.
3317   Files involved:
3318      - co2cloud.F90
3319      - improvedco2clouds_mod.F90
3320      - updaterad.F90
3321      - updatereffrad_mod.F
3322- co2condens_mod4micro.F: variable initialization
3323- initracer.F: add nuiceco2_ref = 0.2
3324- phyredem.F: remove co2_ice from qsurf since co2_ice => co2ice
3325- watercloud_mod.F: tiny typo
3326
3327== 21/04/2021 == AD
3328- update of ztime_fin (variable "Time" stored in startfi.nc) for Dynamico
3329  where the addition of a dynamical timestep is no longer needed
3330 
3331== 22/04/2021 == JN
3332- Adding a new option for icelocationmode in surfini.F, which uses the
3333  predefined 64x48 water caps for any resolution. Now default option
3334  should be icelocationmode=4.
3335
3336== 25/04/2021 == EM
3337Code cleanup, remove unused routines in libf/dynphy_lonlat (those from
3338LMDZ.COMMON are used) and likewise make links to dynamics routines in "dyn1d"
3339point to LMDZ.COMMON routines
3340
3341== 27/04/2021 == RV
3342- update of day_ini, time and hour_ini in restart and retstartfi.
3343Hour_ini is obsolete. If we write one restart file: day_ini is the last day
3344of the simulation and the remaining time is in Time (often=0), if we write
3345multiple restart nothing changes
3346
3347== 22/04/2021 == JN
3348 - The variable albedo_h2o_ice is now decomposed into albedo_h2o_cap
3349and albedo_h2o_frost, in order to discriminate between perennial ice
3350and seasonnal frost. Retrocompatible with old callphys.def and
3351albedo_h2o_ice. Current default values are 0.35 for both albedos.
3352
3353== 30/04/2021 == AB
3354Some corrections of run scripts in deftank/ciclad/ :
3355the next run_monthX is now well written, with a formulation that is more coherent with deftank/occigen/run_month1 version
3356+ the PBS memory specifications for the CICLAD job are set to more relevant values
3357
3358== 30/04/2021 == AS
3359update of changes by RV on 27/04/2021; streamlining day_end to avoid using a dynamical module in the physics.
3360
3361
3362== 1/05/2021 == JN
3363Added a "cap_albedo" flag (default false) in order to allow northern polar cap albedo to remain unchanged by water frost deposition.
3364
3365== 3/05/2021 == LR
3366Bugfix for streamfunction tool. Now asks the user for another file in which to
3367find cv.
3368
3369== 04/05/2021 == RV
3370- update of r2507: correct ztime_fin for dynamico
3371- Test for no writting Diagfi for Dynamico
3372- Correction for Xios output : Change of calendar : start_date=0 as a diagfi, timestep for output physic=1s, day_length=ndtphys, it is needed to have output in days in the xml to have the correct time
3373
3374== 6/05/2021 == JN
3375vdifc_mod update !!
3376 - vdifc now treats separately h2o_vap and other tracers
3377 - water sublimation is now treated with an implicit scheme & adaptative subtimestep
3378 - latent heat of sublimation is working with the implicit scheme
3379 - the adaptative subtimestep is empirically calculated with a temperature variation criterion "dtmax"
3380 - hdo_vap is now treated independantly after h2o_vap (should be fine !)
3381
3382== 06/05/2021 == MV
3383Correction of the threshold value used to prevent from negative values in watercloud_mod.F: the threshold is set to 1e-16 (=qperemin, an already existing parameter for the water cycle), instead of 1e-8. This former value was at the origin of a strong and unrealistic drying out of the upper atmosphere, when the photochemistry was active, during the first part of the martian year (months 3 and 4). (bug reported by Francisco Gonzalez-Galindo).
3384
3385== 15/05/2021 == JN
3386Added a logical flag allowing for a temperature-dependant parametrization of the water contact parameter : "temp_dependant_m". Default value is false for now.
3387
3388== 17/05/2021 == CM
3389minor fix in co2condens4micro; fix co2 sedimentation rate outputs
3390
3391== 26/05/2021 == AB
3392Make a cleaner initialization of some variables in simu_MCS.F90
3393
3394== 26/05/2021 == JN
3395Bug correction in testphys1d.F, when calling "phys_start_var_init"
3396
3397== 27/05/2021 == FF+CM
3398Update zrecast utility:
3399 - conversion to pressure coordinate possible even if temperature is not available
3400 - phisinit added to the output file
3401 - vertical interpolation in log coordinates for variable with name starting with "num_"
3402 - mode 3 (above local surface): set to missing value when z > z_range
3403
3404== 08/06/2021 == MV
3405re-commit of version 2526: testphys1d.F: Fix for the 1D, follow up from previous modifications of phys_state_var_init subroutine.
3406
3407== 09/06/2021 == EM
3408Bug (wrong usage of surface pressure) fix in vdifc (bug was introduced in r2515)
3409
3410== 22/06/2021 == CM
3411co2clouds: fix mtotco2, icetotco2, vaptotco2 outputs
3412
3413== 29/06/2021 == AB
3414Make simu_MCS.F90 compatible with DYNAMICO lon-lat output files, with a check on the latitude array order when doing the interpolation
3415
3416== 01/07/2021 == EM
3417Add possibility of additional tests (NaNs, but also of unrealistic values) of
3418fields at the begining of physics (i.e. coming from the dynamics) and at the
3419end of the physics integration. These are respectively triggered by seting
3420flags "check_physics_inputs" and "check_physics_outputs" to .true.
3421
3422== 08/07/2021 == RV
3423- update of r2507: correction for time output in the case of multiple restart files
3424
3425== 08/07/2021 == RV
3426tab_cntrl is written by Xios output. It is now a module variable of phyetat0_mod
3427
3428== 08/07/2021 == RV
3429Utilitaire concatnc, localtime, zrecast can process Xios output
3430
3431== 08/07/2021 == RV
3432Change in the context_lmdz_physics.xml and field_def_physics_mars.xml to be consistent with the changes of physiq_mod (new variables : cntrl_tab, ap, bp, aps, bps, phisinit...)
3433
3434== 13/07/2021 == RV
3435Update of the revision 2545, physiq_mod is corrected to contain the modifications that were previously deleted by error
3436
3437== 18/08/2021 == FGG
3438Make NO and O2 Nightglow emissions computations more flexible (reaction index
3439 no longer hard coded in photochemistry.F90).
3440 
3441== 07/09/2021 == AB
3442simu_MCS.F90 : now computes the column-integrated dust optical depths of the MCS and GCM files
3443(between levels with no missing values in both files, which vary with space and time) and outputs
3444the ratio tau_GCM/tau_MCS to be used to normalize the GCM dust opacity profiles when comparing to MCS
3445
3446== 07/09/2021 == EM
3447Some code cleanup and refactoring around wstats:
3448- turn wstats.F90 into a module
3449- remove no useless statto_mod.F90
3450- incorporate auxilliary inistats and mkstats routines in wstats_mod.F90
3451- move flag "callstats" from callkeys.h to being a module variable of wstats_mod
3452
3453== 13/09/2021 == JN
3454Water-cycle cleanup, clarifications and additions.
3455- flag "cap_albedo" renamed "cst_cap_albedo" for clarity. When set to true, watercaptag grid cells albedo
3456remains constant even when frost condensates on it. Only useful when albedo of frost and cap are different
3457(default is false)
3458- addition of two flags "refill_watercap" and "frost_metam_threshold". Refill_watercap is used to convert
3459h2o_ice_s into watercap if the amount of h2o_ice_s is above the frost_metam_threshold (on watercaptag only).
3460One could see it as water frost converted into perennial ice.
3461
3462== 20/09/2021 == CM
3463CO2 clouds microphysics improvements:
3464 - add sedimentation at the surface of CNs tracers
3465 - add tracers ccnco2_h2o_mass_ice, ccnco2_h2o_mass_ccn, ccnco2_h2o_number in place of mem_Nccn_co2, mem_Qccn_co2
3466 - modification of updaterice_microco2 to take into account water ice as CN and not only dust as CN
3467 
3468== 20/09/2021 == EM
3469Improve wstats: the callstats flag is now embedded within wstats and checked
3470internaly so no need to have some "if (callstats)" conditions around calls
3471to wstats anymore.
3472In addition: wstats now looks for an (optional) stats.def file in the
3473directory where the GCM is run to know which variable should be included
3474in the stats.nc file. The stats.def ASCII file should simply contain
3475one variable name per line, in the same way as the diagfi.def file for
3476diagfi outputs. If there is no stats.def file then all variables sent to
3477wstats will be in the stats.nc file (which matches the behaviour prior to
3478this improvement).
3479
3480== 24/09/2021 == CM
3481merge co2condens_mod4micro.F with co2condens_mod.F
3482variable used:
3483if (co2clouds)
3484  condens_layer, condens_column
3485else
3486  zcondicea, zfallice
3487
3488== 22/10/2021 == EM
3489Improve tests by "check_physics_fields": also look for
3490negative values of tracers.
3491
3492
3493== 22/10/2021 == SF+AB
3494Clarify the description of extract
3495
3496== 25/10/2021 == MW+EM
3497Fixes for the picky gfortran10 compiler which identifies using a scalar
3498instead of a one-element array as an error.
3499
3500== 26/10/2021 == CM
3501Delete nucleaco2.F (old file), the good one is nucleaco2.F90 (better modular)
3502
3503== 27/10/2021 == JL+EM
3504Fixes in the utilities for the picky gfortran 10+ compiler
3505
3506== 29/10/2021 == RV
3507First stage of implementing Open_MP in the physic.
3508So far it can initialyse physic and run with all routines at .FALSE.
3509
3510== 29/10/2021 == LR
3511Fixing missing case for hdo_ice in inichim_newstart
3512Should fix issue #25 on gitlab
3513
3514== 16/11/2021 == RV
3515Second stage of implementation of Open_MP in the physic.
3516Run with callrad=.true.
3517
3518== 18/11/2021 == RV
3519Third stage of implementation of Open_MP in the physic.
3520Run with callnlte=callnirco2=calldifv=calladj=calltherm=callrichsl=callcond=callsoil=calllott=TESicealbedo=.true.
3521
3522== 19/11/2021 == JN
3523Bug correction in vdifc caused by the computation of watercap tendency within the subtimestep of water ice sublimation.
3524This is now computed after the subtimestep (actually much simpler).
3525Local variables "zwatercap" and "zdwatercap_dif" used to monitor the evolution of watercap during the subtimestep
3526are now obsoletes and thus deleted.
3527Third stage of implementation of Open_MP in the physic.
3528Run with callnlte=callnirco2=calldifv=calladj=calltherm=callrichsl=callcond=callsoil=calllott=TESicealbedo=.true.
3529
3530== 30/11/2021 == CM
3531MPCO2: add meteoritic particles as condensation nuclei.
3532   => new flag: meteo_flux
3533   => new input file in datadir: Meteo_flux_Plane_v2.dat
3534
3535== 03/12/2021 == LR
3536Utils: fixed a bug in concatnc. The program now properly carries over missing
3537values from the input files into the output file.
3538
3539== 06/12/2021 == CM
3540MPCO2: remove old file Meteo_flux_Plane.dat, change file name Meteo_flux_Plane_v2.dat to Meteo_flux_Plane.dat
3541
3542== 10/12/2021 == MV
3543hdo_surfex_mod.F, vdifc_mod.F: addings to account for the effect of kinetics in the fractionation by condensation of HDO at the surface
3544
3545== 15/12/2021 == JL
3546Fixes and improvements in the Non-orographic GW scheme, namely:
3547- increments are not tendencies
3548- missing rho factor in EP flux computation
3549- missing rho at launch altitude
3550- changed inputs, because R and Cp are needed to compute rho and BV
3551
3552== 17/12/2021 == JYC+EM
3553Move "zls" (solar longitude) from being a local variable of physiq
3554to module comsaison_h. This is for convenience (saving zls and making
3555it available to the "plasma dynamical core").
3556Also cleaned up and commented comsaison_h in the process.
3557
3558== 04/01/2022 == CM
3559- Clean co2condens_mod.F
3560- remove dqsurf duplication after call co2condens
3561
3562== 04/01/2022 == AB
3563Some further cleaning of co2condens following r2599 and r2600 that fixed the bug appearing when the scavenging by CO2 ice was activated.
3564
3565== 04/01/2022 == CM
3566following r2600, remove use co2condens_mod4micro in physiq_mod.F
3567
3568== 18/01/2022 == RV
3569Open_MP files reading for callnlte = .true.
3570
3571== 18/01/2022 == RV
3572Open_MP files reading for NIR : callnirco2.and.nircorr.eq.1
3573
3574== 18/01/2022 == RV
3575Open_MP files reading for Dustdevil : callddevil = .true.
3576
3577== 18/01/2022 == RV
3578Open_MP files reading for albedocaps : TESicealbedo = .true.
3579New subroutine specific for the reading
3580
3581== 18/01/2022 == RV
3582Open_MP files reading for thermosphere : callthermos = .true.
3583
3584== 18/01/2022 == RV
3585Open_MP files reading for moldiff : callmoldiff = .true.
3586
3587== 18/01/2022 == RV
3588Open_MP : Put all the "COMMON" of *.h file as "$OMP THREADPRIVATE"
3589
3590== 18/01/2022 == RV
3591Open_MP files reading for PHOTOCHEMISTRY : photochem = .true.
3592
3593== 18/01/2022 == RV
3594Open_MP Correction for previous commit: commision of photolysis_mod
3595
3596== 18/01/2022 == RV
3597Put all the "save" variables as "!$OMP THREADPRIVATE" in phymars.
3598The code can now be tested (comparison between restart(fi), diagfi files)
3599Compile with the option : -parallel mpi_omp, add these lines in the bash:
3600export OMP_NUM_THREADS= N
3601export OMP_STACKSIZE=200M
3602with "N" of the order of #levels/10
3603
3604== 18/01/2022 == RV
3605Open_MP : In co2condens_mod : Remove emisref from THREADPRIVATE as it is not a saved variable
3606
3607== 28/02/2022 == RV
3608Open_MP :Small OpenMP fixes in conf_phys for reading radia.def with ifort
3609
3610== 28/02/2022 == AB
3611Big changes on mountain top dust flows for GCM6:
3612- the scheme now activates only in grid meshes that contain a mountain among
3613  a hard-written list, instead of every meshes. This is done to prevent strong
3614  artificial reinjections of dust in places that don't present huge converging
3615  slopes that concentrate dust (ex: Valles Marineris, Hellas).
3616  Topdust is now also detrained as soon as it leaves the column it originated from.
3617- the list of the 19 allowed mountains is used by the subroutine topmons_setup
3618  in module topmons_mod, to compute a logical array contains_mons(ngrid).
3619  alpha_hmons and hsummit are also set up once and for all by this subroutine,
3620  which is called in physiq_mod's firstcall.
3621- contains_mons, alpha_hmons and hsummit are now saved variables of the module
3622  surfdat_h, and are called as such and not as arguments in the subroutines
3623  using them.
3624- the logical flag "slpwind" and the comments in the code have also been updated
3625  to the new terminology "mountain top dust flows", accordingly to ticket #71.
3626  The new flag read in callphys.def is "topflows".
3627
3628== 01/03/2022 == AB+LL
3629Fix ticket #93. start2archive now correctly stores the variable albedo from
3630startfi.nc in the output file start_archive.nc, and newstart reads the variable
3631albedo in start_archive.nc before outputing it in restartfi.nc
3632
3633== 03/03/2022 == AB
3634Changes on dust_rad_adjust for GCM6:
3635- put an upper limit on dust_rad_adjust to avoid skyrocketing values when there are strong diurnal
3636  variations of opacity
3637- move the condition to compute dust_rad_adjust only once per time step before the whole call to
3638  compute_dust_rad_adjust, instead of repetitive local checks
3639- some cleaning
3640
3641== 09/03/2022 == EM
3642Update inichim_newstart to be compatible with latest additions of non-chemistry
3643tracers.
3644
3645== 09/03/2022 == AB
3646Update .def* files in LMDZ.MARS/deftank/
3647*.def.GCM6 files are bound to change later but are ready to use.
3648
3649== 09/03/2022 == AB
3650Following r2637, change default values for dust cycle parameters to make them
3651consistent with callphys.def.GCM6
3652
3653== 09/03/2022 == JL
3654Update for non-orographic Gravity Waves; some key parameters can now be
3655set via callphys.def
3656
3657== 15/03/2022 == JL
3658Switching orographic GW routines to F90 and adding comments.
3659
3660== 17/03/2022 == AB
3661Implementation of the IRabs-to-VISext dust scenario conversion, depending on the GCM effective radius :
3662- new flag 'reff_driven_IRtoVIS_scenario', false by default, must be set to true to use this dynamic conversion
3663  (otherwise, the coefficient takes the constant value of 2.6, eqv to reff=1.5\B5m, as before)
3664  A specific line is added in deftank/callphys.def.GCM6
3665- this flag requires the 'dustiropacity' to be set to 'tes' to match the IR scenario's wavelength.
3666  'mcs'-like dso diagnostics can only be produced by the use of the post-processing tool util/aeroptical.F90
3667- the variable IRtoVIScoef is computed in aeropacity via the GCM CDOD ratio : tau_pref_gcm_VIS/tau_pref_gcm_IR
3668  (only at the first call to callradite during each physical timestep)
3669- change read_dust_scenario into module read_dust_scenario_mod
3670
3671== 21/03/2022 == RV
3672OMP : update the batch example for Occigen and the README associated
3673
3674== 24/03/2022 == EM
3675Small update of the handling writing fields in the restartfi.nc; use a
3676dedicated flag to avoid calls to mod() with a zero argument which causes
3677recent gfortran (9+) to complain about a division by zero when in debug mode.
3678
3679== 28/03/2022 == JL+EM
3680- turn sugwd.F to sugwd.F90 with extra comments
3681- turn yoegwd.h into a module
3682
3683== 07/04/2022 == CM
3684initracer.F : remove nuice_ref, nuiceco2_ref (ticket 100)
3685              add some test for co2 microphysics
3686
3687== 07/04/2022 == CM
3688co2cloud.F90 : correction on rsedcloudco2 computation (nuice instead of sigma)
3689               correction on opacities/riceco2 computation when using water ice CCN
3690improvedco2clouds_mod.F90 : add some comments
3691physiq_mod.F : add variable co2conservation
3692               add zdsc = 0 before  call co2condens
3693co2condens_mod.F : adapt zfallice outputs in accordance with co2cloud flag
3694                   otherwise we have not 1 day(1proc) = 1 day (24procs) test
3695updatereffrad_mod.F : deals with co2useh2o flag before riceco2 computation
3696
3697== 08/04/2022 == EM
3698Follow-up to removal of nuice_ref default value in initracer.
3699Put nuice_ref=01 as default value in conf_phys to maintain default behaviour.
3700
3701== 25/04/2022 == AB
3702Put the CO2 ice scavenging ratio for dust and water ice to 20 instead of 100, to prevent drying of the water cycle.
3703
3704== 27/04/2022 == EM
3705Fixed option to initialize chemistry in testphys1d (inichim_newstart call
3706arguments were wrong).
3707Turned inichim_newstart.F90 into a module.
3708
3709== 17/05/2022 == TP
3710Add incoming solar direct flux at surface in stats outputs for the MCD.
3711+ declare new variable "flux_1AU" for solar constant.
3712
3713== 19/05/2022 == JL
3714Upate Non-Orographic GW scheme: cmax is not longer fixed but evaluated
3715as the zonal wind at launch altitude.
3716
3717== 27/05/2022 == EM
3718Add possibility to output either upward or downward SW flux at the surface
3719and top of atmosphere from physiq. Required adding some output arguments
3720to callradite.
3721
3722== 30/06/2022 == EM
3723Minor bug fix in co2condens, erroneous use of surface geopotential phisfi(),
3724wheras geoptential pphi() is already the geopotential relative to the surface.
3725Tests showed that this specific erroneous computation was only done in rare
3726cases and had overall little impact on the simulations.
3727
3728== 01/07/2022 == EM
3729Fix a bug I introduced in r2681 (19/05/2022): surface tracers should only be
3730initialized to zero if not found in the startfi.nc file.
3731
3732== 01/07/2022 == JN
3733"caps" flag is no longer called in surfini.F to set the location of watercaptag.
3734It now only affects the temperature of south pole grid cell in co2condens.
3735
3736== 31/08/2022 == JN
3737Added "atm_wat_profile" flag in 1d to force dry and wet atmospheric water vapor profiles.
3738
3739== 1/09/2022 == JN
3740"atm_wat_profile" flag change in 1d. It is now a float directly prescribing the desired MMR of water vapor (0<atm_wat_profile=<1). If (atm_wat_profile > qsat) at a given timestep we have : (atm_wat_profile = qsat).
3741Other options are :
3742 - atm_wat_profile = -1 : water vapor and ice are free in the column. This is the default mode of the 1d model which conserves total water tracers (qsurf + watercap + h2o_ice + h2o_vap)
3743 - atm_wat_profile = 0 : dry atmosphere, where q(h2o_ice) = q(h2o_vap) = 0.
3744
3745== 13/10/2022 == MV
3746watercloud_mod.F: implementation of the HDO ice and vapor fluxes computation in the case of supersat=false.
3747
3748== 14/10/2022 == MV
3749watercloud_mod.F: follow-up of previous commit.
3750improvedclouds_mod.F: Lamb et al. 2017 formula set as default in the fractionation by condensation calculation.
3751
3752== 20/10/2022 == EM
3753Add reference def files used to generate MCDv6.1 in deftank
3754(as a side note MCDv6.1 was generated using r2740 of the GCM)
3755
3756== 20/10/2022 == AM
3757Bug fix in jthermcalc_e107 (wrong indexes used in some computations involving
3758NO2 and H2).
3759
3760== 08/11/2022 == RV
3761Update startarchive2icosa repertory for new version of Dynamico
3762
3763== 08/11/2022 == RV
3764Moving a modulo misplaced in start2archive
3765
3766== 14/11/2022 == AB
3767Non-retrocompatible changes of the program util/aeroptical.F90 :
3768 - make the program more generic, as the user now specify in aeroptical.def
3769   the aerosols to be computed, as well as the necessary information for each
3770   aerosol, that are :
3771   aerosol_name,aerosol_mmr(GCM variable name),aerosol_reff(GCM variable name or single value in m),aerosol_rho(value in kg/m3),optpropfile_name
3772 - creation of a separate module aeropt_mod.F90 that can be used by other programs (e.g. for the MCD),
3773   with one subroutine reading the ASCII optical properties file,
3774   one subroutine interpolating optical properties at a given (wvl,reff) tuple,
3775   and one subroutine deallocating the module variables.
3776 - modify the compile program to compile this module aeropt_mod.F90 along
3777   with the aeroptical.F90 program. There is no change for the user,
3778   which just has to run the command 'compile aeroptical' like before.
3779 - correct the handling of user's wavelength or particle sizes that do not lie
3780   within the boundaries of the optical properties file.
3781
3782== 15/11/2022 == JN
3783 - Now allow seasonal frost to change albedo in 1d
3784 - Can now output albedo in 1d with diagfi.def
3785
3786== 18/11/2022 == EM
3787Remove the "tracer" (logical) flag as we now always run with at least
3788one tracer.
3789
3790== 18/11/2022 == EM
3791A first step at cleaning/improving the xvik program: updated comments
3792and changed output yearly dates range to include sol=669.0 (i.e. last
3793time step of the year).
3794
3795== 23/11/2022 == RV
3796Correct initialisation and outputting of variable to run the pcm and newstart in debug mode.
3797In topmons, zlaywmax=-1 by default, only positive values are correct.
3798
3799== 23/11/2022 == RV
3800The variable co2ice is deleted. All the co2 ice on surface is now in qsurf(:,igcm_co2).
3801CO2 tracer is now mandatory. diagfi output is unchanged.
3802
3803== 23/11/2022 == RV
3804Same as previous commit in 1D.
3805
3806== 23/11/2022 == RV
3807Same as previous commit for newstart and startarchive.
3808
3809== 23/11/2022 == RV
3810Cleaning of phyredem0. Argument passed to the subroutines were unused.
3811
3812== 23/11/2022 == AB
3813The program util/aeroptical.F90 can now compute column-integrated optical depths
3814of the aerosols, in addition to the opacity profiles. The user has to specify it
3815('yes' or 'no') in aeroptical.def
3816Detailed changes :
3817 - update of the aeroptical.def file to ask the user if the column optical depth
3818   should be computed (non-retrocompatible change)
3819 - add in the init2 subroutine a computation of the layers' height delta_z, with
3820   adaptable method depending on the availability of some variables in the input file
3821   and on wether or not the input file has been zrecasted before. Preliminary validation
3822   shows that these different methods yield a +/-3% error on the output column optical
3823   depth tau_[aer]. The delta_z variable is also written in the output file.
3824 - add a log file for warnings in the interpolation subroutine in aeropt_mod.F90
3825   + add some comments in the code
3826 - add the ouput "zzlev" (= interlayer altitudes) in libf/phymars/physiq_mod.F
3827   so that it can be directly used by aeroptical.F90 to compute delta_z
3828
3829== 29/11/2022 == AB
3830Add an example of setup in LMDZ.MARS/util/compile to compile utilitary programs
3831on Irene-Rome supercomputer.
3832
3833== 02/12/2022 == JN
3834Add "surf_h2o_lh" output. This is the latent heat term from ground water ice
3835sublimation / condensation in W.m-2
3836Also corrected units of shortwave & longwave heat rates in writediagfi
3837
3838== 18/12/2022 == TP
3839Update xvik program. The program now interpolates surface pressure at 3 locations : Viking Lander 1, Viking Lander 2 and Insight.
3840Also add as outputs :
3841- Diurnal average
3842- Harmonics fit (Fourier series) of the diurnal average (6 harmonics)
3843Columns of each output are described at the top of each file. (Fourier coefficients are also given for harmonics fit)
3844Total CO2 inventory is also caluclated now by xvik.
3845
3846== 26/01/2023 == SF+AB
3847Fix a small error on co2ice in dynphy_lonlat/phymars/lect_start_archive.F (used by newstart)
3848
3849== 31/01/2023 == RV
3850Small fix : move an endif misplaced for watercap
3851
3852== 31/01/2023 == RV
3853Watercaptag is now outputed in the starfi.nc.
3854There is a new mode : icelocationmode=5 to read watercaptag from startfi and to do as iceloctaionmode=4 if the variable is not present.
3855
3856== 31/01/2023 == RV
3857A file containing information about number of iteration and reason of stopping of the PEM can be outputed (info_run_PEM.def)
3858
3859== 10/02/2023 == RV
3860Change back the modification of r2883 to its original form + Retrocompatibility for icelocation_mode.ne.5 in surfini
3861
3862== 10/02/2023 == RV
3863Correction of recomp_tend_co2 formula and make it dependent on the presence of co2_ice.
3864Add different stopping criterion for water_ice and co2_ice called : water_ice_criterion and co2_ice_criterion.
3865Add the possibility to output a diagfi.nc each year for the amount of ice, the tendencies, tsurf and ps.
3866Remove useless variables (not sloped)
3867Remove useless file
3868Some cleaning
3869
3870== 10/02/2023 == RV
3871New Boolean options for following orbital parameters of ob_ex_lsp.asc: var_obl, var_ex, var_lsp.
3872If using evol_orbit_pem=true, you can specify which parameter to follow.
3873True by default: Do you want to change the parameter XXX during the PEM run as prescribed in ob_ex_lsp.asc.
3874If false, it is set to constant (to the value of the tab_cntrl in the start)
3875
3876== 10/02/2023 == LL
3877PEM
3878Soil temperature initialisation has been updated
3879Conf_PEM improved by adding some options to the users (thermal regolith depend on the pressure, depth of the subsurface layers, etc.)
3880Minor edits then (+ svn update with RV had some issues, so there are some "artefact changes" ...)
3881
3882== 14/02/2023 == RV
3883First modifications to introduce subslope parametrization in surface processes.
3884New variables are added in the new module comslope_mod to describe the subslopes:
3885        _ nslope (number of subslope)
3886        _ subslope_dist (distribution  of the slopes)
3887        _ def_slope (bound of the slope statistics / repartitions) etc..
3888These variables are added to the starfi file.
3889Other GCM variables, outputs and subroutines are not modified yet.
3890Only nslope=1 is accepted so far (ie. same as no subslope parametrization)
3891
3892== 16/02/2023 == RV
3893MARS PEM : Deep cleaning of variables name and allocate.
3894All the "dyn to phys" grid change is done in subroutines and not in the main program.
3895
3896== 21/02/2023 == RV
3897Following r2896, further implementation of subslope parametrisation.
3898Carefull ! This is a devolpment revision and it still need improvements and tests.
3899However, this commit should not change anything for nslope=1.
3900Only nslope=1 is possible for now!
3901Utilitaries are not adapted yet.
3902Dimension of some variables (30 listed below) is changed to add the nslope dimension.
3903Outputs (diagfi and restartfi) are not changed yet.
3904nslope is now read and written in the startfi.nc
3905
3906== 22/02/2023 == LL
3907PEM: First implementation of a dynamic ice table (vs. static ice table at equilibrium) following Schorgofer (2010,Icarus)
3908
3909== 23/02/2023 == AB
3910In aeroptical.F90, handle cases between :
3911- "all opacities in the column are missing values" (in which case we set column-integrated tau=missval)
3912and
3913- "at least one opacity is not a missing value but is 0" (in which case we set tau=0)
3914
3915== 28/02/2023 == RV
3916Further implementation of subslope parametrisation.
3917Carefull ! This is a devolpment revision and it still need improvements and tests.
3918However, this commit should not change anything for nslope=1. Only nslope=1 is possible for now!
3919Sloped variables in the startfi are outputed along the nslope dimension.
3920Possibility to output variables on a specific subslope in diagfi using VAR_slopeXX in the diagfi.def,
3921with VAR the variable name (ex: tsurf, co2ice...) and XX the slope number (ex: 04, 07...).
3922Without any specific mention to slope, variable named VAR in the diagfi.def will correspond to the variable in the flat slope, this can change in the future.
3923Other code changes for nslope.gt.1 (sometimes the grid mesh average is used instead of the value of the subslope)
3924
3925== 28/02/2023 == RV
3926This commit can produce small differences in restartfi.nc due to numerical roundup even for the case nslope=1.
3927tsurf_mesh_avg is used for callradite, thermosphere and in a specific case with Richardson based surface layer.
3928
3929== 09/03/2023 == RV
3930Newstart is now adapted to subslope parametrization and is compatible with the PCM.
3931It can create start with 1, 5 or 7 subslope abd needs mola64.nc to do so.
3932Correction in compute_mesh_avg for nslope=1: no average is done only a copy.
3933
3934== 10/03/2023 == EM
3935Make subslope_mola a module and turn (extremely) large static arrays into
3936allocated ones and assume that the "mola64.nc" file is in "datadir" rather
3937than a hard coded location.
3938
3939== 12/03/2023 == EM
3940Follow-up on the addition of an nslope dimension, also adapt XIOS outputs.
3941
3942== 14/03/2023 == RV
3943Adapt start2archive.F to the subslope parametrisation.
3944Small correction for newstart.
3945
3946== 14/03/2023 == RV
3947Adapt start2archive_SSO.F to the subslope parametrisation.
3948
3949== 14/03/2023 == RV
3950Move the initialisation of inertiedat in the subslope dimension for the case where we start without startfi.
3951
3952== 16/03/2023 == EM
3953Add a "diagsoil" flag to trigger outputing a diagsoil.nc file
3954(default is diagsoil=.false.)
3955
3956== 16/03/2023 == EM
3957Some corrections to the 1D model to take into account recent changes
3958(removing co2ice and added islope dimension to some arrays).
3959
3960== 25/03/2023 == EM
3961Add the possibility to use MY36 dust scenario and MY36 EUV inputs
3962
3963==30/03/2023 == EM
3964Add illustrative execution job for spirit (aka MESOIPSL cluster) in deftank
3965
3966==30/03/2023 == RV
3967Add the possibility to start the 1d model from a startfi (option startfile_1D in run.def false by default).
3968It will then write a restartfi at the end of the run.
3969+ Correction of r2919 for flux geo in 1D and initialize it to 0 by default.
3970+ Minor correction of iostart error message.
3971
3972==31/03/2023 == RV
3973The 1D model always output a restarfi
3974
3975== 31/03/2023 == AB
3976Replicate Venus commits r2927 and r2928 for Mars photochemistry :
3977Correction of the reaction N2+ + e- > N + N
3978
3979== 02/04/2023 == EM
3980Adapt topmons_setup to handle both cartesian and icosahedral grids
3981
3982==03/04/2023 == RV
3983Remove the test ngrid==1 for writediagfi. The routine can handle well the 1D case.
3984
3985==03/04/2023 == RV
3986Add a new routine to write output called write_output.
3987It needs to be imported (for example : use write_output_mod, only: write_output)
3988Then, it requires only 4 arguments : the name of the variable, its title, its units and the variable itself.
3989It detects the dimension of the variable and decide to output either in diagfi or diagsoil.
3990It is also compatible with XIOS (xml file needs to be adapted)
3991Writediagfi and writediagsoil routines are still available in case.
3992
3993==03/04/2023 == RV
3994Small correction in write_output_mod following r2932
3995
3996== 10/04/2023 == EM
3997A first step in cleaning up outputs and adding field definitions for XIOS.
3998 
3999== 12/04/2023 == RV
4000Adapt routine lect_start_archive.F to the subslope param.
4001 
4002== 12/04/2023 == JN
4003Change default atw_wat_profile (1d model) to -1 instead of 0 : water is conserved on the column
4004
4005== 14/03/2023 == AB
4006Update the setup example in util/compile to compile utilitary programs
4007on Irene-Rome supercomputer following OS upgrade to Red Hat 8.
4008
4009== 26/04/23 == RV
4010Following r2942, small modification to output inertiesoil as a subslope variable in the startfi.nc
4011
4012== 26/04/23 == LL
4013Following r2942, fix a bug in the 1D version (inertiesoil was not
4014written in the startfile).
4015Introduce the possibility to prescribe subsurface ice in the 1D model
4016
4017== 27/04/2023 == EM
4018Fix OpenMP bug on inertiesoil, unnecessary loop and a line
4019too long for fixed fortran format.
4020Minor fix for picky gfortran compiler in testphys1d (no .eq. for logicals!)
4021
4022== 28/04/2023 == RV
4023Correct writing of variables inertiesoil and fluxgeo following r2919 and r2942
4024
4025== 28/04/2023 == RV
4026Adapt vdifc, co2condens, rocketduststorm and topmons routines to the subslope parametrisation.
4027
4028== 05/05/2023 == RV
4029Correct start2archive to write watercaptag correctly.
4030Watercaptag will be set to false and correctly handle by the PCM in the case where we change resolution.
4031+ Correct inertiesoil writting in start2archive
4032
4033== 12/05/2023 == RV
4034Create a new file "file_def_physics_mars.xml" in deftank.
4035This is the place to define the output (file name, variable, frequency, operation...) of the physic when using XIOS.
4036
4037== 17/05/2023 == AB
4038Fixed r2963 which was preventing to compile the model without XIOS
4039+ changed the computation of variables rhowater_* so that they are real densities (factor 1/rvap missing ; this doesn't affect the previous PEM results as these densities were only compared between each other)
4040+ added comments and units for ice table variables in physiq_mod.F
4041+ made Clapeyron coefficient names in physiq_mod.F coherent with how they are defined in the PEM
4042+ fixed a reference in constants_marspem_mod.F90
4043+ fixed unit attribute of surface/soil water densities in field_def_physics_mars.xml
4044
4045== 19/05/2023 == JN
4046+ Architecture change in watercloud_mod.F, improvedclouds_mod.F :
4047Instead of computing all subtimesteps simultaneously, we now loop on
4048(ngrid,nlay) first. This is to allow for a future adaptative timestep.
4049+ Second architecture change in the computations of tendencies within
4050watercloud_mod.F : we now increment directly tracers and temperature instead
4051of tendencies. This may allow future developments for optimizations.
4052+ Because of second change, no bit by bit correspondance with previous
4053revision (truncature stuff)
4054+ "simpleclouds" routine should be broken in this build (microphys=.false.)
4055+ Introducing a flag "cloud_adapt_ts" (false by default) to set the adaptative timestep (not yet ready). Otherwise fully retrocompatible.
4056
4057
4058== 26/05/2023 == RV
4059Adapt write_output to be able to output integer and logical in diagfi.nc, but the variables are converted to real by the routine before being written in the netcdf.
4060
4061== 30/05/2023 == RV
4062Adapt expandstartfi to subslope dimension and small correction regarding depreciated dimension "number_of_advected_field"
4063
4064== 02/06/2023 == EM
4065Follow-up to r2970: output of integers/logicals also converted to reals with XIOS
4066Also updated "deftank/field_def_physics_mars.xml" to keep up with recently added
4067variables
4068
4069== 09/06/2023 == AB
4070Adapt simu_MCS.F90 so that it also recognizes new dust opacity names from aeroptical (since r2817 : "opa_dust" instead of "opadust")
4071(retrocompatible with old names as well)
4072
4073== 12/06/2023 == EV
4074+ Created an option to output the profiles in 1D using write_prof (default is false)
4075for the several years run mostly the PEM
4076
4077== 12/06/2023 == JN
4078Following commit r2966 :
4079+ adaptative subtimestep now ready and computed in improvedclouds using an
4080empirical powerlaw. Flag is "cloud_adapt_ts" (default false) with
4081retrocompatibility with imicro.
4082+ simpleclouds working
4083
4084== 03/07/2023 == JN
4085Bugfix in improvedclouds from previous commit (r2984) where loops on
4086(ngrid,nlay) where conducted within big (ngrid,nlay) loop. Two occurrences :
4087initialization of zq0 and preventing negative tracers.
4088
4089== 06/07/2023 == EM
4090Minor fix in utility "expandstartfi": correctly handle the case of
4091polar mesh areas.
4092
4093== 07/07/2023 == JBC
4094Minor fix for initialization of tracers indices and rework of "atm_wat_profile" in testphys1d.F.
4095
4096== 10/07/2023 == EM
4097Update reference field_def_physics_mars.xml to take into account recently
4098added outputs in improvedclouds.
4099
4100== 18/07/2023 == EM
4101Some adaptations to enable running the 1D model with XIOS.
4102Note that this requires compiling with "-io xios -parallel mpi"
4103but the model should then be run using a single core, i.e. without mpirun
4104
4105== 19/07/2023 == JBC
4106Some adaptations to make the 1D model run with XIOS and MPICH for use with 1D PEM.
4107Small fixes to compile and run 1D model related to the second to last commit.
4108
4109== 21/07/2023 == EM
4110Some code cleanup. Remove obsolete "comg1d.h" and "writeg1d.F" (were used to
4111specifically output for Grads in 1D).
4112Also turned lwi and lwflux into modules while at it.
4113
4114== 21/07/2023 == EM
4115More code cleanup. Turn "nirdata.h" common into module "nirdata.F90" and
4116include "nir_leedat.F" (reading/loading of the data) in the module.
4117Also turn nirco2abs.F in a module.
4118
4119== 21/07/2023 == EM
4120Fix OpenMP bug in paleoclimate_mod; saved variables should be threadprivate.
4121
4122== 22/07/2023 == EM
4123Some code cleanup around microphysics. Turn microphys.h into module
4124microphys_h.F90, and while at it also turn nuclea.F, growthrate.F90 and
4125massflowrateco2.F90 into modules.
4126
4127== 24/07/2023 == EM
4128Code cleanup concerning chemistry. Turn chimiedata.h into module
4129chemistrydata.F90 and integrate read_phototable.F in it.
4130Also fix an OpenMP issue with read_phototable; different OpenMP threads
4131should not simultaneously open/read a file. Let the master do the job
4132and then broadcast the result to all cores.
4133While at it, also turned nltecool.F and nlte_tcool.F into modules.
4134
4135== 25/07/2023 == EM
4136Code cleanup in diffusion, turn variables from diffusion.h into module
4137variables in moldiff_red.F90 (turn it into a module in the process).
4138Also turn moldiffcoeff_red.F and thermosphere.F into modules.
4139
4140== 26/07/2023 == EM
4141Code cleanup: nltedata.h is only included in nltecool.F so turn this data
4142into module data there. Also convert lteparams.h into module nlteparams_h.F90.
4143And while at it also turn nlthermeq.F and blendrad.F into modules.
4144
4145== 27/07/2023 == JN
4146Optimization for adaptative subtimestep of water-ice clouds : should now be
4147much faster. + small cleanup
4148
4149== 28/07/2023 == EM
4150Further code cleanup with NLTE routines; converted nlte_paramdef.h to module
4151nlte_paramdef_h.F90 and nlte_commons.h to module nlte_commons_h.F90
4152(could not turn nlte_aux.F, nlte_setup.F and nlte_calc.F into modules due
4153to circular dependencies; would require further code reorganization).
4154
4155== 31/07/2023 == JBC
4156Addition in 1D of relaxation towards a profile for atmospheric water. It needs the flag "atm_wat_tau" (real):
4157 - atm_wat_tau < 0. -> no relaxation (default);
4158 - atm_wat_tau >= 0. -> relaxation towards the value "atm_wat_profile" with relaxation time "atm_wat_tau".
4159
4160== 07/08/2023 == EM
4161Fixed a bug in newstart call to lect_start_archive; missing perenial_co2ice
4162argument. Turned lect_start_archive into a module so this cant't happen again.
4163
4164== 09/08/2023 == JBC
4165Small fixes to be able to run the Mars PCM 1D without "water".
4166
4167== 14/08/2023 == JBC
4168Related to commit r3026: improvement of error message in initracer.F (now it gives correctly the only identified tracers) + one small correction to run PCM 1D without water.
4169
4170== 8/09/2023 == JBC
4171In testphys1D.F, "dtphys" was renamed into a local variable "dttestphys" because "dtphys" is also a variable of time_phylmdz_mod.F90. Thus, it could have been modified by the physics through the module (for ex. by tabfi.F when reading startfi.nc) and affect the dynamics which is prohibited.
4172Some code cleaning in regards of tests in 1D.
4173
4174== 12/09/2023 == JBC
4175The variable 'timeperi' (defined in "planete_h.F90" and computed in "iniorbit.F") is renamed into 'lsperi' and thus slightly changed to be coherent to the solar longitude of perihelion in radian. It can now be used out of the box by other subroutines/programs like the PEM.
4176
4177== 21/09/2023 == JBC
4178Addition of the pressure profile to be able to run chained simulations in 1D. Like this, the surface pressure can be got from one run to the next.
4179Rework of "write_profile.F90" + correction of arguments in its call in "testphys1d.F": 'qsurf' was wrongly given!
4180
4181== 26/09/2023 == JBC
4182Addition of the file "start1D.txt" which mimics a "start.nc" file to be able to run chained simulations in 1D. Like this, key variables and profiles can be got from one run to the next. As a consequence, the subroutine "write_profile.F90" is replaced by "writerestart1D.F90".
4183
4184== 27/09/2023 == JBC
4185Upgrade of "testphys1d" to Fortran 90. Cleaning of the subroutine and minor optimizations of the code.
4186Correction of a bug: 'inertiedat(1,1)' was overwritten by 'inertieice'.
4187From now on, in "testphys1d.F90", initialization is entirely done by a new subroutine called 'init_testphys1d' ("init_testphys1d_mod.F90").
4188
4189== 27/09/2023 == EM
4190Add extra tests for XIOS output: only combine and send fields to XIOS if the
4191user requests them in one of the output files.
4192
4193== 27/09/2023 == YL+AB
4194Fix ticket #141 : when doing a log interpolation in zrecast (e.g. for density), negative and null values are changed into a very small positive value (below the numerical precision) so that the log interpolation yields a null value.
4195+ add '_FillValue' attribute (redundant with 'missing_value') checks and outputs in zrecast to comply with newest NCO versions (part of ticket #152)
4196
4197== 28/09/2023 == EM
4198Update reference deftank files:
4199- remove obsolete callphys.def.notracers
4200- rename z2sig.def to z2sig.def.MCD6
4201- update callphys.def.GCM6 to include non-oro GW parametrization
4202- update callphys.def.MCD6 to disable Frost metamorphism option
4203
4204== 28/09/2023 == JBC
4205Related to commit r3056, correction of bugs and some adaptations of the subroutine 'init_testphys1d'.
4206
4207== 28/09/2023 == JN
4208Finalization of adaptative timestep of cloud microphysics :
4209- conf_phys.F : Checking that both flags "cloud_adapt_ts" and "temp_dependant_m" needs to be
4210activated in order to run with an acceptable water cycle
4211- nuclea.F : "temp_dependant_m" now actualized to be compatible with "cloud_adapt_ts" as
4212in the latest release
4213- improvedclouds.F : "cloud_adapt_ts" powerlaw coefficients actualized for conservative
4214present-day computations
4215- Explicit comments in several sections of the code with these infos
4216
4217== 28/09/2023 == JN
4218Following previous commit, correction of a spelling mistake "temp_dependant_m"
4219is actually "temp_dependent_m". Sorry about that.
4220
4221== 30/09/2023 == AB
4222Following r3061 and r3062 :
4223- adapt files callphys.def.GCM6 and callphys.def.MCD6 in deftank/ to match with the new orthograph of temp_dependent_m
4224- restore the possibility to run with a temperature-dependent contact parameter without using the cloud adaptative subtimestep
4225  (MCD6.1 configuration, mteta = linear fit of temp)
4226
4227== 02/10/2023 == LL
4228Follwing -r 3056:
4229- Surface variables (tsurf, tsoil, albedo, emis, qsurf) are not defined and allocated in testphys1D but the routines testphys1D and init_testphys1D used what is defined in comsoil, surfdat_h, dimradmod.
4230-surface variables in testphys1D and init_testphys1D have a slope dimension (set to 1 for now, hard-coded, will be improve later).
4231Slight changes are expected for the PEM (TBC w/ JBC).
4232
4233== 03/10/2023 == JBC
4234In 1D, 'q' has been converted from dimension (:,:) to (1,:,:) and 'q2' is now got through the module 'turb_mod'. It allows more generalization and to match dimension in the subroutines.
4235Related to commit r3066, correction of a bug to write/read a restart/start in 1D and more adaptations of the code.
4236
4237== 05/10/2023 == AB
4238Add an example of setup in util/compile to compile utilitary programs on Adastra supercomputer.
4239Warning: on Adastra, you need to add the netcdf library path to LD_LIBRARY_PATH before running the executable
4240(export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$NETCDF_DIR/lib)
4241
4242== 05/10/2023 == JBC
4243Correction of a bug introduced in commit r3069 when compiling with ifort.
4244
4245== 06/10/2023 == JBC
4246Transformation of 'writerestart1D' into module.
4247
4248== 06/10/2023 == JN
4249Bugfix : adaptative timestep now is insensitive to ptimestep
4250
4251== 09/10/2023 == EM
4252Improve conctatnc's handling of XIOS output files (handle change in some
4253variable names, e.g. "area" or "phisfi").
4254
4255== 10/10/2023 == EM
4256Enable outputing cell area with XIOS and make sure the polar grid point
4257is correctly handled (i.e. on lon-lat grid outputs polar mesh area must
4258be adjusted to account for the replicated polar meshes).
4259
4260== 10/10/2023 == EM+JBC
4261Follow-up of r3078 which broke the 1D model.
4262Also added initialisation of non-oro GW tendencies stored in startfi.nc when in 1D.
4263
4264== 18/10/2023 == JBC
4265    - Correction of a bug in "writediagfi.F": the case of using the 1D model with parallelization was not anticipated so that the "diagfi.nc" file was filled with NaNf;
4266    - Addition of the file "start1D.txt" as an example in the directory deftank/;
4267    - Some "cosmetic" modifications in "improvedclouds_mod.F", "write_output_mod.F90" and "testphys1d.F90".
4268
4269== 22/10/2023 == EM
4270Fix issues with dates when in parallel with OpenMP (missing copyin
4271statement when opening parallel section in iniphysiq). Added some threadprivate
4272clauses in saved module variables in comcstfi_h.F90 and planete_h.F90.
4273Prettyfied solarlong.F and made it a module. Likewise for conf_phys.F
4274
4275Some code tidying:
4276Made pi in module comcstfi_h a parameter (and not a variable recomputed at
4277various points by various routines) and added module routine init_comcstfi_h
4278to cleanly initialize module variables.
4279Moved iniorbit.F to be a module routine of planete_h since it initializes
4280(some of ) the module variables it contains.
4281
4282== 23/10/2023 == EV
4283We added the to module vdifc the possibily of subsurface intercation, mostly to have the option of buried glaicer that can lose ice and create polar layers.
4284if no ice is on the surface the ice the atmosphere can directly interact with the subsurface ice.
4285if ice is on the surface it can interact with the subsurface ice.
4286**For now it is not working with more then one subslope. I will add this feature soon**
4287In order to use it there are two flags that needs to be set to true.
4288paleoclimate=.true.
4289lag_layer=.true.
4290in addition one need to give the following parametrs in startfi or run.def:
4291d_coef=X for the diffusion coeficent (4e-4 is the defualt)
4292<h2o_ice_depth=X> if its zero or lower there is no subsurface ice (default -1).
4293outputs: zdq_ssi, momentarily zdqsdif after the interaction with the SSIzdq_subtimestep,  momentarily flux after the interaction with the SSIzdq_ssi_frost momentarily zdqsdif after the interaction of the frost with the SSI
4294q1, atmospheric first layer water vapor quatity
4295qeq, SSI water vapor quantity
4296
4297== 26/10/2023 == JBC
4298Few small fixes following r3098.
4299
4300== 02/11/2023 == LL
4301Correction of a small bug in soil_settings: the interpolation on the new grid
4302for the thermal inertia was not used with the old thermal inertia vector but
4303only with the last value of the oldthermal inertia
4304Cleaning of the code
4305
4306== 03/11/2023 == JBC
4307Small fix on "field_def_physics_mars.xml".
4308
4309== 03/11/2023 == LL
4310Introducing qsoil to model H2O adsorption/desorption in the subsurface. For now, I've fixed the number of tracers in the subsurface to t
4311hree (H2O vap, H2O ice, H2O ads).
4312Changing the soil grid (better resolution) as given by Pierre Yves Meslin
4313Adding the possibility to compute H2O adsorption desorption and exchange with
4314the near-surface atmosphere, only works in 1D for now. By default, subtimestep
4315for water sublimation is 1 when adsorption is activated (otherwise it crashes)
4316
4317== 08/11/2023 == JBC
4318Correction of the case when startfiles1D = .true. and there is no "startfi.nc": the flags used in "init_testphys1d_mod.F90" were not correct so the model crashed and didn't create a "startfi.nc" from scratch as intended.
4319
4320== 08/11/2023 == LL
4321Following -r 3113, fixing newstart & startarchive by implementing the changes
4322in phyredem1 and phyetat0, i.e., adding qsoil and nqsoil in the arguments of
4323the subroutine
4324
4325== 09/11/2023 == JBC + EV
4326Correction of a bug introduced in r3059: in case of 'watercaptag=.true.', 'watercap' was prevented to evolve as it should be because of 'zqsurf' in "vdifc_mod.F90" which was forced to be 0 if negative.
4327
4328== 10/11/2023 == LL
4329* Fixing index bug in soilwater.F The adsorption/desorption model now run
4330with the subtimestep (but still not in 3D yet).
4331* Small changes for the boundary conditions when considering
4332adsorption/desorption
4333
4334== 14/11/2023 == AB
4335Add a sanity check on tau_pref_gcm in aeropacity when running without rescaling (dustscaling_mode=/=1), hence resolving ticket #156
4336+ add some comments and a sanity check in conf_phys to ensure freedust flag is not used with dustscaling_mode=1.
4337
4338== 15/11/2023 == LL
4339* Update in soilwater: adding the possibility to run without adsorption, but with the possibility to run with seasonal frost forming in the subsurface
4340* THe choice of the isotherm for adsorption can be now done by setting  the integer choice_ads in the callphys.def choice_ads = 1 adsorption rate is computed with the H2O thermal speed; choice_ads = 2 adsorption rate is computed based on exeperimental resutls, choice_ads =3 no adsorption
4341
4342== 17/11/2023 == CS
4343* Bug fixes for improvedcloud_mod.F :
4344- Initialization of dMice when low ccn number
4345- Initialization of zdq at first sub time step (spenttime=0)
4346- Move 'coef' to fix the formula for zimicro
4347
4348== 17/11/2023 == JBC
4349Correction of a bug related to r3126: 'choice_ads' did not have a default value which made the model crash. 'choice_ads = 0' is the default value (no adsorption).
4350Cleaning of the 1D initialization: any reference of the PEM has been removed from "init_testphys1D_mod.F90". This way is much cleaner even though it needs more code.
4351
4352== 21/11/2023 == EM
4353Bug fix in phyetat0, igcm_co2_tmp was not initialed when paleoclimate==.false.
4354but used nonetheless. Added an if(paleoclimate) around computation of
4355perennial_co2ice() as it should only be computed in that context; also added
4356an if(paleoclimate) around writting perennial_co2ice() to restartfi.nc in
4357physdem1 for the same reason.
4358
4359== 24/11/2023 == LL
4360Bug fix in newstart, "perenial_co2ice" has been changed to "perennial_co2ice"
4361in -r3010 in the PCM without being changed in newstart. It is now corrected.
4362
4363== 29/11/2023 == JBC
4364Small "cosmetic" cleanings in some subroutines for the readability and "surfini.F" is transformed into "surfini_mod.F90" (explicit module interface + Fortran 90 format).
4365
4366== 29/11/2023 == JL
4367New scheme "nonoro_gwd_mix_mod" to simulate non-orographic gravity waves induced mixing. The scheme flag "calljliu_gwimix" has been put to "false" as default.
4368There are three tunable parameters that have been set up, as "nonoro_gwimixing_eff=0.1", "nonoro_gwimixing_eff1=0.1", "nonoro_gwimixing_vdl=1.5".
4369Remember to use full-layers model configuration (64x48x73) when you try to call this scheme because we need to evaluate the saturation altitude of each monochromatic wave.
4370More than ~75% of the waves saturated at altitude above 120 km.
4371
4372== 02/12/2023 == LL
4373Bug fix in init_testphys and testphys. Index for water vapor and ice were not initialized
4374(but used in testphys1d when atm_wat_profile > 0). It is fixed by calling
4375initracer in init_testphys1d_mod.
4376
4377== 06/12/2023 == EM
4378Minor fixes to ensure outputs of water cycle related variables are only
4379computed and made if the water cycle is computed.
4380
4381== 06/12/2023 == JBC
4382Tiny fix from r3147 (Fortran fixed format).
4383
4384== 06/12/2023 == LL
4385Switching vdif_cd to a module and convert it to F90.
4386Some cleaning have also been made (remove commented lines, outputs, etc.)
4387VDIFC: minor fix: zcdv_true zcdh_true are out and not in variables.
4388
4389== 07/12/2023 == LL
4390Switching pbl_parameter.F into a module. Cleaning of unused variables/sections in it.
4391Correction in the computations of ustar, thetastar as it was done in a different way compare to vdif_cd. It is now self-consistent.
4392Maybe pbl_surface in the MCD needs also to be changed ? In discussion with Ehouarn and Aymeric.
4393
4394== 09/12/2023 == LL
4395Add the possibility to compute Cd; Ch based on the virtual potential temperature to account for water flotability.
4396To do so, a boolean "virtual", set to false by default, must be set to true (for now hard coded as future modifications will follow).
4397Small change following previous commit: when computing the virtual surface temperature, if frost is at the surface, qvap_surf = qsat. else; it is qvap in the first layer
4398
4399== 12/12/2023 == CS
4400rnew and cpnew are already initialized in physiq_mod.F with call concentrations.F if callthermos is true.
4401
4402== 12/12/2023 == CS
4403* zzlay and zzlev are calculated at the begining of physics taking into account the evolution of gravitational acceleration with altitude (g becomes gz) and varying reduced gas constant with composition of the atmosphere (r becomes rnew).
4404* zzlay and zzlev are updated at the end of physics after call co2condens with updated pressure and temperature.
4405* call concentrations, when photochem or callthermos is true, has been moved before the first calculation of zzlay and zzlev to be able to use varying reduced gas constant rnew.
4406
4407== 13/12/2023 == CS
4408Cleaning of conduction.F, euvheat.F90, moldiff.F and molvis.F, some commented lines referring to a local calculation of layers/levels altitudes have been removed.
4409
4410== 19/12/2023 == JBC
4411Fixed an issue where the gfortran compilation failed due to rank mismatch of the 'field' argument when calling 'writediagfi' + cleaning of the subroutine.
4412
4413== 19/12/2023 == CS
4414* A new call to vdifcd is done with updated winds (after inversion of wind u and wind v and before inversion of the potential temperature h) and zcdv / zcdh are also updated. It matches with what is done in the generic model.
4415* Old commented lines with a call to vdifcd at the begining of the tracers part of vdifc_mod have been removed.
4416
4417== 19/12/2023 == CS
4418Little bug fix with missing arguments for vdifcd that were added in r3153
4419
4420== 19/12/2023 == CS
4421Small fix following r3163
4422
4423== 27/12/2023 == LL
4424The computation of Cdh; Cdv is now done for each sub-grid surfaces and not only the flat one.
4425
4426== 30/12/2023 == EM
4427Fix typo in previous commit
4428
4429== 03/01/2024 == EM
4430Minor fix for XIOS output of a scalar in write_output_mod.F90.
4431Also added more helpful error messages in xios_output_mod.F90.
4432
4433== 11/01/2024 == JBC
4434Correction of a bug: 'perennial_co2ice' was not initialized if there was no "startfi.nc" file.
4435
4436== 16/01/2024 == EM
4437Update reference traceur.def.MCD5 to include all ions (as in *.MCD6) since
4438runs including the ionosphere needs these.
4439While at it also from some callphys.def.* files and rename
4440callphys.def.watercycle as callphys.def.GCM5 to (hopefully) avoid confusions.
4441
4442== 18/01/2024 == JBC
4443Improvement of the error message for tracers initialization with a 1D start file + update of "start1D.txt" in the deftank + small cleanings.
4444
4445== 25/01/2024 == JBC
4446Some changes to prepare the introduction of slopes in 1D: in particular, the subroutine "getslopes.F90" and "param_slope.F90" are now inside the module "slope_mod.F90" + Few small cleanings throughout the code.
4447
4448== 26/01/2024 == CS
4449- conc_mod.F : Added new subroutines init_r_cp_mu and update_r_cp_mu_ak to replace initialization of rnew, cpnew, mmean and akknew as constants and their update if callthermos or photochem (same update as in concentrations.F) that were done in physic_mod.F.
4450- rnew, cpnew, mmean and akknew are now protected meaning they cannot be modified anywhere in the model other than in conc_mod.F .
4451- concentrations.F has been removed.
4452- Knowing where rnew, cpnew, mmean come from is now more explicit. These modifications respond to the need expressed in ticket #90.
4453
4454== 26/01/2024 == CS
4455Following revision 3185 concentrations.F has been deleted from LMDZ.MARS/aeronomars/
4456
4457== 29/01/2024 == JBC
4458Addition of the parameter 'CO2cond_ps' (= 1 by default) for 1D. This coefficient controls the surface pressure change. If 'CO2cond_ps = 1', then surface pressure varies normally. If 'CO2cond_ps = 0', then surface pressure is kept constant. The ratio of polar cap surface over planetary surface is a typical value (8.3e-4) for tests. To be defined in "callphys.def" so that both PCM and PEM can read it.
4459
4460== 30/01/2024 == CS
4461Update of the reference to default values of coeff_detrainment, coeff_injection, ti_injection and tf_injection (following old revision r2639) in callphys.def.MCD6
4462
4463== 02/02/2024 == JBC
4464Small update following r3188 to keep the CO2 mixing ration constant if "CO2cond_ps = 0" + Some cleanings.
4465
4466== 05/02/2024 == JBC
4467Small modification of the change introduced in r3200 to make the code simpler and faster.
4468
4469== 07/02/2024 == JBC
4470- Addition of the possibility to use subslopes parametrization in 1D. To do so, put 'nslope=x' in "run.def" where x (1, 3, 5 or 7) is the number of slopes you want to, or modify it in an appropriate "startfi.nc". Then, default subslopes definition and distribution are used by the model. The already existing case of using one slope whose inclination and orientation are defined in "run.def" is still possible.
4471- Some cleanings throughout the code, in particular related to unused variables.
4472
4473== 08/02/2024 == JBC
4474Fix the situation where the 1D model read the "startfi.nc" or "start1D.txt" if they were present even though 'startfiles=.false', instead of initializing by default.
4475
4476== 08/02/2024 == JBC
4477Modification of r3200 for the 1D model: the 'CO2cond_ps' coefficient (now defined in "co2condens_mod.F") is applied not only to update the surface pressure but also all the tracers and the winds from now on. It is done in "physiq_mod.F" just after the call to 'co2condens'.
4478
4479== 08/02/2024 == JBC
4480Following r3203, initialization cases for subslopes parametrization in 1D have been settled: it can be done with 'nslope' in "run.def" or by using an appropriate "startfi.nc". Addition of error/warning messages for the different situations to be user-friendly.
4481
4482== 09/02/2024 == JBC
4483- Addition in the deftank of a bash script "launch_1Dchained.sh" to make chained simulations of 1D PCM runs.
4484- Move the script "launch_orb_1Dchained.sh" from the PEM deftank to the Mars PCM deftank.
4485
4486== 09/02/2024 == LL
4487- Update the computation of qsat for frost at high temperatures; following
4488what is done in the Generic PCM
4489
4490== 12/02/2024 == JBC
4491Correction of a bug in "writediagsoil.F90": the case of using the 1D model with parallelization was not anticipated so that the "diagsoil.nc" file was filled with meaningless data.
4492
4493== 13/02/2024 == EM
4494Fix start2archive; routine surfini is now in module surfini_mod.
4495
4496== 13/02/2024 == EM
4497Move "Martian nogcm" from common dynamics to Mars dynamics-physics interface.
4498
4499== 16/02/2024 == LL
4500Small correction for the surface layer scheme: the value of the critical Richardson varys if one used the classic yamada scheme (0.2 in this case) or can be a tunning parameter if one uses the atke scheme
4501Also add the possibily to write the tke in the diagfi.nc when calling pbl_parameter
4502
4503== 16/02/2024 == LL
4504Adsorption: commit the last version developed by Pierre Yves Meslin
4505
4506== 16/02/2024 == EM
4507Follow-up of r3217, remove some unused "use ..." in leapfrog_nogcm which
4508cause problems when compiling gcm in parallel mode
4509
4510== 19/02/2024 == EM
4511Remove interactive checking with XIOS whether a field should be sent to it;
4512some yet unresolved issues arise when using this in mixed MPI-OpenMP mode...
4513
4514== 20/02/2024 == LL
4515* Move soil_tifeedback into a module waterice_tifeedback_mod.F90
4516* The flag to call tifeedback has been changed from "tifeedback" to surfaceice_tifeedback for clarity
4517* Add the possibility to change the thermal inertia while pore ices is forming in the soil: to do so, use the flag poreice_tifeedback. The computation is done i
4518n waterice_tifeedback_mod.F90.
4519For now, surfaceice_tifeedback and poreice_tifeedback can not be called together
4520, we might think about how to merge later.
4521
4522== 20/02/2024 == LL
4523Fixing a bug in 1D: atm_wat_profile should evolve freely when considering
4524relaxation, and should not be set to qsat in cold conditions.
4525
4526== 23/02/2024 == EM
4527Minor fix in topmons_setup: handle case when mount is "resolved" for high
4528resolution runs.
4529
4530== 29/02/2024 == LL
4531Fixing bugs in soilwater (array size and indexes in loop)
4532
4533== 01/03/2024 == LL
4534Following -r 3223, re-introduce the possibility to run the subsurface water ice
4535evolution without  adsorption
4536
4537== 04/03/2024 == LL
4538*Fixing bug in initestphys: the soil depth were initialized using the old grid (but with 57 layers). It was not detected in soil_settings -to be investigated - and therefore soil thermal inertia, when adding subsurface ice, were completely wrong
4539* Fixing bug in initestphys and waterice_tifeedback: when changing the soil thermal properties to account for the high thermal inertia of subsurface ice, the wrong layer was considered as 'mixed' (it was the layer after the correct one which was modified).
4540
4541== 04/03/2024 == LL
4542Introduce the possibility to prescribe (in 1D) the soil water ice content when running with adsorption/desoprtion
4543
4544== 05/03/2024 == LL
4545Following -r 3098; cleaning of vdfic for the management of subsurface water ice.
4546Fixing some errors (wrong interpolation to compute the water ice temperature, wrong boundary conditions to compute qvap(1))
4547
4548== 12/03/2024 == LL
4549Reversing -r 3250 (the ""bug"" I fixed was not a bug but my mystake)
4550
4551== 12/03/2024 == Jliu
4552Synchronize all default non-orographic gravity wave parameters in callphys.def with the ones in scheme. The parameters are as follows:
4553#Eliassen-Palm FLux(only if calllott_nonoro=.true.)
4554nonoro_gwd_epflux_max=5.E-4
4555# saturation parameter non-orographic gravity waves(only if calllott_nonoro=.true.)
4556nonoro_gwd_sat=1.5
4557# maximum of the phase speed of the gravity waves(only if calllott_nonoro=.true.)
4558nonoro_gwd_cmax=50
4559# value of the dissaption coefficiet(only if calllott_nonoro=.true.)
4560nonoro_gwd_rdiss=0.07
4561# value of the max wave number
4562nonoro_gwd_kmax=1.E-4
4563# value of the min wave number
4564nonoro_gwd_kmin=7.E-6
4565# value to control the launch altitude
4566nonoro_gwd_xlaunch=0.6
4567# effective factor
4568nonoro_gwimixing_eff=0.1
4569# effective factor
4570nonoro_gwimixing_eff1=0.1
4571# mixing vertical decrease rate
4572nonoro_gwimixing_vdl=1.5
4573
4574== 19/03/2024 == LL
4575Adapt soil water to run with massive ice and not pore filling ice + constant diffusion coefficient
4576Small fixes in vdifc for the interaction between the subsurface and frost (the flux from the surface frost to the subsurface was oo large if one removes all the frost at the surface)
4577
4578== 20/03/2024 == LL
4579Small update of soil properties (porosity) when running soilwater to simulate the evolution of massive water ice
4580
4581== 21/03/2024 == EM
4582Fix a buggy behavior of wstats: it would fail when using a stats.def file and
4583when the first (at every time step) variable sent to wstats() was not part of
4584those listed in stats.def
4585
4586== 21/03/2024 == Jliu
4587Fix several bugs in photochemistry related to the submit-crash-resubmit
4588problem: Some of the integers in the related routines are not set in
4589privatethreads. Consequently, the additives such as n=n+1 are accumulated with
4590threads, causing systermatic problems in the routine. This update fixed the
4591submit-crash-resubmit problem. The simulated results are same with previous
4592simulations as tested.
4593
4594== 21/03/2024 == Jliu
4595Found and fixed another small bug in photochemistry related to commit r3289.
4596
4597== 05/04/2024 == EM
4598Code cleanup to prepare the addition of new schemes for dust lifting by
4599wind stress and dust devils. Renamed "dustlift" routine "dust_windstress_lift"
4600and made it a module; also made dustdevil a module.
4601
4602== 15/04/2024 == JBC
4603Modification of "subslope_mola.F90" to take into account other longitude resolution than 64. It makes "newstart" be able to change the number of sub-slopes for low resolution.
4604
4605== 15/04/2024 == JBC
4606Correction related to r3301: the variable 'resol' was not linked to longitude resolution.
4607
4608== 16/04/2024 == JBC
4609Revert "subslope_mola.F90" to the version before r3301. The modification was a mistake.
4610
4611== 16/04/2024 == CS
4612Correction of a misspelled stats output variable name.
4613
4614== 18/04/2024 == JBC
4615- Addition of the "startfi" file name as an argument for "phys_state_var_init_mod.F90"/"iniphysiq_mod.F90" to be able to initialize correctly the 3D PEM with its dedicated "startfi" file name.
4616- Small update of xml files for XIOS in the deftank, mainly to make the 3D PEM run with slopes.
4617- Few cleanings in "phyetat0_mod.F90".
4618
4619== 19/04/2024 == JBC
4620Correction of a missing argument due to changes introduced in r3305.
4621
4622== 25/04/2024 == LL
4623Fixing a bug in the initialization of sub-grid surface temperatures in the 1D
4624(subgrid slope index was missing)
4625
4626== 25/04/2024 == JBC
4627Reversion of r3305 and r3307.
4628
4629== 13/05/2024 == LL
4630Some modifications in vdifc and pbl_parameters to include the effect of water buoyoncy on the sublimation of water ice.
4631Note: it only works with paleoclimate = .true. (since the model is not tuned with that ...).
4632
4633== 17/05/2024 == LL
4634Fixing a bug in vdif_cd: a "residual", used as criterion to enter an iterative loop, was wrongly initialized. Hence, for some points, the algorithm does not go into the loop, and a wrong value of Cd, Ch was computed.
4635Also some cleaning/small fixing with save variables with OMP.
4636
4637== 21/05/2024 == JBC
4638Addition of the paleoclimate variables in the change of the number of slopes by "newstart.F" + some simplifications of the way it is done.
4639
4640== 21/05/2024 == JN
4641In vdifc_mod, adding a threshold on the subtimestep of water vapor
4642sublimation/condensation to avoid computation when surface ice is too low.
4643Also nsubtimestep is now stored in diagfi at the end of the subtimestep for
4644clarity of the code.
4645
4646== 21/05/2024 == JBC
4647Addition of the paleoclimate variable 'd_coef' in the writing of the "restartfi.nc" file.
4648
4649== 23/05/2024 == LL
4650Small correction of how qsurf of co2 is initialized in the south pole.
4651Some correction for the albedo of co2 ice when using paleoclimate: a uniform value (albedo_co2_cap) is used for both hemisphere for CO2 frost, and a different (higher) value is used for perennial ice.
4652
4653== 23/05/2024 == JBC
4654Modification of "iniwritesoil.F90": 'nsoilmx' and 'mlayer' are now arguments + making it as a module.
4655
4656== 23/05/2024 == JBC
4657Correction of a variable name in the xml definition file causing an XIOS error because of a change in r3337.
4658
4659== 29/05/2024 == JN
4660Following commit r3337, threshold for vdifc subtimestep is no longer hardcoded
4661and explicitly commented.
4662
4663== 31/05/2024 == JBC
4664- Correction for the script "launch_orb_1Dchained.sh" in the deftank.
4665- Small cleanings related to error detection.
4666
4667== 12/06/2024 == EM
4668Change the way the rate of outputs for diagfi.nc files is specified:
4669IMPORTANT: Specifying "ecritphy" no longer possible and will trigger an error.
4670Use "outputs_per_sol" to specify output rate instead.
4671This should makes things (hopefully) clearer for users and also better
4672enforces a cleaner and clearer separation between dynamics and physics.
4673
4674== 19/06/2024 == JBC
4675Update of the "run.def.1d" file in the deftank.
4676
4677== 19/06/2024 == JL
4678Update of non-orographic gravity waves mixing scheme. 1)mixing in potential
4679temperature are added. 2)all mixing in q,u,theta now are implemented by AR-1
4680algorithm. Tests (MY29,MY32-35) runs show that this implementation has limited
4681impact to the temperature/tides fields.
4682
4683== 19/06/2024 == JL
4684Un petit bug fixed in mixing traceurs when doing AR-1: the last step q tendency
4685was forgot to give to montainant step. Thus all mixing-induce tendency becomes
4686zero due to initiallization values are zero.
4687
4688== 06/08/2024 == LL
4689Correction of the computation of the water vapor flux from the subsurface ice
4690when thin frost is at the surface
4691cleaning testphys1d
4692
4693== 12/08/2024 == LL
4694Following previous commit, fixing a bug: more frost than what is a the surface could sublimes (when working with lag layer only). It is corrected, not in a elegant way...
4695
4696== 26/08/2024 == LL
4697Fixing bug: the emissivity of perenial CO2 ice was not correctly handled
4698
4699== 20/09/2024 == EM
4700Update reference callphys.def.hdo.GCM5 in deftank
4701
4702== 27/09/2024 == JYC+EM
4703Add new molecular diffusion routine moldiff_MPF (modified pass flow scheme)
4704But for intermetiate testing the legacy moldiff_red routine remains
4705the default. The "moldiff_scheme" flag (1: legacy, 2: MPF) can be used
4706to swich from one scheme to the other.
4707
4708== 11/10/2024 == JBC
4709- Addition in the "util" folder of two python scripts: one is to visualize easily any variable of a NetCDF file; the other is to display useful information about the variables of a NetCDF file to help for debugging.
4710- Move of the launching scripts for the 1D model from the "deftank" to the "util" folder.
4711
4712== 18/10/2024 == EM
4713Some tidying in aeronomars:
4714- make a jthermcalc_util.F to contain utility routines (used by jthermcal &
4715  jthermcalc_e107). Also add the possibility (turned off by default) in the
4716  interfast routine to do extra sanity checks.
4717- turn chemthermos, euvheat, hrtherm, jthermcalc, jthermcalc_e107,
4718  paramphoto_compact and photochemistry into modules
4719
4720== 21/10/2024 == JBC
4721- Small update in "analyse_netcdf.py".
4722- Putting the 1D launching scripts back to the "deftank" folder.
4723
4724== 21/10/2024 == EM
4725More tidying in aeronomars:
4726- remove unused "inv.F" and remove "dtridgl.F" which is not used here and
4727  is a duplicate of the "dtridgl" routine in phymars/swr_toon.F
4728- turn aeronomars routines to modules, for those which aren't in modules yet.
4729
4730== 24/10/2024 == EM
4731Remove obsolete/depreciated lwrite flag (which would trigger some very specific
4732extra text outputs), in code and in reference callphys.def files.
4733
4734== 04/11/2024 == EM
4735Get rid of "start2archive_SSO.F" and adapt start2archive.F to allow adding
4736sub-grid-scale fields in start_archive.nc. This optional behavior is
4737triggered at run time by specifying "start2archive.e --add-sso".
Note: See TracBrowser for help on using the repository browser.