Tool Box Mars PEM

From Planets
Revision as of 10:14, 14 January 2025 by Jbclement (talk | contribs) (*.py)

Jump to: navigation, search

There are few tools provided along the PEM which can be found in the directory LMDZ.COMMON/libf/evolution/deftank/. A README text file gives information about the different files that this directory contains.

The current tools available for the PEM in this directory are:

  • clean.sh
  • concat_diagpem.sh
  • inipem_orbit.sh
  • modify_startfi_orbit.sh
  • modify_startfi_var.sh
  • multiple_exec.sh
  • visu_evol_layering.py
  • visu_layering.py

These tools are described in the sections below.

Cleaning of files (post-processing)

The bash script file clean.sh cleans the folder after a PEM simulation.

Merging the PEM outputs (post-processing)

The bash script concat_diagpem.sh allows to concatenate along the variable 'Time' all the "diagpem" files (PEM outputs) into one NetCDF file. 'Time' is re-indexed with the numbering of Martian years simulated by the PEM run. It is useful if one wants to visualize and analyse the evolution of variables during all the PEM runs of the chained simulation.

Initialization of orbital parameters (pre-processing)

The bash script file inipem_orbit.sh modifies the orbital parameters of a file "startfi.nc" according to the date set in the file "run_PEM.def".

Setting the orbital parameters (pre-processing)

The bash script modify_startfi_orbit.sh allows to modify the orbital parameters in a startfi.nc file, that is obliquity, eccentricity, Ls perihelion and the initial Ls. It is useful when one wants a chained simulation to start at a specific date. In this case, the orbital parameters should be consistent with Laskar's data in obl_ecc_lsp.asc which can be found in the PEM deftank.

Setting a variable in a NetCDF file (pre-processing)

The bash script file modify_startfi_var.sh modifies the value of a variable in a file "startfi.nc".

Lauching multiple simulations (pre-processing)

The bash script modify_startfi_var.sh executes multiple scripts in subdirectories. It is useful to launch multiple simulations at once.

Layering visualization overged time (post-processing)

The Python script file visu_evol_layering.py outputs the stratification data over time from the "startpem.nc" files.

Layering visualization (post-processing)

The Python script file visu_evol_layering.py outputs the stratification data from the "startpem.nc" files.