Tool Box Mars PCM

From Planets
Jump to: navigation, search

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

LMDZ.MARS/util

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).

start2archive

A main program to collect multiple start.nc and 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 start.nc and 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.

newstart

A main program to:

  • extract (and interpolate) restart.nc and restartfi.nc files from a start_archive.nc file or from a pair of start.nc and startfi.nc files. The subtle difference between the two setup is that grid interpolation (horizontal and/or vertical) is only possible if using a start_archive.nc input file
  • modify values and fields contained in the initial condition file
  • Compiling newstart is 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 restart.nc and restartfi.nc

xvik

A post-processing utility to analyse the modeled CO2 cycle

testphys1d

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: