Difference between revisions of "LMDZ XIOS outputs"
(Created page with "You can control many outputs using XIOS (see XIOS_output_controls for details). If you add fields using the '''write_output()'''...") |
|||
Line 1: | Line 1: | ||
You can control many outputs using [[XIOS]] (see [[The_XIOS_Library#XIOS_output_controls|XIOS_output_controls]] for details). | You can control many outputs using [[XIOS]] (see [[The_XIOS_Library#XIOS_output_controls|XIOS_output_controls]] for details). | ||
− | + | == Output files == | |
− | |||
− | |||
− | |||
− | |||
− | + | The main output file, equivalent to [[diagfi.nc]] is Xhistins.nc. | |
− | + | This file is controlled mainly by '''file_def_physics.xml''' | |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
Line 40: | Line 26: | ||
This file (example [https://gitlab.in2p3.fr/la-communaut-des-mod-les-atmosph-riques-plan-taires/git-trunk/-/blob/master/LMDZ.GENERIC/deftank/xios/file_def_physics.xml?ref_type=heads here]) lists the output files you need, and which variables to write in it. | This file (example [https://gitlab.in2p3.fr/la-communaut-des-mod-les-atmosph-riques-plan-taires/git-trunk/-/blob/master/LMDZ.GENERIC/deftank/xios/file_def_physics.xml?ref_type=heads here]) lists the output files you need, and which variables to write in it. | ||
+ | == Adding new variables in the physics (physiq_mod/physiq) == | ||
+ | If you add fields using the '''write_output()''' routine (for example in physiq_mod), you will need to add a corresponding field in '''field_def_physics.xml'''. | ||
+ | For example, | ||
+ | <syntaxhighlight lang="fortran"> | ||
+ | call write_output("temperature","temperature","K",zt) | ||
+ | </syntaxhighlight> | ||
− | == | + | corresponds to |
+ | |||
+ | <syntaxhighlight lang="XML"> | ||
+ | <field id="temperature" | ||
+ | long_name="Atmospheric temperature" | ||
+ | unit="K" /> | ||
+ | |||
+ | </syntaxhighlight> | ||
+ | |||
+ | You can automatize the translation fortran->XML via the script '''UTIL/convert_diagfi_to_xml.py''' (by pasting the write_output() lines into the fortran_input file read by the script). | ||
− | + | You will need to know if the variable is 1D,2D or 3D before putting it in the right section of the field_def_physics.xml file though. | |
− |
Revision as of 12:37, 5 March 2025
You can control many outputs using XIOS (see XIOS_output_controls for details).
Contents
Output files
The main output file, equivalent to diagfi.nc is Xhistins.nc. This file is controlled mainly by file_def_physics.xml
Parameter files
iodef.xml context_pcm_physics.xml field_def_physics.xml file_def_physics.xml
XML example files for XIOS can be found in LMDZ.GENERIC/deftank/xios for the generic PCM.
XML example files are different for DYNAMICO. See Controling outputs in the dynamics with DYNAMICO. You will find under deftank/dynamico example files for DYNAMICO with generic physics.
file_def_physics.xml
This file (example here) lists the output files you need, and which variables to write in it.
Adding new variables in the physics (physiq_mod/physiq)
If you add fields using the write_output() routine (for example in physiq_mod), you will need to add a corresponding field in field_def_physics.xml. For example,
call write_output("temperature","temperature","K",zt)
corresponds to
<field id="temperature"
long_name="Atmospheric temperature"
unit="K" />
You can automatize the translation fortran->XML via the script UTIL/convert_diagfi_to_xml.py (by pasting the write_output() lines into the fortran_input file read by the script).
You will need to know if the variable is 1D,2D or 3D before putting it in the right section of the field_def_physics.xml file though.