Difference between revisions of "Quick Install and Run"

From Planets
Jump to: navigation, search
Line 71: Line 71:
 
</syntaxhighlight>
 
</syntaxhighlight>
  
'''(for further details about the IOIPSL library and installing it, use the Search Box at the top of this page)'''
+
''(for further details about the IOIPSL library and installing it, use the Search Box at the top of this page)''
  
== Data ==
+
== GCM Input Datafiles and Datasets ==
 
* datadir + starts + other GCM data for test case early Mars (desert planet with a CO2 atmosphere)
 
* datadir + starts + other GCM data for test case early Mars (desert planet with a CO2 atmosphere)
  
Line 80: Line 80:
 
BWAAAA
 
BWAAAA
  
== Compiling ==
+
== Compiling the GCM ==
 
* prepare and explain arch files
 
* prepare and explain arch files
 
* compiling a test case (early Mars)
 
* compiling a test case (early Mars)
Line 86: Line 86:
 
TO BE COMPLETED
 
TO BE COMPLETED
  
== Running ==
+
== Running the GCM ==
 
* run your first simulation
 
* run your first simulation
  
 
TO BE COMPLETED
 
TO BE COMPLETED
  
== Checking the Results ==
+
== Checking the Results of a Simulation ==
 
* everything is cool in the .out file
 
* everything is cool in the .out file
 
* tools to visualize the produced diagfi.nc file: panoply, ncview, paraview, etc.
 
* tools to visualize the produced diagfi.nc file: panoply, ncview, paraview, etc.
  
 
TO BE COMPLETED
 
TO BE COMPLETED

Revision as of 12:00, 29 April 2022

In this page we give a hopefully exhaustive enough overview of the necessary prerequisites and steps to download, compile and run a simple simulation with the GCM in an "Early Mars" setup (i.e. a desert planet with a CO2 atmosphere) on a Linux computer.

Note that there is a dedicated, install script, that attempts to do all these steps (up to and including running the simulation) that you can obtain here: https://web.lmd.jussieu.fr/~lmdz/planets/install_lmdz_generic_earlymars.bash Automating the process is not trivial as there are many subtle variants of Linux flavors and user account setups, so the script may fail in your case, but hopefully the information given in this page should help you solve the encountered problems.

Prerequisites: Tools and Libraries

In order to use (i.e. compile and run) the GCM, one needs to have some tools and installed libraries at hand. We list below a (minimal) set that you should check that is available and/or that you'll need to first install on your machine. By the way we also assume you're on a Linux OS.

Fortran compiler

The GCM source code is in Fortran. One thus needs a Fortran compiler to build (compile) the executable. The most easily available one (on Linux) is gfortran and examples discussed here will assume it is the one used. You can check that you indeed have a gfortran compiler at hand with the following Bash command:

which gfortran

which should return something like

/usr/bin/gfortran

Subversion

The source code is managed using subversion (svn), which you'll need to download or update your copy. Leaving aside the subtleties of svn and code organization for now, downloading the code amounts to doing the following:

svn checkout http://svn.lmd.jussieu.fr/Planeto/trunk --depth empty
cd trunk
svn update LMDZ.COMMON LMDZ.GENERIC

As a side note: the source code that will be fetched by svn can also be browsed online here: https://trac.lmd.jussieu.fr/Planeto

FCM

The FCM (Flexible Configuration Management) tool is a suite of perl scripts to help building and managing codes. We use a slightly modified version which can be obtained using subversion (svn). Ideally you'll want to download it somewhere on your computer once in for all. To do this:

svn checkout http://forge.ipsl.jussieu.fr/fcm/svn/PATCHED/FCM_V1.2

You'll then need to add the resulting FCM_V1.2/bin to your PATH environment variable so that the command "fcm" may be used from anywhere on your machine. e.g. by adding the following line in your .bashrc:

export PATH=$PATH:$HOME/FCM_V1.2/bin

Assuming here that the downloaded FCM_V1.2 directory is in your home ($HOME) directory. Adapt accordingly if not.

the NetCDF library

The GCM reads and writes input and output files in NetCDF format. Therefore a NetCDF library must be available. As this library is not quite standard you'll probably have to install it yourself on your system. You can use the following home-made "install_netcdf4_hdf5_seq.bash" script to do so:

wget -nv --no-check-certificate http://www.lmd.jussieu.fr/~lmdz/pub/import/install_netcdf4_hdf5_seq.bash
chmod u=rwx install_netcdf4_hdf5_seq.bash
./install_netcdf4_hdf5_seq.bash > netcdf.log 2>&1

Compiling the library and dependencies takes a while (more than 10 minutes; be patient). Once it is done do check file netcdf.log to verify all went well. You may want to also add its "bin" directory to your PATH environment variable by adding in your .bashrc a line of:

export PATH=$PATH:$HOME/netcdf/bin

Assuming here that you have run the "install_netcdf4_hdf5_seq.bash" script in a "netcdf" subdirectory of your home directory. Adapt accordingly if not.


As a side note: The NetCDF library provides a very simple command line tool (ncdump) to inspect the contents of NetCDF files, but you'll need more advanced visualization tools (e.g. ncview, Ferret, Panoply, etc. seem further down this page in the "Checking the Results" section).

the IOIPSL library

The IOIPSL (Input/Output IPSL) library is a library designed to handle both the reading of some input files used by the GCM (the *.def files which are described further below) and the writing of some NetCDF output files.

Scripts to download and install the IOIPSL library can be found in the "ioipsl" subdirectory of the "LMDZ.COMMON" library. Since here we assume we're working with gfortran, the relevant one is "install_ioipsl_gfortran.bash". If your PATH environment variable is already such that it includes the path to your NetCDF library distribution's bin directory (see previous section) then all you need to do is execute the script:

./install_ioipsl_gfortran.bash

If all went well the script should end with:

OK: ioipsl library is in ...

(for further details about the IOIPSL library and installing it, use the Search Box at the top of this page)

GCM Input Datafiles and Datasets

  • datadir + starts + other GCM data for test case early Mars (desert planet with a CO2 atmosphere)

TO BE COMPLETED

BWAAAA

Compiling the GCM

  • prepare and explain arch files
  • compiling a test case (early Mars)

TO BE COMPLETED

Running the GCM

  • run your first simulation

TO BE COMPLETED

Checking the Results of a Simulation

  • everything is cool in the .out file
  • tools to visualize the produced diagfi.nc file: panoply, ncview, paraview, etc.

TO BE COMPLETED