Difference between revisions of "Tool Box Mars PEM"

From Planets
Jump to: navigation, search
(Setting a variable in a NetCDF file (pre-processing))
 
(5 intermediate revisions by the same user not shown)
Line 3: Line 3:
 
The current tools available for the PEM in this directory are:
 
The current tools available for the PEM in this directory are:
 
* <code>clean.sh </code>
 
* <code>clean.sh </code>
* <code>concat_diagpem.sh </code>
+
* <code>concat_pem.py </code>
 
* <code>inipem_orbit.sh </code>
 
* <code>inipem_orbit.sh </code>
 
* <code>modify_startfi_orbit.sh </code>
 
* <code>modify_startfi_orbit.sh </code>
Line 13: Line 13:
 
The purpose of these tools is described in the sections below. Their usage is quite straightforward and all the parameters to be modified by the user are always gathered at the beginning of the file, in the header, with short explanations.
 
The purpose of these tools is described in the sections below. Their usage is quite straightforward and all the parameters to be modified by the user are always gathered at the beginning of the file, in the header, with short explanations.
  
== Cleaning of files (post-processing) ==
+
== Pre-processing ==
 +
 
 +
=== Cleaning of files ===
  
 
The bash script file <code>clean.sh</code> cleans the folder after a PEM simulation and reset the initial starting files to prepare a new simulation.
 
The bash script file <code>clean.sh</code> cleans the folder after a PEM simulation and reset the initial starting files to prepare a new simulation.
  
== Merging the PEM outputs (post-processing) ==
+
=== Initialization of orbital parameters ===
 +
 
 +
The bash script file <code>inipem_orbit.sh</code> sets the orbital parameters of a file ''startfi.nc'' from Laskar's data contained in ''obl_ecc_lsp.asc'' according to the initial date 'year_earth_bp_ini' defined in ''run_PEM.def''. See also <code>modify_startfi_orbit.sh</code>.
  
The bash script <code>concat_diagpem.sh</code> 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.
+
=== Setting the orbital parameters ===
  
== Initialization of orbital parameters (pre-processing) ==
+
The bash script file <code>modify_startfi_orbit.sh</code> allows 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 <code>inipem_orbit.sh</code>.
  
The bash script file <code>inipem_orbit.sh</code> modifies the orbital parameters of a file "startfi.nc" according to the date set in the file "run_PEM.def".
+
=== Setting a variable in a NetCDF file ===
  
== Setting the orbital parameters (pre-processing) ==
+
The bash script file <code>modify_startfi_var.sh</code> modifies the value of a variable in a file ''startfi.nc''.
  
The bash script <code>modify_startfi_orbit.sh</code> 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.
+
=== Lauching multiple simulations ===
  
== Setting a variable in a NetCDF file (pre-processing) ==
+
The bash script <code>modify_startfi_var.sh</code> executes multiple scripts in subdirectories. It is useful to launch multiple simulations at once.
  
The bash script file <code>modify_startfi_var.sh</code> modifies the value of a variable in a file "startfi.nc".
+
== Post-processing ==
  
== Lauching multiple simulations (pre-processing) ==
+
=== Merging the PEM outputs ===
  
The bash script <code>modify_startfi_var.sh</code> executes multiple scripts in subdirectories. It is useful to launch multiple simulations at once.
+
The Python script <code>concat_pem.py</code> 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.
  
== Layering visualization overged time (post-processing) ==
+
=== Layering visualization over time ===
  
The Python script file <code>visu_evol_layering.py</code> outputs the stratification data over time from the "startpem.nc" files.
+
The Python script file <code>visu_evol_layering.py</code> outputs the stratification data over time from the ''startpem.nc'' files.
  
== Layering visualization (post-processing) ==
+
=== Layering visualization ===
  
The Python script file <code>visu_layering.py</code> outputs the stratification data from the "startpem.nc" files.
+
The Python script file <code>visu_layering.py</code> outputs the stratification data from the ''startpem.nc'' files.
  
 
[[Category:Planetary-Evolution-Model]]
 
[[Category:Planetary-Evolution-Model]]

Latest revision as of 10:53, 24 October 2025

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_pem.py
  • inipem_orbit.sh
  • modify_startfi_orbit.sh
  • modify_startfi_var.sh
  • multiple_exec.sh
  • visu_evol_layering.py
  • visu_layering.py

The purpose of these tools is described in the sections below. Their usage is quite straightforward and all the parameters to be modified by the user are always gathered at the beginning of the file, in the header, with short explanations.

Pre-processing

Cleaning of files

The bash script file clean.sh cleans the folder after a PEM simulation and reset the initial starting files to prepare a new simulation.

Initialization of orbital parameters

The bash script file inipem_orbit.sh sets the orbital parameters of a file startfi.nc from Laskar's data contained in obl_ecc_lsp.asc according to the initial date 'year_earth_bp_ini' defined in run_PEM.def. See also modify_startfi_orbit.sh.

Setting the orbital parameters

The bash script file modify_startfi_orbit.sh allows 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 inipem_orbit.sh.

Setting a variable in a NetCDF file

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

Lauching multiple simulations

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

Post-processing

Merging the PEM outputs

The Python script concat_pem.py 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.

Layering visualization over time

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

Layering visualization

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