= How to install and compile ORCHIDEE with modipsl and libIGCM for offline use = Author: J. Ghattas[[BR]] Main revision: 2020/02/26, J. Ghattas [[BR]] Small revision: 2020/02/28, P. Peylin [[PageOutline]] '''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. '''Remarks:''' * If you want to know more about compiling ORCHIDEE, see [wiki:Documentation/UserGuide/CompileMethods]. * After the compilation is done as described on this page, you can run the model using * libIGCM, method advised for all developments and simulation when access to IPSL machines: [wiki:Documentation/UserGuide/Config] * small test case, advised for learning to know the model and for developments: [wiki:Documentation/UserGuide/TestCase1] * small test case in parallel, advised for testing developments: [wiki:Documentation/UserGuide/TestCaseBatch] == 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 try (see the wiki page: https://forge.ipsl.jussieu.fr/orchidee/wiki/Documentation/UserGuide/DifferentLogin Ask your contact person in the ORCHIDEE project team (see https://orchidee.ipsl.fr/you-orchidee/): {{{ svn co http://forge.ipsl.jussieu.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 }}} 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: ​http://forge.ipsl.jussieu.fr/igcmg_doc/wiki/Doc/ComputingCenters/LocalPC '''ORCHIDEE trunk version older than revision 6572'''[[BR]] 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 [https://forge.ipsl.jussieu.fr/igcmg_doc/wiki/Doc/ComputingCenters igcmg_doc]: {{{ modipsl/config/ORCHIDEE_OL gmake }}} 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 http://forge.ipsl.jussieu.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 }}} == 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. [[BR]] Do first: {{{ svn co http://forge.ipsl.jussieu.fr/igcmg/svn/modipsl/trunk modipsl cd modipsl/util }}} Edit now the file mod.def for the line corresponding to extraction of ORCHIDEE sources for target ORCHIDEE_trunk.[[BR]] 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 ./compile_orchidee_ol.sh depending on the version. == NB! For old branches with fortran code in ORCHIDEE_OL directory == ''For exemple orchidee_FM''[[BR]][[BR]] 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 }}}