Version 23 (modified by jgipsl, 14 months ago) (diff)


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

Author: J. Ghattas
Last revision: 2020/02/26, J. Ghattas

ORCHIDEE trunk version

To extract and compile the latest trunk version of ORCHIDEE and configuration files for offline simulations:

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

The model compile be default at the machines that we maintain at IPSL: irene/TGCC, jeanzay/IDRIS, obelix/LSCE and ciclad/climserv/IPSL. The compilation script loads all modules needed for compilation.

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

ORCHIDEE trunk version older than revision 6572

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


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 source code without running and compiling possibility.

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

Branch or other version 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 each predefined configuration.

Do first:

svn co modipsl
cd modipsl/util

Edit now the file mod.def for the line corresponding to extraction of ORCHIDEE sources for target ORCHIDEE_trunk.
Following lines needs 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, then change HEAD in above lines to the revision you want. Note that you can often keep the HEAD revision of the ORCHIDEE_OL folder together with a specific revision of the sources ORCHIDEE.

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, 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 you version do not have a ORCHIDEE_OL folder, then keep the trunk version.

Now continue with the extraction of the model:

./model ORCHIDEE_trunk
cd ../config/ORCHIDEE_OL

Compile using gmake (if the Makefile exist in your version) or ./ 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 newer branches, the directory ORCHIDEE/src_driver contain the source code for the driver. In older versions, these files were stored in ORCHIDEE_OL directory. Therefor 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

Note that the compiling is different:

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