source: trunk/LMDZ.COMMON/libf/evolution/deftank/README @ 4076

Last change on this file since 4076 was 4074, checked in by jbclement, 3 weeks ago

PEM:

  • Correct management of H2O ice tendency in 1D when there is not enough ice anymore.
  • Clean initialization of allocatable module arrays (especially needed when no slope)
  • One more renaming for consistency + few small updates thoughout the code.

JBC

File size: 8.0 KB
RevLine 
[4072]1   *    .          .   +     .    *        .  +      .    .       .
2            +         _______  ________  ____    ____      *           +
[3858]3  +   .        *     |_   __ \|_   __  ||_   \  /   _|          .       *
[4072]4           .     .     | |__) | | |_ \_|  |   \/   |  *        *      .
5        .              |  ___/  |  _| _   | |\  /| |      .        .
6 .  *          *      _| |_    _| |__/ | _| |_\/_| |_                  *
7             +       |_____|  |________||_____||_____|   +     .
[3858]8   .      *          .   *       .   +       *          .        +      .
9
[4072]10
[3861]11This folder contains all the files needed to run and work with the Planetary Evolution Model (PEM).
[2963]12
[3861]13Information:
14------------
15For further explanations about the PEM, see following website: https://lmdz-forge.lmd.jussieu.fr/mediawiki/Planets/index.php/PEM_(Planetary_Evolution_Model).
16
17Installation:
18-------------
[3977]19The PEM can be downloaded alongside the "LMDZ.COMMON" repository of your trunk. The Fortran code is in the following directory: "trunk/LMDZ.COMMON/libf/evolution/". The PEM main program is "pem.F90".
[3861]20
21Compilation:
22------------
23To compile the PEM, in "LMDZ.COMMON", do: ./makelmdz_fcm -arch [local] -p [planet] -d [dimensions] -j 8 pem
[3938]24Options with example:
[3861]25    1) [local]     : root name of arch files, assuming that they have been set up for your configuration;
[4072]26    2) [planet]    : mars to use the Mars planet physics package;
[3938]27    3) [dimensions]: 64x48x54 to define the grid you want to use  (longitude x latitude x atmospheric layers).
[3977]28To run the PEM, you need a PCM working with XIOS and consistent options. To compile it, in "LMDZ.COMMON", do: ./makelmdz_fcm -arch [local] -p [planet] -parallel mpi_omp -io xios -d [dimensions] -j 8 gcm
[3861]29After compilation, the executable file can be found in the "bin" sub-directory.
30
31Usage:
32------
[4072]33To run a PEM simulation, do: ./pem_workflow.sh [options]
[3938]34Options:
35    1) None: to start a simulation from scratch;
[4072]36    2) 're': to resume a simulation from a starting point (interactive prompt).
[3861]37
[4072]38The Bash file ''pem_workflow.sh'' is the master script to launch the PEM chained simulation. It checks if necessary files and required options for your simulation are ok.
[3938]39
[3861]40Requirements:
41-------------
[3938]42To run the PEM, you can create a folder in which you need the following files:
[3977]43    > your executable files for the PCM and the PEM with consistent options;
[3938]44    > the xml files for XIOS which can be found in the PCM deftank folder: "iodef.xml", "context_lmdz_physics.xml", "file_def_physics_mars.xml" and "field_def_physics_mars.xml";
45    > the def files you want to run the PCM: "run.def", "callphys.def", "traceur.def", etc.
[4074]46      /!\ Do not forget to rename the PCM "run.def" into "run_pcm.def";
[3938]47    > the starting files you want to run the PCM: "startfi.nc", "start.nc"/"start1D.txt"/profiles;
[4074]48    > the necessary PEM files: "pem_workflow.sh", "pem_workflow_lib.sh", "pcm_run.job", "pem_run.job", "run_pem.def" and "obl_ecc_lsp.asc";
[4065]49    > the optional PEM files: "diagevol.def" to define the PEM variables to be ouputted and "startpem.nc" to set the initial state of the PEM.
[3861]50
[3938]51The PEM files can be found in the deftank folder.
52
53Before a simulation, you have to set up some parameters/options in:
[4072]54    > "pem_workflow.sh";
55    > "pcm_run.job";
56    > "pem_run.job";
[4074]57    > def files, especially for "run_pem.def", "run_pcm.def", "callphys.def".
58In addition, the user has to provide a "startfi.nc" whose orbital parameters are consistent with the initial date set in "run_pem.def". The script "ini_pem_orbit.sh" can do it automatically with "obl_ecc_lsp.asc".
[3938]59
[3861]60Outputs:
61--------
62The PEM simulation generates the following files:
[3938]63    > the usual outputs of the PCM: "restartfi.nc", "restart.nc", "diagfi.nc", etc;
[3977]64    > the XIOS outputs of the PCM: "Xoutdaily4pem*.nc"/"Xoutyearly4pem*.nc";
[4072]65    > the outputs of the chained simulation: "pem_workflow.log", "pem_workflow.sts" and possibly "kill_pem_workflow.sh";
[4065]66    > the usual outputs of the PEM: "restartfi.nc", "restart.nc"/"restart1D.txt" and "diagevol.nc".
[3861]67During the simulation, the PCM/PEM run files are renamed conveniently and stored in the sub-directories "logs" (log files), "starts" (starting files) and "diags" (diagnostic files).
[4072]68If you run a simulation by submitting jobs, the script "kill_pem_workflow.sh" is automatically generated. It can be used to kill the jobs related to your chained simulation in the queue of the job scheduler.
[3861]69
70Deftank files:
71--------------
[4072]72# pem_workflow.sh:
[3096]73  Bash script file to launch the chained simulation of PEM and PCM runs.
[3038]74  The user has to specify:
[3861]75      > n_mars_years, n_earth_years -> the number of Mars/Earth years to be simulated in total (> 0);
[4072]76      > n_pcm_runs_ini -> the number of initial PCM years (>= 2);
77      > n_pcm_runs -> the number of PCM years between each PEM run (>= 2, usually 2);
78      > exec_mode -> the execution mode (0 = "processing scripts"; any other values = "submitting jobs"). The former option is usually used to process the script on a local machine while the latter is used to submit jobs on a supercomputer with SLURM or PBS/TORQUE.
[3349]79  The script can take an argument:
[3938]80      1) None: to start a simulation from scratch;
[4072]81      2) 're': to resume a simulation from a starting point (interactive prompt).
[2963]82
[4072]83# pem_workflow_lib.sh:
84  Library of bash functions used by the PEM workflow script "pem_workflow.sh".
[3349]85
[4072]86# pcm_run.job:
[3938]87  Bash script file to submit a PCM job (with SLURM or PBS/TORQUE).
88  The user has to specify:
[4072]89      > The headers correspond to the ADASTRA supercomputer and should be changed for other machines and job schedulers. In case of "processing scripts" execution mode, the headers are naturally omitted.
[3938]90      > The path to source the arch file should be adapted to the machine.
91      > The name of the PCM executable file should be adapted.
92      > The execution command should also be adapted according to the set-up.
[2963]93
[4072]94# pem_run.job:
[3938]95  Bash script file to submit PEM job (with SLURM or PBS/TORQUE).
96  The user has to specify:
[4072]97      > The headers correspond to the ADASTRA supercomputer and should be changed for other machines and job schedulers. In case of "processing scripts" execution mode, the headers are naturally omitted.
[3938]98      > The path to source the arch file should be adapted to the machine.
[3977]99      > The name of the PEM executable file should be adapted.
[3938]100      > The PEM executable can have an optional argument which should be specified according to the set-up ("--auto-exit" for SLURM and PBS/TORQUE | "" when the script is not run as a job).
[3349]101
[4074]102# run_pem.def
[4072]103  All the possible parameters to define a PEM run (read in "config.F90").
[4074]104  It needs to include in "run_pcm.def" with "INCLUDEDEF=run_pem.def".
[2963]105
[3858]106# obl_ecc_lsp.asc [default], obl_ecc_lsp_pos.asc [future years]
107  Files describing orbital parameters for Mars from Laskar's data. It contains the Earth year (kyr) and the corresponding obliquity (°), eccentricity and Ls of perihelion (°).
[3038]108
109# modify_startfi_orbit.sh:
[4072]110  Bash script file to modify orbital parameters in the file "startfi.nc". They should be consistent with Laskar's data in "obl_ecc_lsp.asc" at the same date if orbital parameters are meant to vary during the simulation. See also "ini_pem_orbit.sh".
[3038]111
[3349]112# modify_startfi_var.sh:
113  Bash script file to modify the value of a variable in a file "startfi.nc".
114
[4072]115# ini_pem_orbit.sh:
[4074]116  Bash script file to set the orbital parameters of a file "startfi.nc" from Laskar's data contained in "obl_ecc_lsp.asc" according to the initial date 'pem_ini_earth_date' defined in "run_pem.def". See also "modify_startfi_orbit.sh".
[3349]117
[3883]118# concat_pem.py:
119  Python script file to concatenate the NetCDF files of the PEM along the dimension 'Time' into one NetCDF file. 'Time' is re-indexed by increment.
[3088]120
[3351]121# clean.sh:
[3579]122  Bash script file to clean the folder after a PEM simulation and reset the initial starting files to prepare a new simulation.
[3351]123
[3460]124# multiple_exec.sh:
[3579]125  Bash script file to execute multiple scripts in subdirectories. It is useful to launch multiple simulations at once.
[3460]126
127# visu_layering.py:
[3349]128  Python script file to output the stratification data from the "startpem.nc" files.
129
[4072]130# visu_layering_evol.py:
[3460]131  Python script file to output the stratification data over time from the "startpem.nc" files.
Note: See TracBrowser for help on using the repository browser.