YetAnotherCoupler  2.4.2
XML configuration file

Table of Contents

Introduction

YAC uses a XML file to configure the coupling between model components. This configuration file contains information such as:

  • which model components take part in the coupling
  • which fields are supposed to be coupled
  • what interpolation is supposed to be used
  • at which frequency the coupling is supposed to be executed

This configuration file is read in by YAC at the initialisation phase. All components initialing YAC have to be mentioned in file. All grid and fields defined by the user through the interface, which are not mentioned in the file are being ignored. In addition, the file can contain more grids and fields than defined by the user.

Description

  • ‹redirect›

    If "redirect_stdout" is "true" the standart output of all processes will be redirected into individual files.
    Activating this may have a negative impact on the performance on the file system.

    If "redirect_of_root" and "redirect_stdout" are "true" only the root rank of each component will redirect its standart output to a file.

  • ‹components›

    Defines all components.

    • ‹component›

      Definition of a single component

      All components must have a unique "id", which is a integer value.

      • ‹name›

        Name of the component

        The given string has to match with the one provided to yac_cdef_comp or yac_fdef_comp.

      • ‹model›

        Name of the associated model

        Currently unused

      • ‹simulated›

        Type of simulated model

        Currently unused

      • ‹transient_grid_refs›

        list of coupled source and target fields

        • ‹transient_grid_ref›

          Declaration of a coupled field

          "id" has to be a unique integer value within the associated list of coupled fields

          "transient_ref" references a field from the list of all coupled fields in ‹transients›

          "grid_ref" references a grid from the list of all grid in ‹grids›

          "collection_size" number of 2D fields coupled at the same time using the same interpolation (see Interpolation)

  • ‹transients›

    List of fields that can be coupled

    • ‹transient›

      "id" has to be a unique integer value within the list of fields

      "transient_standard_name" is the name of the field
      field names provided to yac_cdef_field or yac_cdef_field are matched against the transient standard names in order to identify the associated field

  • ‹grids›

    List of grids that may be used by the components

    • ‹grid›

      Single grid

      "id" has to be a unique integer value within the list of grids

      "alias_name" is the name of the grid
      grid names provided to and yac_cdef_grid_* or yac_fdef_grid are matched against the alias names in order to identify the associated grid

  • ‹dates›

    Defines a time range for the coupling.
    All exchanges providing a date outside this range will not be executed.

    • ‹start_date›

      Start date of coupling time range (e.g. 2008-03-09T16:05:07)

    • ‹end_date›

      End date of coupling time range (e.g. 2008-03-10T16:05:07)

    • ‹calendar›

      Calendar being used in the coupled run (available options: "proleptic-gregorian", "360d", and "365d")

  • ‹timestep_unit›

    Time periodes between couplings is defined by multiple of this time step unit

  • ‹couples›

    Configuration of the interpolations for the fields that are to be coupled

    • ‹couple›

      Description of the coupling between two components

      • ‹component1› and ‹component2›

        The two component for the coupling is described in the ‹couple›

        "id" references "id" from ‹component›

      • ‹transient_couple›

        Description of the coupling of a single field

        "transient_id" references "id" from ‹transients›

        • ‹source›

          Defines which of the two components in the ‹couple› is the source.

          "component_ref" is either "1" or "2" and refers to ‹component1 and ‹component2

          "transient_grid_ref" references "id" from ‹transient_grid_ref› from the respective component

        • ‹target›

          "transient_grid_ref" references "id" from ‹transient_grid_ref› from the respective component

        • ‹timestep›

          Defines the coupling frequency

          Source or target time step must be equal to or an integer multiple of the other

          • ‹source›

            Time interval between two consecutive calls to yac_cput or yac_fput
            it is given in multiples of the time step unit

          • ‹target›

            Time interval between two consecutive calls to yac_cget or yac_fget
            it is given in multiples of the time step unit

          • ‹coupling_period operation="accumulate"›

            Defines at which intervale the target processes should receive data through its get call.
            It is given in multiples of the time step unit.

            Coupling period must be an integer multiple of the source/target time step.

            "operation" gives the user the option to define how YAC is supposed to handle the source data provided by put that do not match the coupling_period due to a higher frequency.
            Possible options are: "accumulate", "average", and "none"

          • ‹source_timelag›

            Used to adjust the internal event trigger clock for the source

            Timelag of 2 will put forward the internal clock for the put event by 2 times the sourcetime step.

          • ‹target_timelag›

            Used to adjust the internal event trigger clock for the target

        • ‹interpolation_requirements›

          Defines the Interpolation stack and contains one or more Interpolation methods

        • ‹enforce_write_weight_file›

          If "true", YAC will write the interpolation to a file containing all the weights.

          "filename" defines the name of the weight file

          The weight file can be read in by the user-file interpolation method

