YetAnotherCoupler 3.5.2
|
YAC supports the use of a YAML file to configure the coupling between model components. This configuration file contains information such as:
This configuration file can be read in at any time before the end of the definition phase. Couples defined in the configuration file whose source and/or target fields are not defined through the interface by the respective components are being ignored.
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
The time period between couplings is defined by multiples of this time step unit
(available options: millisecond, second, minute, hour, day, month, year, and ISO_format)
debug
Debugging options
sync_location
sync_location
has to be replaced with a valid synchronisation location in the YAC initialisation (valid values are def_comp, sync_def, and enddef)
By default, the configuration will be in the YAML format. But it is also possible to explicitly set the filetype (valid filetypes are: yaml and json):
The configuration file can also include the user definitions (information about defined components, grids, and fields):
grid_name
Name of the grid (as provided in the Grid Definition)
file_name
Name of the grid file
Multiple grids can be written to the same file
coupling
List of fields to be coupled and their configuration.
Each coupling is defined by the following parameters, which can be given in any order.
src_component / tgt_component
Name of the source/target component
src_grid / tgt_grid
Name of the source/target grid
If multiple source/target grids have the same coupling configuration, a
list of grid names can be provided.
source / target Alternative method to define source/target component and grid names
src_lag (optional; default value: 0)
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.
tgt_lag (optional; default value: 0)
Used to adjust the internal event trigger clock for the target
coupling_period
Defines at which interval 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.
time_reduction (optional; default value: none)
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.
(available options: accumulate, average, minimum, maximum, and none)
weight_file_name (optional)
Specifies the name of a weight file that will be written by YAC, if the field is coupled. It contains the result of the whole interpolation stack.
If no weight file name is given, no weight file will be generated.
The weight file can be read in by the user-file interpolation method
YAC will do the reading and writing of wight files in parallel. This parallel IO can be configured as described here: Configuration of parallel IO in YAC
mapping_side (optional; default value source)
Specifies at which component the weights will be stored and applied to the data in order to interpolate the respective field.
(available options: source and target)
scale_factor (optional; default value 1.0)
All interpolated target points that do not receive the value of the fixed interpolation or the fallback value of the dynamic fractional masking will be multiplied by this value.
scale_summand (optional; default value 0.0)
This value will be added to all interpolated target points that do not receive the value of the fixed interpolation or the fallback value of the dynamic fractional masking.
field
Name of the field to be coupled.
If multiple fields have the same coupling configuration, a
list of field names can be provided.
If the source and target component use a different field name, the names are specified as follows:
interpolation
Contains a list of Interpolation methods, which yield the Interpolation stack
src_mask_name
Name of source mask (see Named masks)
If the source data consists of multiple source fields, use the key src_mask_names and provide an array of mask names.
tgt_mask_name
Name of target mask (see Named masks)
*
Any unknown root key will be ignored by YAC.
YAC uses libfyaml to read its YAML configuration files. This library fully supports YAML Version 1.2.
Therefore, features like anchhors, aliases, and merge keys can be used in the configuration file.
The following is a valid configuration file: