wiki:Documentation/UserGuide/InstallingORCHIDEEBasic

Install and compile ORCHIDEE for offline use

Author: J. Ghattas
Last revision: 2020/02/28, P. Peylin

Objectives

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

Remarks:

ORCHIDEE trunk version (and branch 2.2)

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: https://forge.ipsl.fr/orchidee/wiki/Documentation/UserGuide/DifferentLogin or ask your contact person in the ORCHIDEE project team: https://orchidee.ipsl.fr/you-orchidee/):

svn co --username icmc_users http://forge.ipsl.fr/igcmg/svn/modipsl/trunk modipsl
cd modipsl/util
./model ORCHIDEE_trunk
cd ../config/ORCHIDEE_OL
./compile_orchidee_ol.sh

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

./compile_orchidee_ol.sh -debug

Or to know more about compile options:

./compile_orchidee_ol.sh -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: ​http://forge.ipsl.fr/igcmg_doc/wiki/Doc/ComputingCenters/LocalPC

ORCHIDEE trunk version older than revision 6572 (and branch 2.2 older than r7452)

First see the section below to retrieve any revision of the Trunk. For older version of the trunk than revision 6572, the compilation script described above does not exist, but 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
gmake

If you want to compile with debug options, you need to change this inside the Makefile by changing all the prod into debug.

ORCHIDEE tagged versions

The tagged versions of ORCHIDEE have a corresponding offline configuration which can be extracted using "./model targetname" and compiled in the same way as described for the trunk above. The targetname is the same name as the name of the tag. Currently there are 3 tagged versions available in modipsl by default: ORCHIDEE_2_0 (tag used for CMIP6), ORCHIDEE_2_1 (most recent tag, with minor updates compared to 2.0), and ORCHIDEE_2_2 (false tag, as this branch holds new developments compared to 2.1, still ongoing). 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 (until r7452 only for branch2.2)

svn co http://forge.ipsl.fr/igcmg/svn/modipsl/trunk modipsl
cd modipsl/util
./model ORCHIDEE_2_0                         # or ORCHIDEE_2_1 / ORCHIDEE_2_2
cd ../config/ORCHIDEE_OL
gmake

To extract and compile for branch2.2 after r7452

svn co http://forge.ipsl.fr/igcmg/svn/modipsl/trunk modipsl
cd modipsl/util
./model ORCHIDEE_2_2                        
cd ../config/ORCHIDEE_OL
./compile_orchidee_ol.sh

On Irene, if the compilation of Tag2 does not work, we need update the enviroments with the following line:

. `ccc_home -u igcmg`/MachineEnvironment/irene/bashrc_irene

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 the specific Branch or version instead. Proceed as follow:

Do first:

svn co http://forge.ipsl.fr/igcmg/svn/modipsl/trunk 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

As an example, if you want a specific revision on the trunk (i.e. revision 6580), then change HEAD in above lines to the revision you want, 6580.

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

More information on the structure of "mod.def" can be found under: https://forge.ipsl.fr/igcmg_doc/wiki/Doc/Install#Syntaxinmod.def.
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.

If you want 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, but it can be kept as ‘HEAD’. 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 original line from the trunk version.

Finally, after "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 ./compile_orchidee_ol.sh (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 example orchidee_FM

In the trunk and in the recent branches, the directory ORCHIDEE/src_driver contains the source code for the driver. In older versions, these files were stored in ORCHIDEE_OL directory. Therefore, for using these older branches, you have to extract ORCHIDEE and ORCHIDEE_OL from the branch. For running with libIGCM, we recommend 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
Last modified 6 weeks ago Last modified on 2024-03-15T11:02:59+01:00