Difference between revisions of "Tool Box"

From Planets
Jump to: navigation, search
(Continuing Simulations)
(Continuing Simulations)
Line 41: Line 41:
 
At the end of a simulation, the model generates restart files (files 'restart.nc' and 'restartfi.nc') which contain the final state of the model. The 'restart.nc' and 'restartfi.nc' files have the same format as the 'start.nc' and 'startfi.nc' files, respectively.  
 
At the end of a simulation, the model generates restart files (files 'restart.nc' and 'restartfi.nc') which contain the final state of the model. The 'restart.nc' and 'restartfi.nc' files have the same format as the 'start.nc' and 'startfi.nc' files, respectively.  
  
These files can in fact be used as initial states using the following renaming:
+
These files can in fact be used as initial states to continue the simulation, using the following renaming command lines:
  
 
<syntaxhighlight lang="bash">
 
<syntaxhighlight lang="bash">
Line 48: Line 48:
 
</syntaxhighlight>
 
</syntaxhighlight>
  
and running a simulation with these will in fact resume the simulation from where the previous run ended.
+
Running a simulation with these start files will in fact resume the simulation from where the previous run ended.
  
 
=== bash scripts ===
 
=== bash scripts ===

Revision as of 09:15, 11 May 2022

Pre-processing Tools

newstart

start2archive

visualization tools

other third party scripts and tools

TO BE COMPLETED

Post-processing tools

zrecast

TO BE COMPLETED

mass stream function

The mass stream function (and the total angular momentum) can be computed from a diagfi.nc or a stats.nc, using the streamfunction.F90 script. The script is located at

trunk/LMDZ.GENERIC/utilities

To compile the script, open the compile file in the same directory and do the following:

  • Replace "pgf90" with your favorite fortran compiler
  • replace "/distrib/local/netcdf/pgi_7.1-6_32/lib" with the lib address and directory that contains your NetCDF library (file libnetcdf.a).
  • Replace "/distrib/local/netcdf/pgi_7.1-6_32/include" with the address of the directory that contains the NetCDF include file (netcdf.inc).
  • You can mess with the compiling options but it is not mandatory.

Once the script is compiled, copy it in the same directory as your .nc file and run

./streamfunction.e

The script will ask you for the name of your .nc file, and will run and produce a new nameofyourfile_stream.nc file.

Be careful : In this new file, all fields are temporally and zonally averaged.

If you want to use python instead of fortran, you can take a look at this repo. It hosts a tool to perform dynamical analysis of GCM simulations (and therefore, it computes the mass stream function and a lot of other stuff), but it is tailored for Dynamico only.

Continuing Simulations

At the end of a simulation, the model generates restart files (files 'restart.nc' and 'restartfi.nc') which contain the final state of the model. The 'restart.nc' and 'restartfi.nc' files have the same format as the 'start.nc' and 'startfi.nc' files, respectively.

These files can in fact be used as initial states to continue the simulation, using the following renaming command lines:

mv restart.nc start.nc
mv restartfi.nc startfi.nc

Running a simulation with these start files will in fact resume the simulation from where the previous run ended.

bash scripts

Visualization software

Panoply

Screenshot of panoply showing here LMD Generic results for the exoplanet TRAPPIST-1e

ncview

paraview

planetoplot

python scripts

TO BE COMPLETED