== 17/09/08 == >>> Build a version with new soil but old radiative transfer, but keeping possibility of switching back to new radiative transfer), which incorporates changes & improvements currently included in the 'reference version' GCM (see /u/emlmd/LMDZ.MARS.mixdyn) >>> start by modifying makegcm as in /u/emlmd/LMDZ.MARS.mixdyn, so that it runs without environment variables and set LIBOGCM to /tmp15/emlmd/libo >>> directory contents of 'aeronomars', 'grid' and 'filtrez' are simillar to those in /u/emlmd/LMDZ.MARS.mixdyn >>> in bibio , only file mxva.F needed be upgraded >>> get phymars and dyn3d contents from /u/emlmd/LMDZ.MARS.mixdyn (and remove all *old files) >>> check differences between dyn3d and /u/emlmd/LMDZ.MARS.170908/libf/dyn3d and upgrade when necessary: - removed 'netcdf.inc' file (has nothing to do there!) - comgeom.h and comgeom.h : made fortran90 compliant - control.h : made fortran90 compliant - dynredem.F : more read/write controls + comments in english - ini_archive.F : new soil/thermal inertia changes - integrd.F : added additional information to output when crashing - lect_start_archive.F : new soil/thermal inertia changes - newstart.F : new soil/thermal inertia changes + comments in english - start2archive.F : new soil/thermal inertia changes - vanleer.F : removed inapropriate 'external' statement - write_archive.F : enable writting a subterranean field >>> check differences between phymars and /u/emlmd/LMDZ.MARS.170908/libf/phymars and upgrade when necessary: New soil stuff: - added comsoil.h - iniwrite.F : new soil changes - added iniwritesoil.F90 and writediagsoil.F90 for subterranean fields - added interp_line.F (for subterranean grid interpolation) - adapted phyetat0.F for subterranean temperature & inertia - adapted physdem1.F to include new soil stuff - physiq.F : added calls to writediagsoil - soil.F : new routine (fixed vertical grid + variable thermal inertia) - added soil_settings.F (to read/initialize/interpolate soil properties) - updated surfdat.h (since thermal inertia is now in comsoil.h) - updated tabfi.F : include new soil properties - updated testphys1d.F - updated dimphys.h (set nsoil=18 as default) == 18/09/08 == >>> add the possibility of easily switching to Tran radiative transfert - updated aerdust.h.ocke97 (changed some variables name) so it can replace aerdust.h (which is currently the same as aerdust.h.clan91). - imported Tran's 'gfluxv.F' routine - imported Trans' version of 'swr.F' routine, saved it as 'swr.F.toon' >>> Backup of 'old' Morcrette swr.F is 'swr.F.morc' NB: to switch from one radiative transfer to the other, just copy swr.F.morc or swr.F.toon to swr.F (and eventually 'touch swr.F' so that makegcm recompiles swr.F) No other dependencies (swr.F.toon uses 'gfluxv.F' and swr.F.morc uses 'dedd.F'). >>> Changed the latter, so that users can switch from one to the other - modified swr.F.toon to become swr_toon.F (and to include gfluxv.F) - modified swr.F.morc to become swr_fouquart.F (and to include dedd.F) - added a flag in callkeys.h, swrtype (parameter to be set/changed by the user 1=Fouquart and 2=Toon) - update readtesassim so that the coefficient by which opacity is multiplied is set according to the 'swrtype' parameter == 25/09/08 == >>> Implement the use of tracer-by-name in physics - in phymars/tracer.h set 'noms' length to 20 (instead of 10) - in phymars/callsedim2q.F and phymars/callsedim.F, use tracers by name - in phymars/dustopacity.F, use tracers by name - in phymars/vdifc.F, use tracers by name == 26/09/08 == >>> Change implementation strategy (for now); don't move surface tracer around i.e.: surface ice remains equivalent to qsurf(nqmx)=qsurf(i_h2o_vap) and likewise for surface tendencies ... - modified vdifc.F and callsedim.F back - modified initracer.F (so that water names are h2o_vap & h2o_ice) == 29/09/08 == - modified aeronomars/init_chimie_B (cosmetics) - corrected aeronomars/moldiff.F internal routine tridag; changed "pause" error messages to 'stop' messages - modified phymars/watercloud.F to use tracers by name - corrected aeronomars/molvis.F (undefined 'fac' and 'Akk' written to output at first call) == 30/09/08 == - modified aeronomars/calchim.F to use tracers by name - adapted aeronomars/photochemist_B.F to use tracers by name - adapted aeronomars/chemtermos.F to use tracers by name - adapted aeronomars/concentrations.F to use tracers by name - corrected aeronomars/conduction.F (undefined 'Akk' written to output at first call) - adapted aeronomars/euvheat.F to use tracers by name - adapted aeronomars/moldiff.F and moldiffcoeff.F to use tracers by name == 01/10/08 == - For more compatibility with LMDZ4; mimic reading a 'traceur.def' file in the dynamics via a call to a routine 'iniadvtrac.F' and saving tracers names in 'advtrac.h' -> created 'iniadvtrac.F', 'advtrac.h' and modified gcm.F - modified 'dynetat0.F' so that tracers are loaded from 'start.nc' by name - modified 'dynredem.F' so that tracers are written to 'restart.nc' by name - modified 'initracer.F' tu use tracers by name == 02/10/08 == - removed use of 'nqchem_min' everywhere: adapted 'euvheat.F','inifis.F','physiq.F' (leave 'inichim.F' for later) - updated 'phyetat0' and 'physdem1.F' to read/write surface tracers by name - modify things so that surface water ice index is the same as atmospheric water ice (except when running without water ice; then simply set i_h2o_ice=i_h2o_vap). NB: the easiest is to have global storage of tracer names/indexes in tracer.h => changed initracer.F & tracer.h to have global igcm_something indexes == 03/10/08 == - adaptations for surface ice index, modified files: phyetat0.F : if there is a dynamical tracer 'h2o_vap' then load surface tracer called 'h2o_ice' instead initracer.F : in 'old' tracer name case: move qsurf(nqmx)->qsurf(nqmx-1) and set i_h2o_ice=i_h2o_vap if iceparty=.false. physdem1.F : if old tracer names: move qsurf(nqmx-1)->qsurf(nqmx) if iceparty=.false., write surface tracer 'h2o_ice' (and not 'h2o_vap') to file. adapted vdifc.F, callsedim.F & watercloud.F & physiq.F so that surface ice is now identified as qsurf(i_h2o_ice) - updated aeronomars/perosat.F (cosmetics) == 06/10/08 == - modify newstart.F and lect_start_archive.F to use tracers by name == 07/10/08 == - adapted inichim_newstart.F (added qsurf to arguments) and inichim_readcallphys.F == 08/10/08 == - implement reading traceur.def in dyn3d/iniadvtrac.F == 16/10/08== -small change in inifis.F (only warn if too many tracers, compared to the expected number, not stop). - corrected bug in initracer.F == 21/10/08 == - modified newstart.F to load B.Diez subsurface ice maps. - corrected small bug (uninitialized variable) in interp_horiz.F == 22/10/08 == - updated iniwritediagsoil.F so that thermal inertia is written to diagsoil.nc == 31/10/08 == - changed xvik.F program so it works even if we don't have atmospheric temperature at hand (then it uses a 10km reference scale height) and so that it does surface pressure interpolation log-wise. == 03/11/08 == - modified physiq to compute (and output) co2 column. - added improvement by Francois in newcondens.F about computing CO2 partial pressure. This behavior is turned on by setting internal logical flag 'improved_ztcond' to '.true.' (and running with a co2 tracer) - updated 'start2archive' to work with 'new' gcm output (soil, tracers ...) == 04/11/08 == - upgraded xvik program to look for temperature in 7th layer variable if there is no global atmospheric temperature field at hand. == 05/11/08 == - more modifs to newcondens.F: added another internal flag 'bound_qco2' to enforce (if set to .true.) that co2 mass mixing ratio remains bounded. == 07/11/08 == - corrected 'writediagfi' & 'writediagsoil' so that an error message is issued if called with a variable name which is too long. == 18/12/08 == - corrected bug in dyn3d 'addfi.F', (dimensions of local array p()) == 23/02/09 == - modified "aeronomars/param_read.F" to do strictly fortran data initialization (otherwise xlf compiler complains) - changed a few '1.e-30' to '1.d-30' in aeronomars/photochemist_B.F so that max functions has 2 doubles as arguments (otherwise xlf compiler complains) ==07/04/09 == -cosmetic changes/minor improvements in the handling of tracers in: aeronomars/photochemist_B.F aeronomars/perosat.F aeronomoars/euvheat.F aeronomars/moldiffcoeff.F aeronomars/moldiff.F aeronomars/cocentrations.F aeronomars/chemtermos.F aeronomars/calchim.F --> NB: still there are differences in outputs when order of tracers is changed == 09/04/09 == >>> fixed problem in 'vdifc.F' which lead to different results when moving tracers around. == 10/04/09 == >>> corrected small bug in diagnostic outputs of 'watercloud.F' (tendencies were not added to tracer values). == 21/04/09 == >>> corrected small bug in "physdem1.F" about writing water ice surface tracer to file == 07/05/09 == >>> very minor correction (firstcall not set to true after first call if no tracers) in convadj.F == 30/06/09 == >>> Implement reading *def files with IOIPSL ersatz 'getin' function - import "ioipsl_errioipsl.F90","ioipsl_getincom.F90","ioipsl_stringop.F90" in bibio - adapted 'dyn3d/defrun_new.F' to use "getin" function - adapted 'phymars/inifis.F' to use "getin" function == 01/07/09 == >>> Adapted 'create_make_gcm' so that the "use" in *.F files is identified and corresponding dependencies included in the makefile rules. >>> Added the 3D scattering from aerosols by JB Madeleine: - minor changes in aerave.F - added the calls to aeropacity.F, and aeroptproperties.F in callradite.F - changed the calls to lwu.F and swr.F in lwmain.F and swmain.F, respectively - added 3D scattering properties in lwu.F and swr.F - added the new aeroptproperties.F, aeropacity.F and suaer.F90 routines (removed dustopacity.F) - updated aeropacity.F with new tracer names - changed the call to callradite.F in physiq.F, added the initialization of reffrad and nueffrad (aerosol effective radius and variance) - removed all the lines relative to the old "activice" option, including temperature variation due to latent heat release (now in comments) - renamed nsize into naersize in watercloud.F, watersat.F and newsedim.F, to avoid conflicts with another "nsize" variable in the radiative transfer - added the statement of nuice in watercloud.F, which is the effective variance of the log-normal distribution for ice - updated yomaer.h and removed aerice.h (and corresponding "includes") == 02/07/09 == >>> Adapted 'aeronomars/inichim_readcallphys.F' (called by newstart) to use "getin" routine. + minor correction in 'inifis.F' (close 'iradia.def' file) >>> Minor correction in 'dyn3d/dynetat0.F' and 'phymars/phyetat0.F'; do not attempt to reindex tracers if none were found. >>> in 'deftank' added examples of 'traceur.def' files (traceur.def.co2 : 1 co2 tracer; traceur.def.watercycle : 2 traceurs, water vapour and water ice tracer.def.chemistry : all 15 species) == 06/07/09 == >>> Modified 'makegcm' and makegcm_g95' so that modules files are put with libraries (and not in current directory) == == WORK FOR GENERIC MODEL STARTS HERE == == 01/08/09 == >>> Old Martian radiative transfer removed completely, new correlated-k scheme implemented in its place. Central function is callcorrk.F. Radiative properties are no longer stored in dimradmars.h, but in the two files radinc_h.F90 and radcommon_h.F90. 3D aerosol scheme incorporated into callcorrk.F. dustopacity.F renamed aeropacity.F and substantially simplified. For now the option to include dust as an aerosol has been removed. >>> newcondense.F replaced by condense_co2cloud.F90. This is basically Francois' routine from the old model, adapted to work with the new generalised tracer scheme. >>> Options added in physiq.F and tabfi.F to allow for planets with varying orbital parameters, radii, gravity etc. For the moment we select the planet using the variable 'planettype' in callphys.def. This could probably be improved in the future. >>> Many new options added to callphys.def. == 25/11/2009 == >>>> List of changes and modifications - modified watercloud.F: added sanity check (i.e. do we have a water tracer?) - modified dyn3d/dynetat0.F --> removed possibility of reindexing tracers - modified phyetat0.F --> removed possibility of reindexing tracers -- removed using a "co2ice" array to store surface CO2 ice -> adapted surfini.F & physiq.F to use qsurf(:,igcm_co2_ice) instead of co2ice(:) -> modified initracer.F & tracer.h to properly initialize (and store) a "co2_ice" tracer. -> removed 'co2ice' from vdifc.F (it was not used there anyway) and from phsdem1.F -> removed possibility of calling 'newcondens' from physiq.F -> cleaned up newstart.F, lect_start_archive.F, start2archive.F to not use "co2ice" field but qsurf(igcm_co2_ice) -- adapted 'create_make_gcm' and 'makegcm' scripts so that we don't need to have and (unused) 'aeronomars' directory around. -- shifted to reading traceur.def (dyn3d/iniadvtrac.F) in an Earth-LMDZ4-like fashion: first line == number of tracers and then tracer name (1 per line; later we'll also add advection scheme type) -- NOTE BY RW: Here would be a good place to also note which tracer (if any) is the 'variable gas' in the radiative transfer -- Made some changes in tabfi.F to let user change planet parameters such as rotation rate, molar mass of atmosphere, ... (NB: note however that we seem to lose dynamics/physics coherence ... we should probably read these values from a planet.def file) -- Changed condens_co2cloud.F : added a check for presence of CO2 gas and output of corresponding tendency. == 15/12/2009 == >>> Correlated-k radiative transfer now reads spectral bands and p-T matrix values from ascii files; the code checks that the number of bands and matrix elements in the files match those written in radinc.F90 on the first call. >>> Water vapour tracer coupled to variable gas species in radiative transfer; option also given to run with fixed relative humidity profiles. 'Variable gas species' option added to callphys.def. >>> Surface albedo updated to be one band everywhere. >>> suaer_corrk.F90 modified to use different ep, omeg, g variables in the visible and infrared. This is necessary because the number of bands is, in general, different. >>> suaer_corrk.F90 has an option to accept Francois' new CO2 ice values (and convert wvl to metres!!). >>> optci.F --> optci.F90 so that water vapour continuum subroutine can be included. == 08/01/10 == >>> Option to change pref for hybrid coordinates added to newstart.F. == 15/01/2010 == >>> Upgraded newstart.F: added possibility to reset refrence surface pressure "preff" (and pa) >>> tabfi.F: added possibility of changing value of "year_day" >>> cosmetic change in callphys.def : separate "universal" parameters and planet-specific parameters (in a separate file, e.g. earlymars.def) == 22/01/2010 == ==> call this version LMDZ.GENERIC >>> Some cleanup & upgrades: -- split parameters in callphys.def into generic stuff (stays in callphys.def) and another more specific file (e.g. earlymars.def). -- added 'output_olr' key (in callkeys.h; read in physiq.F) to trigger output of fluxes in ascii file 'olr.txt' -- removed (non-generic) 'kastprof' and 'nearcond' keys/options in physiq.F (also removed file kastprof_fn.F) -- had to set 'fixh2ovap =.false. in callcorrk.F to avoid "out of range subscript" pb in callcorrk.F ==> this should be improved / better controlled in the future -- updated newsedim.F to use "molrad, visc, avogado values from comcstfi.h (and not local versions of these constants) -- fixed buggy -O option in makegcm (and makegcm_g95); == 22/02/2010 == ==> call this version LMDZ.GENERIC.v0.31 -- rain.F, manabe.F and largescale.F subroutines added to water cycle -- several new toggles added to earlymars.def == 28/03/2010 == ==> call this version LMDZ.GENERIC.v0.4 -- many changes for this version! -- radiative transfer -- A new system was implemented that automatically reads the p, T, g, Q and band values from files. The dataset required is now specified in callphys.def. We still need to edit radinc_h when the corrk array sizes change - think about improving this in the future. -- water cycle -- A watercommon_h mod file was created, several files were renamed and moist convection and precipitation subroutines were added. Still needs some testing! -- OLR -- Two new functions were added: one to produce .nc files of the OLR by band, and the other to save the upgoing radiation by band in 1D as a .txt file. -- general structure -- tabfi.F, newstart.F etc. cleaned up + it was checked that they pass variables correctly. Several new options added to run.def for 1D, in order to allow truly arbitrary planet simulations. The 'planettype' option has been removed as it screwed things up completely. -- energy conservation -- I found that the planckir function in the radiative transfer did not always produce values that summed to sigma T^4. A new test was implemented to check for this problem and the standard band widths in the IR were increased. == 31/03/2010 == ==> call this version LMDZ.GENERIC.v0.5 -- OLR -- The .nc functions were implemented and tested. It was necessary to add new functions 'writediagspec.F' and 'iniwrite_spec.F'. -- CO2 condensation -- In 1D we now exit automatically if CO2 is condensing on the surface. -- G1D -- We can now choose at the beginning of physiq.F, using saveG1D, how many times we want to save per day in 1D (rather than every single time that physiq is called). -- water cycle -- I corrected a nasty bug in callcorrk involving varfixed, real*8 and epsi. I corrected a simple bug in the writing of qsurf in g1d.dat. rain.F has been tested and the algorithm for precipitation evaporation modified to that written in the manual of Larent Li. Cloud fraction variable is now included. activice and iceparty are gone, ~replaced by watercond and waterrain. -- orbit -- nres and tlocked were added as basic options to callphys.def -- radiative transfer -- I added error checking for out-of-bounds temperature in callcorrk.F. I added a new file calc_rayleigh.F90 to calculate Rayleigh scattering using a weighted mean, as opposed to simply the midpoint band values. Band discretisation is now even more automated than before: the coefficients are stored in directories like /earth/32x36/, and we can compile the GCM like this: makegcm -d 32x24x20 -b 32x36 -p std gcm. A bug was fixed involving emissivity not being properly passed from newstart.e to the main part of the code. Stellar spectra are now calculated automatically for any range of bands from high resolution data (originally from the VPL website). -- vertical discretisation -- I corrected a bug in testphys1d that used a fixed value of temperature to compute the altitude levels in the model. Now we use the scale height from z2sig.def instead. Values of preff and pa are no longer defined in testphys1d (they're not needed). -- Non-ideal gases -- I have replaced cpp in many places with cpp_3D in physiq. This is a major change, but there are enough cases where it will be useful to make it worthwhile in the universal code. I have done the same with rcp. == 10/10/2010 == ==> call this version LMDZ.GENERIC.v0.6 -- startup -- We now check water tracers exist in newstart.F before all watery initialisation options. Added an option 'autozlevs' to run.def (and logic.h). When true this recalculates the scale height in z2sig.def in order to get the same minimum pressure for any resolution. Currently, this is only useful for one-d simulations. Pressure is now distributed better in newstart.F. There was a bug before when the global mean of phi was not equal to zero and the surface pressure was changed with topography still present. In initracer, we no longer automatically set h2o_vap=h2o_ice. -- general -- periheli, apheli --> periastr, apoastr. Note this necessitates a change in start_planet too. testphys1d.F --> rcm1d.F physiq.F, callcorrk.F upgraded to Fortran 90 to remove evil zerophys. I cleaned up the method of displaying energy balance and temperature range in the model a bit. Pure H2 atmospheres are now permitted, although the code is _untested_. Rayleigh scattering, specific heat capacities and molar masses are varied, and the H2-H2 collision-induced data of Grushka et al. is used for the radiative transfer. -- boundary layer -- An improved version of vdifc.F has been created that includes the latent heat effect of water vapor, following the method used in 'clmain' in the LMDZ terrestrial model. -- water cycle -- Benjamin's improvements have been added, namely the hydrology, and reevaporation. Variable cloud fractions are allowed, or a global fixed value may be chosen for use in aeropacity. Surface wetness (beta) is now calculated in a simple way, and outputed as a diagnostic, along with the atmospheric relative humidity. mol/mol to kg/kg bug in callcorrk corrected. -- radiative transfer -- A major bug in gfluxv.F was corrected. It involved BSURF, the radiation reflected upwards from the ground. In aeropacity, we now set the cloud opacity in the top layer of the atmosphere to zero. This solves an instability problem that was occurring when CO2 clouds formed. Dust is back! Only fixed profiles allowed for now. It is assigned "naerkind=3" in aeropacity.F90. If 'CLFvarying' is enabled, the corrk subroutine is now called twice per timestep - once for clear skies and once for cloudy. This slows things down but is effective for Earth-like simulations. An optional Newtonian cooling scheme has been implemented that can replace the correlated-k method for dynamical tests etc. It is pretty experimental and has not been extensively tested. -- Dynamics -- callgroupeun in gcm.F has been set to FALSE, as it does not conserve tracers. The coefficient facup has been set to 1 in inidissip.F. We may need to mess with this later if it makes the model too unstable. == 1/08/2011 == ==> call this version LMDZ.GENERIC.v0.7 Main change: a new file 'gases.def' now required at startup. This tells us which gases are in the planet's atmosphere. It is used to calculate fundamental quantities like cpp and mugaz. A check is made against the radiative transfer data to make sure they correspond. Code has been tested successfully using the 'gfortran compiler'. -- startup -- a bug involving tsoil interpolation in lect_start_archive.F was corrected. -- aerosols -- gauss integration number 5-->10 in aeroptproperties.F90 -- water cycle -- Big fat bug in rain.F90 corrected. The routine internally updated the temperature with new tendencies before it was supposed to happen! Bug in oborealis where phi not properly updated was corrected. Improvements to hydrol.F90: zdtsurf_hyd --> pdtsurf_hyd A 'sourceevol' option was added (accessed in callphys.def) that allows us to track the evolution of the surface distribution over time. Another bug in rain corrected involving evaporation - it was heating the atmosphere rather than cooling it... -- convection -- I found a bug in convadj.F that breaks tracer conservation when convection stops at one layer and immediately restarts in the next one. -- diagnostics -- Some bugs corrected in the computation of 3D averages for the H2O / energy conservation diagnostics. -- radiative transfer -- A bug involving continuum opacities (variable DCONT) was corrected in optci.F90 and optcv.F0. H2-H2 warming now in theory reliable and correct (60-1000 K). A bug involving the definition of the Planck function boundaries was corrected in sfluxi.F90 and gfluxi.F. == 21/10/2011 == EM - added FF's upgrade of writediagfi. Now, if at runtime there is a diagfi.def file, it should contain the list of variables (1 per line) than will be put in the diagfi.nc file. If there is no diagfi.def file, then all variables are put in the diagfi.nc file (as was the case before). === 10/11/2011 == EM - Updated the makegcm(s) so that default behaviour is to set LMDGCM env variable to be the directory in which the makegcm script is. Updated the makegcm_* to use "SOURCE" to identify code and be compatible with latest 'create_make_gcm'. == 10/11/2011 == EM - Upgrade: The location of the 'datagcm' directory can now be given in the callphys.def file ( datadir = /absolute/path/to/datagcm ). Changed "datafile.h" into a F90 module "datafile_mod.F90" and spread this change to all routines that used to use "datafile.h". == 10/11/2011 == EM - Upgrade of the 'create_make_gcm' script: objects are removed from the libraries before compilation, which enforces that the gcm will fail to compile if any routine failed to compile.