Some pointers about standalone installation of the IOIPSL library

De LMDZPedia
Aller à : navigation, rechercher

This page is mostly for "do-it-yourself" people interested in installing the IOIPSL library.

Prerequisites

IOIPSL is written in Fortran, so you need to have a Fortran compiler at hand (gfortran in the following examples), as well as an available NetCDF library compiled using that same compiler.

One of the IOIPSL install scripts uses ksh (Korn Shell), which is not always available (Bash, Bourne Again Shell, is now the standard). So you might want to first install it, e.g. on Linux-Ubuntu:

sudo apt install ksh

If that is not an option (e.g. you do not have super-user privileges to install ksh) the you will need to manually modify a file (see section "Know problems and issues worth knowing about" below)

Downloading the IOIPSL library sources

One can do this using svn (subversion):

svn checkout --username icmc_users --password icmc2022 https://forge.ipsl.jussieu.fr/igcmg/svn/IOIPSL/trunk IOIPSL

where the trailing argument IOIPSL is customizable to whatever (non existing) subdirectory name one wants to have the library put in. As of April 2022 the IOIPSL distribution requires username/password authentification (not a big issue as a this does not require any specific registration step as the generic username/password given in the svn command line above can be used).

The makeioipsl_fcm compilation script and related FCM architecture files

The main script to compile the library is makeioipsl_fcm, located in the distribution's top directory. It uses FCM (Flexible Configuration Management) to know about specific configuration options and set-up and thus requires (just like the GCM) appropriate architecture files (check out the page about these). These files contain information on which compiler to use, what compilation options to use, where relevant libraries are located etc. In practice one must thus create these ASCII text files in the arch/ subdirectory. The naming convention is rather straightforward, when the script makeioipsl_fcm is run with the option -arch somename, it will look for files arch/arch-somename.env, arch/arch-somename.path and arch/arch-somename.fcm.

You will most likely use the IOIPSL with LMDZ6. In that case it is recommended to use the same set of architecture files to compile IOIPSL and the GCM.

Building the IOIPSL library

Building the IOIPSL library then merely requires running the makeioipsl_fcm with the adequate mandatory -arch option (note that one can learn about all the possible options by running ./makeioipsl_fcm -h), e.g.:

./makeioipsl_fcm -arch gfortran


Checking that the install was successful

If the previous step went well the IOIPSL/lib directory should contain the library:

libioipsl.a

The IOIPSL/inc directory should contain the following module files:

calendar.mod   flincom.mod   histcom.mod  restcom.mod
defprec.mod    fliocom.mod   ioipsl.mod   stringop.mod
errioipsl.mod  getincom.mod  mathelp.mod

And the IOIPSL/bin directory should contain the rebuild utility:

flio_rbld  rebuild

Congratulations! You can now use the IOIPSL library.


Know problems and issues worth knowing about

  • ksh is needed to compile "out of the box"; if ksh is not available then the workaround is to replace line
#!/bin/ksh

to

#!/bin/bash

in the IOIPSL/ins_m_prec file prior to running the makeioipsl_fcm script.

  • Recent versions of the IOIPSL fails to work properly if compiled by gfortran version 4.8.5 (see e.g. https://trac.lmd.jussieu.fr/Planeto/ticket/62 ) but works fine with more recent versions of the compiler (tested with versions 7.2+)


05/08/2022