Tool Box Mars PEM
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.
Contents
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.