This section walks through an install of XIOS suitable for use with OpenIFS.  Also see the XIOS webpages for more details.

XIOS uses a custom way of building & installing. The following examples will likely need adapting for your own environment but should provide a good guideline.

Download XIOS-2.5

XOS exists in a subversion repository. To download the latest version (version 2.5) at time of writing, do:

svn co http://forge.ipsl.jussieu.fr/ioserver/svn/XIOS/branchs/xios-2.5   xios-2.5
cd xios-2.5

n.b. the spelling of 'branchs' is correct!

Setup compilation environment

The next step is the setup the correct compilation environment for the target architecture to compile for.  XIOS uses 3 separate files to set this correctly, which are located in the 'xios-2.5/arch' directory.  Unless you're lucky and you're coming on one of the machines listed you'll need to copy a set of files and modify them for your environment.

OASIS. Although XIOS can use the OASIS-MCT coupler software, the implementation for OpenIFS does not use it and it does not need to be enabled.

BOOST. The XIOS code includes the Boost library. Although mentioned in some of the arch-* files, the Boost library does not need to be specified in the arch-* files here.

In this walk-through, the use of the GNU compiler is assumed.

arch-OIFS.env file

This sets environment variables used in the other configuration files. In the 'xios-2.5/arch' directory, either make a copy of an existing arch-*.env file or create a new one. It should be edited to point to the netCDF4 & HDF5 libraries on your system.

#  This example assumes the use of 'modules'.

module load gnu
module load openmpi
module load netcdf4
module load hdf5

export HDF5_INC_DIR=$HDF5_DIR/include
export HDF5_LIB_DIR=$HDF5_DIR/lib

export NETCDF_INC_DIR=$NETCDF4_DIR/include
export NETCDF_LIB_DIR=$NETCDF4_DIR/lib

In this example the netcdf4 and HDF5 modules set the variables HDF5_DIR and NETCDF4_DIR. If your system does not use modules, set these paths appropriately.

arch-OIFS.fcm file

Find an existing generic 'arch-*.fcm' file for your compiler and make a copy. 

e.g.

cd xios-2.5/arch
cp arch-GCC_LINUX.fcm  arch-OIFS.fcm

Unless your system has specific requirements, there shouldn't be any need to change the compiler settings in the .fcm file.

arch-OIFS.path file

This file sets the various directory paths used for 'include' files and 'libraries' during the compilation. The key paths that need to be set are for the netCDF4 and HDF5 libraries. Following the example above, we have:


# Variables NETCDF_INC_DIR, NETCDF_LIB_DIR, HDF5_INCDIR, HDF5_LIBDIR are set in the arch-OIFS.env file

NETCDF_INCDIR="-I $NETCDF_INC_DIR"
NETCDF_LIBDIR="-L $NETCDF_LIB_DIR"
NETCDF_LIB="-lnetcdff -lnetcdf"

MPI_INCDIR=""
MPI_LIBDIR=""

HDF5_INCDIR="-I $HDF5_INC_DIR"
HDF5_LIBDIR="-L $HDF5_LIB_DIR"
HDF5_LIB="-lhdf5_hl -lhdf5 -lhdf5 -lz"

Compile XIOS

Now the 'arch-*' files are in place, compile XIOS by using the 'make_xios' script in the xios-2.5 directory:

#  this assumes files arch-OIFS.env, arch-OIFS.fcm & arch-OIFS.path exist in 'xios-2.5/arch' (see above)

./make_xios --prod --job 2 --netcdf_lib netcdf_seq --arch OIFS

This command uses 2 processes for compilation (increase if your machine has more than 2 cores).

We also select sequential netcdf output with netcdf_seq. This doesn't mean parallel I/O is lost, only that each I/O task will write one netcdf file which will need combining after the model has run.

Install XIOS

By default XIOS compiles into the same directory as the source code. We strongly recommend moving the compiled objects and include files into their own directory:

#  make a new directory to copy the XIOS binaries to.
mkdir $HOME/xios-install

cd xios-2.
cp -rp bin etc inc lib $HOME/xios-install
# this next step is recommended as 'inc' is a non-standard name on Unix for 'include' files.
mv $HOME/xios-install/inc $HOME/xios-install/include

Testing XIOS

If you want to test XIOS standalone (without OpenIFS), please see the XIOS Documentation -> How to run XIOS test


Compile OpenIFS with XIOS enabled

- environment variables to set


Run OpenIFS with XIOS enabled

- arguments to use for oifs_run

- namelist switch to enable

- XML files, how to modify (will need Xavier's help with this)

- netcdf output: how to combine with multiple tasks

- enabling regular lat-lon grid output (and the implications)








On this page...



XIOS support

Please note: as XIOS is not used operationally at ECMWF, we can only provide help on a best effort basis. We encourage users to post questions on XIOS to the OpenIFS User Forums to get help from other users in the OpenIFS community.