Tool Box Mars PCM
Post-processing tools provided with the Mars PCM
First and foremost there are a number of postprocessing utilities (self-standing tools) which can be found in the
directory; you certainly want to first read the README file there.
Current contents of this directory is:
aeroptical.def extract.F90 lslin.def startarchive2icosa/ aeroptical.F90 extract.points.def lslin.F90 streamfunction.F90 aeropt_mod.F90 extract.profile.def README xvik/ compile hrecast.def simu_MCS.def zrecast.auto.def concatnc.def hrecast.F90 simu_MCS.F90 zrecast.F90 concatnc.F90 localtime.def solzenangle.def zrecast.manual.def expandstartfi.F90 localtime.F90 solzenangle.F90
the compile script is an example of how to compile any of the utilities, which you will have to adapt to your needs (mostly concerns setting the right path to the NetCDF library). All the post-processing tools are meant to be run interactively (asking the user for some instructions), hence the *.def files as it is most of the time more convenient (once one knows the tools and questions it will ask) to redirect this list of answers to the standard input of the tool, e.g.
zrecast.e < zrecast.manual.def
Main programs (other than GCM) but included in the Mars PCM package
There are a few other main programs that are included with the GCM.
Advanced stuff: In practice these main programs are located under LMDZ.MARS/dynphy_lonlat/phymars/ as they are at the interface between lon-lat dynamics and the Mars physics package (i.e. need to use both and thus can only be applied in that context).
A main program to collect multiple
startfi.nc files from a series simulations and store them in a
start_archive.nc file. For this one simply needs to run the
startarchive program in the directory. It will automatically fetch code>start.nc</code> and
startfi.nc files and generate
start_archive.nc. If a
start_archive.nc file is already present then the current
startfi.nc files are added to the
start_archive.nc file (which can contain multiple initial states, as long as they are on the same grid and correspond to different dates.
A main program to:
- extract (and interpolate)
restartfi.ncfiles from a
start_archive.ncfile or from a pair of
startfi.ncfiles. The subtle difference between the two setup is that grid interpolation (horizontal and/or vertical) is only possible if using a
- modify values and fields contained in the initial condition file
newstartis done using the makelmdz_fcm utility. The program is then meant to be run interactively with the user providing options and choices when prompted.
- Once the program has run and finished without error, it will generate
A post-processing utility to analyse the modeled CO2 cycle
More than a pre- or post-processing tool, this is a 1D (single column) version of the PCM. More about it is on the dedicated page: Mars 1D testphys1d program.
Note that there is also a separate "self-standing" 1D model, the "1D thermal model", which can be downloaded from this page: http://www-planets.lmd.jussieu.fr/. This is essentially a frozen version of testphys1d with some additional tweaks to make it more user-friendly.
Visualizing the outputs
The GCM and most of the post-processing tools mentioned above produce NetCDF files, which one most likely will need to visualize. There are a number of tools available (free or not). Here is a selection:
- Ncview is a very basic tool, mostly useful for a simple quick look.
- Panoply is a user-friendly tool for viewing NetCDF data, available here: https://www.giss.nasa.gov/tools/panoply/
- Ferret is another nice tool for viewing and processing NetCDF data, see their official page: https://ferret.pmel.noaa.gov/Ferret/ and also this page
- Many also like to write up their own python scripts