Controling outputs in the dynamics with DYNAMICO

From Planets
Revision as of 11:06, 16 July 2024 by Emillour (talk | contribs)

Jump to: navigation, search

This page should contain all the info about creating /controlling outputs in the dynamics with DYNAMICO

A little background and overview

It all happens via XIOS, so it is all about xml files. In practice there should be a bunch of them, more specifically:

context_dynamico.xml
context_input_dynamico.xml
field_def_dynamico.xml
file_def_dynamico.xml

where

  • context_dynamico.xml and context_input_dynamico.xml are related to reading/writing input/output start/restart files
  • field_def_dynamico.xml contains the definitions of variables that can be outputted from the dynamics as the model marches in time
  • file_def_dynamico.xml contains the definition of output files (including if there will be some output, which variable, at which rate, etc.)

In addition, there is an important parameter controlling the outputs that is set in the run.def (or equivalent) file:

write_period = 

This specifies the rate (in seconds) at which fields are sent to XIOS. IT SHOULD THEREFORE BE A MULTIPLE OF THE DYNAMICS TIME STEP dt. At the initialization steps DYNAMICO provides an indication of this rate (which is computed from dt and write_period), e.g.:

 Output frequency itau_out =          100

In the example above the XIOS "timestep" (used in the xml files to specify output rates and/or averaging) would be 100*dt.

More about the field_def_dynamico.xml file

A user should in most case not need modify this file, unless a new potentially outputable variable has been added in the code, in which case it should be defined in this file.

More about the file_def_dynamico.xml

This is where one defines what outputs files to generate, which variables they will contain, at which rate the outputs will be made, etc.

Clearly this is the file most users will need to edit and customize to fit their needs.

... to be completed ...

Adding tracers in the outputs

If running with tracers and wanting to output them, not need to modify field_def_dynamico.xml (they are not really mentioned there but actually directly added via the Fortran code), but one needs adapt file_def_dynamico.xml.

The id of a tracer is related to its name, and conveyed as tracer_name. So in practice, if you have a "co2" and a "n2" tracer you will reference them as

    <field field_ref="tracer_co2" />
    <field field_ref="tracer_n2" />

in file_def_dynamico.xml

Note that it is possible to specify that all tracers should be outputed without specifying them individually (as shown above) by refering to their default group (as defined in field_def_dynamico.xml):

  <field_group group_ref="standard_output_tracers" />