The IOIPSL Library
The IOIPSL (for Input Output IPSL) library is a library used by the GCM to read in input parameters from the run.def text file and related *.def files. It can in fact do more, such as writing output NetCDF files a, a feature not used by the Generic model's physics package.
Just like for any library, one should need to only install it once and then just use it by linking to it and pointing to its modules. In practice via the compilation options:
-L/path/to/the/ioipsl/library/lib -lioipsl
-I/path/to/the/ioipsl/library/inc
Contents
Installing the IOIPSL library
There are some dedicated scripts in LMDZ.COMMON/ioipsl that one can adapt and use, hopefully without too much trouble using pointers and information given here
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.
Downloading the IOIPSL library sources
One can do this using svn (subversion):
svn checkout http://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.
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. 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.
TODO: DETAIL ARCH FILE CONTENTS (Or give link to dedicated page?)
Note that one can (and should! At least that is what we recommend) use the same set of architecture files for the GCM and IOIPSL.
Building the IOIPSL library then merely requires running the makeioipsl_fcm with the adequate mandatory -arch option (note that one can lear 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
and 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
Congratulations! You can now use the IOIPSL library.
Know problems and issues worth knowing about
- 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 ).
- As of April 2022 the IOISPL distribution requires username/password authentication. Not a problem (no need for any specific registration step) as there is a generic username/password that can be used (see the provided IOIPSL install scripts where this information is hard coded).