Versions Compared
Key
- This line was added.
- This line was removed.
- Formatting was changed.
What is XIOS?
XIOS is an 'I/O server' that can run alongside OpenIFS and handle all of the output from the model (apart from log files). The XIOS home page is: https://forge.ipsl.jussieu.fr/ioserver. XIOS is Open Source software and licensed under the CeCILL license. Please see the license file in the software download for more details.
Advantages of using XIOS:
- XIOS outputs netCDF4 and can be configured to interpolate to a regular lat-lon grid.
- XIOS can do computation of averages (e.g. in time) before output.
- XIOS makes openifs execute more efficiently as it executes in parallel.
XIOS is particularly well suited to running OpenIFS at higher resolutions as it removes the time required for OpenIFS to produce output. OpenIFS without XIOS can only write its GRIB output through the master process, typically around 5-10% penalty.
Disadvantages of using XIOS are:
- XML files are required to describe the netCDF output required.
- Batch jobs (if used) might be more complex as two separate MPI executables are required (the oifs_run command knows how to run OpenIFS with/without XIOS).
Prerequisites
XIOS requires other libraries are available before compilation. They are:
- netCDF4 library (either serial or netcdf parallel library) (** check this with Xavier, do we need netcdf_par?? ***)
- HDF5 library
- C++ compiler
- Fortran compiler - a recent version is recommended as XIOS uses some F2008 features (arrays > 7 dimensions)
Compiling & installing XIOS
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:
Code Block |
---|
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.
Expand | ||
---|---|---|
| ||
# This example assumes the use of 'modules'. module load gnu export HDF5_INC_DIR=$HDF5_DIR/include export NETCDF_INC_DIR=$NETCDF4_DIR/include |
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.
Code Block |
---|
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:
Expand | ||
---|---|---|
| ||
# 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" MPI_INCDIR="" HDF5_INCDIR="-I $HDF5_INC_DIR" |
Compile XIOS
Now the 'arch-*' files are in place, compile XIOS by using the 'make_xios' script in the xios-2.5 directory:
Code Block |
---|
# 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:
Code Block |
---|
# 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)
Excerpt Include | ||||||
---|---|---|---|---|---|---|
|
Panel | ||||||
---|---|---|---|---|---|---|
| ||||||
|
Info | ||
---|---|---|
| ||
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 OIFSUF to get help from other users in the OpenIFS community. |
Panel | ||
---|---|---|
| ||
XIOS Home Page* link to Xavier's ECMWF technical report here * Computational aspects and performance evaluation of the IFS-XIOS integration |