Example

<?xml version="1.0" encoding="UTF-8"?>
<coupling
xmlns="http://www.w3schools.com"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.w3schools.com coupling.xsd">
<redirect redirect_of_root="false" redirect_stdout="false"/>
<components>
<component id="1">
<name>comp_1</name>
<model>model_1</model>
<simulated>ocean</simulated>
<transient_grid_refs>
<transient_grid_ref id="1" transient_ref="1" grid_ref="1" collection_size="5"/>
<transient_grid_ref id="2" transient_ref="3" grid_ref="1" collection_size="7"/>
</transient_grid_refs>
</component>
<component id="2">
<name>comp_2</name>
<model>model_2</model>
<simulated>ocean</simulated>
<transient_grid_refs>
<transient_grid_ref id="1" transient_ref="1" grid_ref="2" collection_size="5"/>
<transient_grid_ref id="2" transient_ref="2" grid_ref="2" collection_size="6"/>
</transient_grid_refs>
</component>
<component id="3">
<name>comp_3</name>
<model>model_3</model>
<simulated>ocean</simulated>
<transient_grid_refs>
<transient_grid_ref id="1" transient_ref="2" grid_ref="3" collection_size="6"/>
<transient_grid_ref id="2" transient_ref="3" grid_ref="3" collection_size="7"/>
</transient_grid_refs>
</component>
</components>
<transients>
<transient id="1" transient_standard_name="transient_1" />
<transient id="2" transient_standard_name="transient_2" />
<transient id="3" transient_standard_name="transient_3" />
</transients>
<grids>
<grid id="1" alias_name="grid_1" />
<grid id="2" alias_name="grid_2" />
<grid id="3" alias_name="grid_3" />
</grids>
<dates>
<start_date>2008-03-09T16:05:07</start_date>
<end_date>2008-03-10T16:05:07</end_date>
<calendar>proleptic-gregorian</calendar>
</dates>
<timestep_unit>second</timestep_unit>
<couples>
<couple>
<component1 component_id="1" />
<component2 component_id="2" />
<transient_couple transient_id="1">
<source component_ref="1" transient_grid_ref="1" />
<target transient_grid_ref="1" />
<timestep>
<source>10</source>
<target>20</target>
<coupling_period operation="accumulate">60</coupling_period>
<source_timelag>60</source_timelag>
<target_timelag>60</target_timelag>
</timestep>
<interpolation_requirements>
<interpolation method="bernstein_bezier"/>
</interpolation_requirements>
<enforce_write_weight_file filename="">false</enforce_write_weight_file>
</transient_couple>
</couple>
<couple>
<component1 component_id="2" />
<component2 component_id="3" />
<transient_couple transient_id="2">
<source component_ref="1" transient_grid_ref="2" />
<target transient_grid_ref="1" />
<timestep>
<source>10</source>
<target>20</target>
<coupling_period operation="accumulate">60</coupling_period>
<source_timelag>60</source_timelag>
<target_timelag>60</target_timelag>
</timestep>
<interpolation_requirements>
<interpolation method="average"/>
</interpolation_requirements>
<enforce_write_weight_file filename="">false</enforce_write_weight_file>
</transient_couple>
</couple>
<couple>
<component1 component_id="1" />
<component2 component_id="3" />
<transient_couple transient_id="3">
<source component_ref="2" transient_grid_ref="2" />
<target transient_grid_ref="2" />
<timestep>
<source>10</source>
<target>20</target>
<coupling_period operation="accumulate">60</coupling_period>
<source_timelag>60</source_timelag>
<target_timelag>60</target_timelag>
</timestep>
<interpolation_requirements>
<interpolation method="radial_basis_function"/>
</interpolation_requirements>
<enforce_write_weight_file filename="">false</enforce_write_weight_file>
</transient_couple>
</couple>
</couples>
</coupling>