Using XIOS in libIGCM configurations

Author: J. Ghattas
Last revision: 2020/02/03, A. Ducharne

Since rev [3109] on the ORCHIDEE/trunk, XIOS is the default method for output in the model and in the ORCHIDEE_OL libIGCM configuration. The default run mode is the server mode.

Use following description to activate XIOS in an older version or a branch, and to activate the attached mode for specific cases (small number of simulated grid points).

The page also explains how to adapt the level and frequence of output files.

Deactivate XIOS and use IOIPSL for output

See here to run ORCHIDEE without XIOS: Documentation/UserGuide/DeactivateXIOS

Running XIOS in server mode or attached mode

XIOS can be used in server mode or in attached mode.

  • Attached mode: only the XIOS library linked in the orchidee executable is used. This is the case that is used to run on single process or on small region.
  • Server mode: the executable for the server XIOS (xios_server.exe) and the executable orchidee(orchidee_ol) should both be launched in multiple program mode. Normally only 1MPI is used for the server and several for the orchidee executable.

When running with the libIGCM configuration, the choice between server and attached mode is done in config.card.

The server mode is activated when the component IOS is set in [ListOfComponents] and in [Executable] section. See here an extract from config.card for the case with server mode activated. No rebuild is needed therefore RebuildFrequency=NONE is possible.

#D-- ListOfComponents -
SRF= (sechiba, orchidee)
SBG= (stomate, orchidee)
OOL= (orchidee_ol, orchidee)
IOS= (xios, XIOS)

#D-- Executable -
SRF= ("", "")
SBG= ("", "")
OOL= (orchidee_ol_${OptMode}, orchidee_ol, 31MPI)
IOS= (xios_server_${OptMode}.exe, xios.x, 1MPI)

#D-- IOS -
Restart= n

Warning: Server mode cannot be used on a single pixel or when running ORCHIDEE in sequential mode (1MPI), for instance if you run on a small domain. It must be deactivated in these cases to run on a single pixel or on a small domain using only 1MIP for orchidee. To do so(= running in attached mode), remove the line IOS= (xios, XIOS) from [ListOfComponents] and IOS= (xios_server_${OptMode?}.exe, xios.x, 1MPI)from [Executable] section in config.card. The last section called [IOS] at the very end of the config.card. can be kept. See here an example of config.card for attached mode:

#D-- ListOfComponents -
SRF= (sechiba, orchidee)
SBG= (stomate, orchidee)
OOL= (orchidee_ol, orchidee)

#D-- Executable -
SRF= ("", "")
SBG= ("", "")
OOL= (orchidee_ol_${OptMode}, orchidee_ol, 1MPI)


Activate XIOS in version older than 3109 or branches

Compile using target with_xios, installation as usual:

svn co modipsl
cd modipsl/util
./model ORCHIDEE_trunk
cd ../config/ORCHIDEE_OL
gmake with_xios

Prepare your simulation set up as usual. Choose for example OOL_SEC_STO experiment. Activate XIOS by setting XIOS=y in orchidee_ol.card, IOIPSL output will be deactivated automatically:

vi COMP/orchidee_ol.card    # Change to XIOS=y

The bounds for the time step changed name from time_counter_bnds to time_counder_bounds. This needs to be changed in sechiba.card. Change time_counter_bnds at 2 places in sechiba.card to have:

GatherWithInternal= (lon, lat, veget, time_counter, time_counter_bounds, Areas, Contfrac)

Changing the level and frequency of output files

Using XIOS, when the model is running, the information is read from the file file\_def\_orchidee.xml present in the run directory. This file is copied by the libIGCM configuration from modeles/ORCHIDEE/src_xml directory. Some major changes can be done from the higher level, in the top of the files sechiba.card(orchidee.card in coupled configurations) and stomate.card. The 4 standard files can be modified from here:,, and Activation, frequency and output level can be changed for each of these files. See comments in the beginning of the COMP/sechiba.card and COMP/stomate.card.

In sechiba.card (orchidee.card in coupled configurations):

# Specify output level for output files
# Only the files, and can be set here.
# output_level_filename=0     : lowest level writing only variables needed for the monitoring
# output_level_filename=12    : highest level which will output all variables
# output_level_filename=NONE  : deactivate the file
output_level_sechiba_history = 11
output_level_sechiba_out_2 = NONE
output_level_sechiba_history_4dim = 11

# Specify output frequency for each file [1y, 1mo, 1d, 10800s, 1ts]
# Settings using WriteFrequency in config.card are not longer used
output_freq_sechiba_history = 1mo
output_freq_sechiba_out_2 = 10800s
output_freq_sechiba_history_4dim = 1mo

In stomate.card:

# Specify output level for output files
# Only the files and can be set here.
# output_level_filname=0     : lowest level writing only variables needed for the monitoring
# output_level_filname=1     : highest level which will output all variables
# output_level_filname=NONE  : deactivate the file
output_level_stomate_history = 1
output_level_stomate_ipcc_history = 1

# Specify output frequency for each file [1y, 1mo, 1d]
# Settings using WriteFrequency in config.card are not longer used
output_freq_stomate_history = 1mo
output_freq_stomate_ipcc_history = 1mo

If you want to do more changes, this can be done directly in the file modeles/ORCHIDEE/src\_xml/file\_def\_orchidee.xml. It is also possible to have several different file\_def\_orchidee.xml (in src\_xml or in PARAM folder for example) but in that case changes in COMP/orchidee\_ol.card must be done to copy the corresponding file. For example change orchidee_ol.card info (orchidee.card in coupled configuraions):

List=   (${SUBMIT_DIR}/PARAM/run.def, .) ,\
        (${SUBMIT_DIR}/PARAM/iodef.xml, .)   ,\
        (${MODIPSL}/modeles/ORCHIDEE/src_xml/file_def_input_orchidee.xml, .)  ,\
        (${MODIPSL}/modeles/ORCHIDEE/src_xml/file_def_orchidee.xml.modif, file_def_orchidee.xml)  ,\
        (${MODIPSL}/modeles/ORCHIDEE/src_xml/context_orchidee.xml, .)   ,\
        (${MODIPSL}/modeles/ORCHIDEE/src_xml/field_def_orchidee.xml, .)
Last modified 3 years ago Last modified on 2020-08-07T12:29:46+02:00