8). The parallel I/O server XIOS implemented in Surfex by S. Senesi

1). To use the I/O netcdf parallel server XIOS, you need first to initialize the environment variable VER_XIOS before to install surfex:

export VER_XIOS=2

Then, you need to run the configure file. The command "make" will compile the SURFEX code as usual but also the XIOS library present in the src/LIB directory.

Two keys rule the taking into account of XIOS into the SURFEX code:

  • the pre-compilation key WXIOS is defined if VER_XIOS/=0. All code lines using the XIOS library are under this key.
  • the key LXIOS is TRUE if the user chooses CTIMESERIES_FILETYPE = "XIOS" in NAM_IO_OFFLINE in the namelist OPTIONS.nam. If LXIOS = .TRUE., the output netcdf files will be written through the XIOS server.

2). Two or more input xml files are needed to run XIOS in SURFEX:

  • iodef.xml notably tells :
    • the name of the other xml files to use (below, we assume that only one file is quoted, named surfex.xml),
    • if we want to use the XIOS server,
    • if we are using OASIS.
  • surfex.xml (or other files as quoted in iodef.xml) gives the output fields to write with XIOS. There are two main possibilities:
    • to explicitly provide the list of the fields to write and to declare in which file each field should be written; you can thus, if wished, reproduce the regular NETCDF output file (for example, LEGC_ISBA in ISBA_DIAG_CUMUL.OUT.nc); you can also decide for any other combination of fields in files, and have files with various output frequencies.
    • to write all the fields (excepted for the 0D fields) in one single file (avoiding to enumerate all fields to write).
  • The fields actually written are subordinated to what is set in OPTIONS.nam (namelist keys and LSELECT/CSELECT).
  • It seems that it’s not possible to write more than a certain number of fields in one given file (issue with the NetCDF library, under investigation by the XIOS development team).
  • Here are some very basic examples of xml files for XIOS:

3) To be noted that XIOS also allows to average fields in the time (see the documentation from S. Senesi for more details).

4). To run OFFLINE with the XIOS server, you need to type for example:

mpirun -np 2 ./xios_server.exe : -np 3 ./offline.exe

in this example, we give:

  • 2 MPI tasks to the XIOS server that will write the output files. See the note below.
  • 3 MPI tasks to the rest of the SURFEX code.
  • the XIOS server need to be linked from the directory [PATH_TO_WHERE_XIOS_WAS_INSTALLED]/bin.

Note: without a NetCDF library compiled with parallel I/O functionality, you cannot have a useful output when using more than one XIOS server (you would get your fields scattered in as many files as the number of XIOS server tasks).

5) The XIOS documentation stays at https://forge.ipsl.jussieu.fr/ioserver/wiki; the documentation for using XIOS with Surfex and Arpege, written by S. Senesi, is available here:

Documentation XIOS in SURFEX (S. Senesi)

6). In OFFLINE mode, a test of performance was done and is documented there.