Difference between revisions of "Tool Box Mars PCM"
(Created page with "== Post-processing tools provided with the Mars PCM == First and foremost there are a number of postprocessing utilities which can be found in the <pre> LMDZ.MARS/util </pre>...") |
(→testphys1d: Update) |
||
(5 intermediate revisions by one other user not shown) | |||
Line 1: | Line 1: | ||
== Post-processing tools provided with the Mars PCM == | == Post-processing tools provided with the Mars PCM == | ||
− | First and foremost there are a number of postprocessing utilities which can be found in the | + | First and foremost there are a number of postprocessing utilities (self-standing tools) which can be found in the |
<pre> | <pre> | ||
LMDZ.MARS/util | LMDZ.MARS/util | ||
</pre> | </pre> | ||
− | directory | + | directory; you certainly want to first read the README file there. |
− | ... | + | Current contents of this directory is: |
+ | <pre> | ||
+ | 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 | ||
+ | </pre> | ||
+ | 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. | ||
+ | <syntaxhighlight lang="bash"> | ||
+ | zrecast.e < zrecast.manual.def | ||
+ | </syntaxhighlight> | ||
== Main programs (other than GCM) but included in the Mars PCM package == | == 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 | + | 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 === | === start2archive === | ||
− | A main program to collect multiple <code>start.nc</code> and <code>startfi.nc</code> files from a series simulations and store them in a <code>start_archive.nc</code> file. | + | A main program to collect multiple <code>start.nc</code> and <code>startfi.nc</code> files from a series simulations and store them in a <code>start_archive.nc</code> file. For this one simply needs to run the <code>startarchive</code> program in the directory. It will automatically fetch code>start.nc</code> and <code>startfi.nc</code> files and generate <code>start_archive.nc</code>. If a <code>start_archive.nc</code> file is already present then the current <code>start.nc</code> and <code>startfi.nc</code> files are added to the <code>start_archive.nc</code> file (which can contain multiple initial states, as long as they are on the same grid and correspond to different dates. |
=== newstart === | === newstart === | ||
A main program to: | A main program to: | ||
− | * extract (and interpolate) <code>restart.nc</code> and <code>restartfi.nc</code> files from a <code>start_archive.nc</code> file | + | * extract (and interpolate) <code>restart.nc</code> and <code>restartfi.nc</code> files from a <code>start_archive.nc</code> file or from a pair of <code>start.nc</code> and <code>startfi.nc</code> files. The subtle difference between the two setup is that grid interpolation (horizontal and/or vertical) is only possible if using a <code>start_archive.nc</code> input file |
* modify values and fields contained in the initial condition file | * modify values and fields contained in the initial condition file | ||
− | Compiling <code>newstart</code> is done using the [[The makelmdz fcm GCM Compilation Script|makelmdz_fcm]] utility | + | * Compiling <code>newstart</code> is done using the [[The makelmdz fcm GCM Compilation Script|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 <code>restart.nc</code> and <code>restartfi.nc</code> | ||
=== xvik === | === xvik === | ||
A post-processing utility to analyse the modeled CO2 cycle | 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/ 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 [[Some Ferret tips and pointers|this page]] | ||
+ | * Many also like to write up their own python scripts | ||
[[Category:Mars-Model]] | [[Category:Mars-Model]] | ||
+ | [[Category:Mars-1D]] |
Latest revision as of 17:37, 17 October 2023
Contents
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
andrestartfi.nc
files from astart_archive.nc
file or from a pair ofstart.nc
andstartfi.nc
files. The subtle difference between the two setup is that grid interpolation (horizontal and/or vertical) is only possible if using astart_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
andrestartfi.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:
- 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