Version 32 (modified by peylin, 4 years ago) (diff)


How to install and compile ORCHIDEE with modipsl and libIGCM for offline use

Author: J. Ghattas
Main revision: 2020/02/26, J. Ghattas
Small revision: 2020/02/28, P. Peylin


This page provides the basic command to install and compile the ORCHIDEE model (Trunk or past version or Branches) on the standard set of machine maintained by the IPSL group: irene/TGCC, jeanzay/IDRIS, obelix/LSCE and ciclad/climserv/IPSL


ORCHIDEE trunk version

To extract and compile the latest trunk version of ORCHIDEE and the latest configuration files for offline simulations, do the following command. Note that you will be asked for a password at the first attempt (see the wiki page: or ask your contact person in the ORCHIDEE project team:

svn co modipsl
cd modipsl/util
./model ORCHIDEE_trunk
cd ../config/ORCHIDEE_OL

If you want to compile with debug options, use following:

./ -debug

Or to know more about compile options:

./ -h

Note: The script compiles the model only for the machines that are maintained at IPSL. Currently these are irene/TGCC, jeanzay/IDRIS, obelix/LSCE and ciclad/climserv/IPSL. The compilation script has loaded all modules needed for compilation.

If you want to install on a local PC or a cluster not maintained by IPSL-CMC, then you need to modify/add compile options for your system. See how to proceed under: ​

ORCHIDEE trunk version older than revision 6572

First see the description below to retreive any revision of the Trunk. For older version of the trunk than revision 6572, the compilation script described above does not exist. For these versions there is a Makefile instead. The compilation is done in the same folder as above using the following command (note that your environment is important and modules need to be loaded before compilation, see igcmg_doc:

cd modipsl/config/ORCHIDEE_OL

If you want to compile with debug options, you need to change this inside the Makefile.

ORCHIDEE tagged versions

The tagged versions of ORCHIDEE have a corresponding offline configuration which can be extracted using "./model target" and compiled in the same way as described for the trunk above. The target has the same name as the name of the tag. Currently there are 3 tagged versions available in modipsl by default: ORCHIDEE_2_1 (most recent tag), ORCHIDEE_2_0 (tag used for CMIP6) and ORCHIDEE_2_2 (actually a branch which some added developments). The version ORCHIDEE_AR5 also exists but is only available to extract the source code without running and compiling possibilities.

To extract and compile do as follow:

svn co modipsl
cd modipsl/util
./model ORCHIDEE_2_0                         # or ORCHIDEE_2_1 / ORCHIDEE_2_2
cd ../config/ORCHIDEE_OL

Branches or other versions on svn

Do as for the trunk but modify the file mod.def to extract a specific version of ORCHIDEE before launching the command ./model ORCHIDEE_trunk. The file mod.def specifies all components to be extracted with the script "model" for a set of predefined configuration. You need to modify the set of lines dedicated to extract the "Trunk" in order to extract instead the specific Branch or version. Proceed as follow:

Do first:

svn co modipsl
cd modipsl/util

Now edit the file mod.def for the lines corresponding to the extraction of ORCHIDEE sources for the ORCHIDEE_trunk.
Find the following lines that need to be changed :

#-C- ORCHIDEE_trunk  trunk/ORCHIDEE                           HEAD   14 ORCHIDEE         modeles
#-C- ORCHIDEE_trunk  trunk/ORCHIDEE_OL                        HEAD   14 ORCHIDEE_OL      config

If you want a specific revision on the trunk (i.e. revision 6580), then change HEAD in above lines to the revision you want. More information on the structure of "mod.def" can be found under:
Note that you can often keep the HEAD revision of the ORCHIDEE_OL folder (offline configuration) together with a specific revision of the sources of ORCHIDEE.

#-C- ORCHIDEE_trunk  trunk/ORCHIDEE                           6580   14 ORCHIDEE         modeles
#-C- ORCHIDEE_trunk  trunk/ORCHIDEE_OL                        6580   14 ORCHIDEE_OL      config

If you want to change to a branch or a personal version, then replace trunk/ORCHIDEE by the path to your branch or personal directory. HEAD can also be changed to a specific revision number. For example for the branch ORCHIDEE-CN-CAN, the following should be set:

#-C- ORCHIDEE_trunk  branches/ORCHIDEE-CN-CAN/ORCHIDEE               HEAD   14 ORCHIDEE         modeles
#-C- ORCHIDEE_trunk  branches/ORCHIDEE-CN-CAN/ORCHIDEE_OL            HEAD   14 ORCHIDEE_OL      config

If your version do not have an ORCHIDEE_OL folder, then keep the one from the trunk version.

Finally, when "mod.def" is modified, you can continue with the extraction of the model:

./model ORCHIDEE_trunk
cd ../config/ORCHIDEE_OL

You can then compile using either ./ (see above) OR gmake (if the Makefile exist in your version) depending on the version.

NB! For old branches with fortran code in ORCHIDEE_OL directory

For exemple orchidee_FM

In the trunk and in the recent branches, the directory ORCHIDEE/src_driver contain the source code for the driver. In older versions, these files were stored in ORCHIDEE_OL directory. Therefore for these older branches, you have to extract ORCHIDEE and ORCHIDEE_OL from the branch. For running with libIGCM, we recomand to use the trunk version of the scripts in ORCHIDEE_OL. Extract the trunk/ORCHIDEE_OL and save it in ORCHIDEE_OL.trunk. In mod.def, the lines corresponding to extraction of ORCHIDEE becomes the following :

#-C- ORCHIDEE_trunk  branches/MYOLDBRANCHE/ORCHIDEE           HEAD    14 ORCHIDEE           modeles
#-C- ORCHIDEE_trunk  branches/MYOLDBRANCHE/ORCHIDEE_OL        HEAD    14 ORCHIDEE_OL        modeles
#-C- ORCHIDEE_trunk  trunk/ORCHIDEE_OL                        HEAD    14 ORCHIDEE_OL.trunk  config

For these older branches, the compilation is different:

cd modipsl/modeles/ORCHIDEE_OL
gmake orchidee_ol
gmake teststomate
gmake forcesoil