WhatIs: The XIOS library : Différence entre versions
(Page créée avec « The [https://forge.ipsl.jussieu.fr/ioserver/wiki XIOS] (Xml I/O Server) library is based on client-server principles where the server manages the outputs asynchronously fr... ») |
|||
(2 révisions intermédiaires par le même utilisateur non affichées) | |||
Ligne 1 : | Ligne 1 : | ||
The [https://forge.ipsl.jussieu.fr/ioserver/wiki XIOS] (Xml I/O Server) library is based on client-server principles where the server manages the outputs asynchronously from the client (the climate model) so that the bottleneck of writing data is alleviated. | The [https://forge.ipsl.jussieu.fr/ioserver/wiki XIOS] (Xml I/O Server) library is based on client-server principles where the server manages the outputs asynchronously from the client (the climate model) so that the bottleneck of writing data is alleviated. | ||
− | |||
− | |||
To compile with XIOS enabled, one must specify the option | To compile with XIOS enabled, one must specify the option | ||
+ | <syntaxhighlight lang="bash"> | ||
-io xios | -io xios | ||
+ | </syntaxhighlight> | ||
to the makelmdz_fcm script. | to the makelmdz_fcm script. | ||
Ligne 12 : | Ligne 12 : | ||
should be set (in the config.def file) or else the default behavior, i.e. outputs controlled and generated by the IOIPSL library, will occur. | should be set (in the config.def file) or else the default behavior, i.e. outputs controlled and generated by the IOIPSL library, will occur. | ||
− | + | ||
+ | == XIOS output controls == | ||
+ | |||
+ | All aspects of the outputs (name, units, file, post-processing operations, etc.) are controlled by dedicated XML files which are read at run-time. Samples of xml files are provided in the "DefLists" directory. | ||
+ | |||
+ | In a nutshell: | ||
+ | * the master file read by XIOS is ''iodef.xml''; and contains specific XIOS parameters such as ''using_server'' to dictate whether XIOS is run in client-server mode (true) or attached (false) mode, ''info_level'' to set the verbosity of XIOS messages (0: none, 100: very verbose), ''print_file'' to set whether XIOS messages will be sent to standard output (false) or dedicated xios_*.out and xios_*.err files (true). | ||
+ | <syntaxhighlight lang="xml"> | ||
+ | <variable id="using_server" type="bool">false</variable> | ||
+ | <variable id="info_level" type="int">0</variable> | ||
+ | <variable id="print_file" type="bool"> false </variable> | ||
+ | </syntaxhighlight> | ||
+ | * It is common practice to have LMDZ-related definitions and outputs in separate XML files, e.g. ''context_lmdz.xml'' which are included in ''iodef.xml'' via the ''src'' attribute, e.g. | ||
+ | <syntaxhighlight lang="xml"> | ||
+ | <context id="LMDZ" src="./context_lmdz.xml"/> | ||
+ | </syntaxhighlight> | ||
+ | The ''context_lmdz.xml'' file must then contain all fields/grid/file output definitions, which may be split into multiple XML files. Current practice is to use separate ''file_def_histsomething_lmdz.xml'' files, one for each ''histsomething.nc'' file to generate, and include these in ''context_lmdz.xml'' using the ''file_definition'' key. e.g.: | ||
+ | <syntaxhighlight lang="xml"> | ||
+ | <!-- Define output files | ||
+ | Each file contains the list of variables and their output levels --> | ||
+ | |||
+ | <file_definition src="./file_def_histday_lmdz.xml"/> | ||
+ | <file_definition src="./file_def_histhf_lmdz.xml"/> | ||
+ | <file_definition src="./file_def_histins_lmdz.xml"/> | ||
+ | <file_definition src="./file_def_histLES_lmdz.xml"/> | ||
+ | <file_definition src="./file_def_histmth_lmdz.xml"/> | ||
+ | </syntaxhighlight> | ||
+ | |||
+ | 08/04/2021 | ||
[[Category:WhatIs]] | [[Category:WhatIs]] | ||
+ | [[Category:Xios]] |
Version actuelle en date du 8 avril 2022 à 08:55
The XIOS (Xml I/O Server) library is based on client-server principles where the server manages the outputs asynchronously from the client (the climate model) so that the bottleneck of writing data is alleviated.
To compile with XIOS enabled, one must specify the option
-io xios
to the makelmdz_fcm script.
In addition the flag
ok_all_xml=y
should be set (in the config.def file) or else the default behavior, i.e. outputs controlled and generated by the IOIPSL library, will occur.
XIOS output controls
All aspects of the outputs (name, units, file, post-processing operations, etc.) are controlled by dedicated XML files which are read at run-time. Samples of xml files are provided in the "DefLists" directory.
In a nutshell:
- the master file read by XIOS is iodef.xml; and contains specific XIOS parameters such as using_server to dictate whether XIOS is run in client-server mode (true) or attached (false) mode, info_level to set the verbosity of XIOS messages (0: none, 100: very verbose), print_file to set whether XIOS messages will be sent to standard output (false) or dedicated xios_*.out and xios_*.err files (true).
<variable id="using_server" type="bool">false</variable>
<variable id="info_level" type="int">0</variable>
<variable id="print_file" type="bool"> false </variable>
- It is common practice to have LMDZ-related definitions and outputs in separate XML files, e.g. context_lmdz.xml which are included in iodef.xml via the src attribute, e.g.
<context id="LMDZ" src="./context_lmdz.xml"/>
The context_lmdz.xml file must then contain all fields/grid/file output definitions, which may be split into multiple XML files. Current practice is to use separate file_def_histsomething_lmdz.xml files, one for each histsomething.nc file to generate, and include these in context_lmdz.xml using the file_definition key. e.g.:
<!-- Define output files
Each file contains the list of variables and their output levels -->
<file_definition src="./file_def_histday_lmdz.xml"/>
<file_definition src="./file_def_histhf_lmdz.xml"/>
<file_definition src="./file_def_histins_lmdz.xml"/>
<file_definition src="./file_def_histLES_lmdz.xml"/>
<file_definition src="./file_def_histmth_lmdz.xml"/>
08/04/2021