Ignore:
Timestamp:
Oct 29, 2025, 10:02:05 AM (2 months ago)
Author:
jbclement
Message:

PEM:

  • Correction of the process to balance the H2O flux from and into the atmosphere accross reservoirs: (i) computation of H2O amount going from/in the atmosphere is corrected (missing dt and wrong condition); (ii) computation of the scaling factor is corrected because we need to balance all the icetable/adsorbed/surface ice flux but it affects only sublimating/condensing surface ice flux; (iii) process of balancing is modified to be applied to every flux by scaling instead of applying it only to positive or negative flux by trimming; (iv) balance is now fully processed by the tendency before evolving the ice. This is done through dedicated subroutines.
  • Correction of ice conversion between the layering algorithm and PEM ice variables (density factor was missing).
  • Addition of H2O flux balance and related stopping criterion for the layering algorithm.
  • Few updates for files in the deftank to be in line with the wiki Planeto pages.

JBC

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/LMDZ.COMMON/libf/evolution/deftank/README

    r3933 r3938  
    2222------------
    2323To compile the PEM, in "LMDZ.COMMON", do: ./makelmdz_fcm -arch [local] -p [planet] -d [dimensions] -j 8 pem
    24 Options:
     24Options with example:
    2525    1) [local]     : root name of arch files, assuming that they have been set up for your configuration;
    26     2) [planet]    : mars to use the planet physics package;
    27     3) [dimensions]: 64x48x54 to define the grid you want to use.
     26    2) [planet]    : mars to use the Mars planet physics package;
     27    3) [dimensions]: 64x48x54 to define the grid you want to use  (longitude x latitude x atmospheric layers).
    2828To run the PEM, you need a dedicated reshaping tool with consistent options. To compile it, in "LMDZ_COMMON", do: ./makelmdz_fcm -arch [local] -p [planet] -d [dimensions] -j 8 reshape_XIOS_output
    29 To run the PEM, you also need a PCM working with XIOS and consistent options. To compile it, in "LMDZ.COMMON", do for example: ./makelmdz_fcm -arch [local] -p [planet] -parallel mpi_omp -io XIOS -d [dimensions] -j 8 gcm
     29To run the PEM, you also 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
    3030After compilation, the executable file can be found in the "bin" sub-directory.
    3131
    3232Usage:
    3333------
    34   To run a PEM simulation, do: ./launchPEM.sh [options]
    35   Options:
    36       1) None: to start a simulation from scratch;
    37       2) 're': to relaunch a simulation from a starting point (interactive prompt).
     34To run a PEM simulation, do: ./launchPEM.sh [options]
     35Options:
     36    1) None: to start a simulation from scratch;
     37    2) 're': to relaunch a simulation from a starting point (interactive prompt).
     38
     39The Bash file ''launchPEM.sh'' is the master script to launch the PEM chained simulation. It checks if necessary files and required options for your simulation are ok.
    3840
    3941Requirements:
    4042-------------
    41 To run the PEM, you need the following files:
    42     > your executable files for the PCM, the PEM and the reshaping tool with consistent dimensions;
    43     > the xml files for XIOS ("iodef.xml", "context_lmdz_physics.xml", "file_def_physics_mars.xml" and "field_def_physics_mars.xml") which can be found in the PCM deftank folder;
    44     > the def files you want to run the PCM ("run.def", "callphys.def", "traceur.def", etc).
     43To run the PEM, you can create a folder in which you need the following files:
     44    > your executable files for the PCM, the PEM and the reshaping tool with consistent options;
     45    > 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";
     46    > the def files you want to run the PCM: "run.def", "callphys.def", "traceur.def", etc.
    4547      /!\ Do not forget to rename the PCM "run.def" into "run_PCM.def";
    46     > the starting files you want to run the PCM ("startfi.nc", "start.nc"/"start1D.txt"/profiles);
    47     > the necessary PEM files ("launchPEM.sh", "lib_launchPEM.sh", "PCMrun.job", "PEMrun.job", "run_PEM.def" and "obl_ecc_lsp.asc";
    48     > the optional PEM files "diagpem.def" to define the PEM variables to be ouputted and "startpem.nc" to set the initial state of the PEM.
     48    > the starting files you want to run the PCM: "startfi.nc", "start.nc"/"start1D.txt"/profiles;
     49    > the necessary PEM files: "launchPEM.sh", "lib_launchPEM.sh", "PCMrun.job", "PEMrun.job", "run_PEM.def" and "obl_ecc_lsp.asc";
     50    > the optional PEM files: "diagpem.def" to define the PEM variables to be ouputted and "startpem.nc" to set the initial state of the PEM.
     51
     52The PEM files can be found in the deftank folder.
     53
     54Before a simulation, you have to set up some parameters/options in:
     55    > "launchPEM.sh";
     56    > "PCMrun.job";
     57    > "PEMrun.job";
     58    > def files, especially for "run_PEM.def", "run_PCM.def", "callphys.def".
     59In 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 "inipem_orbit.sh" can do it automatically with "obl_ecc_lsp.asc".
    4960
    5061Outputs:
    5162--------
    5263The PEM simulation generates the following files:
    53     > the usual outputs of the PCM ("restartfi.nc", "restart.nc", "diagfi.nc", etc);
    54     > the XIOS outputs of the PCM, then reshaped ("Xdiurnalave.nc"/"data2reshape*.nc"/"data_PCM_Y*.nc");
    55     > the outputs of the chained simulation ("launchPEM.log", "info_PEM.txt" and possibly "kill_launchPEM.sh");
    56     > the usual outputs of the PEM ("restartfi.nc", "restart.nc"/"restart1D.txt" and "diagpem.nc").
     64    > the usual outputs of the PCM: "restartfi.nc", "restart.nc", "diagfi.nc", etc;
     65    > the XIOS outputs of the PCM, then reshaped: "Xdiurnalave.nc"/"data2reshape*.nc"/"data_PCM_Y*.nc";
     66    > the outputs of the chained simulation: "launchPEM.log", "info_PEM.txt" and possibly "kill_launchPEM.sh";
     67    > the usual outputs of the PEM: "restartfi.nc", "restart.nc"/"restart1D.txt" and "diagpem.nc".
    5768During 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).
    5869If you run a simulation by submitting jobs, the script "kill_launchPEM.sh" is automatically generated. It can be used to kill in the queue of the job scheduler the jobs related to your chained simulation.
     
    6980      > mode -> the launching 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.
    7081  The script can take an argument:
    71       1) If there is no argument, then the script initiates a PEM simulation from scratch.
    72       2) If the argument is 're', then the script relaunches an existing PEM simulation. It will ask for parameters to know the starting point that you want to.
     82      1) None: to start a simulation from scratch;
     83      2) 're': to relaunch a simulation from a starting point (interactive prompt).
    7384
    7485# liblaunchPEM.sh:
     
    7687
    7788# PCMrun.job:
    78   Bash script file to submit a PCM job (with SLURM or PBS/TORQUE). The headers correspond to the ADASTRA supercomputer and should be changed for other machines and job schedulers. In case of "processing scripts" launching mode, the headers are naturally omitted.
    79   The path to source the arch file should be adapted to the machine.
    80   The name of the PCM executable file should be adapted.
    81   The execution command should also be adapted according to the set-up.
     89  Bash script file to submit a PCM job (with SLURM or PBS/TORQUE).
     90  The user has to specify:
     91      > The headers correspond to the ADASTRA supercomputer and should be changed for other machines and job schedulers. In case of "processing scripts" launching mode, the headers are naturally omitted.
     92      > The path to source the arch file should be adapted to the machine.
     93      > The name of the PCM executable file should be adapted.
     94      > The execution command should also be adapted according to the set-up.
    8295
    8396# PEMrun.job:
    84   Bash script file to submit PEM job (with SLURM or PBS/TORQUE).The headers correspond to the ADASTRA supercomputer and should be changed for other machines and job schedulers. In case of "processing scripts" launching mode, the headers are naturally omitted.
    85   The path to source the arch file should be adapted to the machine.
    86   The name of the PEM executable file and Reshaping executable file should be adapted.
    87   The PEM executable can have an optional argument which should be specified according to the set-up. Especially, the value of '--jobid' which is the job ID to make the PEM detect the job time limit.
     97  Bash script file to submit PEM job (with SLURM or PBS/TORQUE).
     98  The user has to specify:
     99      > The headers correspond to the ADASTRA supercomputer and should be changed for other machines and job schedulers. In case of "processing scripts" launching mode, the headers are naturally omitted.
     100      > The path to source the arch file should be adapted to the machine.
     101      > The name of the PEM and Reshaping executable files should be adapted.
     102      > 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).
    88103
    89104# run_PEM.def
Note: See TracChangeset for help on using the changeset viewer.