|
YAC 3.15.0
Yet Another Coupler
|
#include "config.h"#include <libfyaml.h>#include <inttypes.h>#include <limits.h>#include <stdlib.h>#include <string.h>#include <stdbool.h>#include <errno.h>#include "yac.h"#include "utils_mci.h"#include "config_yaml.h"#include "mtime_calendar.h"#include "geometry.h"#include "io_utils.h"#include "interpolation/methods/interp_method_avg.h"#include "interpolation/methods/interp_method_callback.h"#include "interpolation/methods/interp_method_check.h"#include "interpolation/methods/interp_method_conserv.h"#include "interpolation/methods/interp_method_creep.h"#include "interpolation/methods/interp_method_file.h"#include "interpolation/methods/interp_method_fixed.h"#include "interpolation/methods/interp_method_hcsbb.h"#include "interpolation/methods/interp_method_ncc.h"#include "interpolation/methods/interp_method_nnn.h"#include "interpolation/methods/interp_method_spmap.h"#include "interpolation/interp_stack_config.h"#include "instance.h"#include "fields.h"#include "interpolation/interpolation_internal.h"#include "collection_selection_internal.h"
Go to the source code of this file.
Data Structures | |
| struct | field_couple_buffer |
| struct | field_couple_buffer::field_couple_field_names |
| struct | debug_config_file_buffer |
| struct | debug_config_file_buffer::debug_config_file |
| struct | interp_method_parameter_value |
| struct | interp_method_parameter |
Macros | |
| #define | CAST_NAME_TYPE_PAIRS(...) (struct yac_name_type_pair[]) {__VA_ARGS__} |
| #define | COUNT_NAME_TYPE_PAIRS(...) sizeof(CAST_NAME_TYPE_PAIRS(__VA_ARGS__)) / sizeof(struct yac_name_type_pair) |
| #define | DEF_NAME_TYPE_PAIR(NAME, TYPE) {.name = #NAME, .type = (int)(TYPE)} |
| #define | DEF_NAME_TYPE_PAIRS(NAME, ...) |
| #define | DEF_INTERP_METHOD_ADD_FUNC(NAME, FUNC) |
| #define | DEF_INTERP_METHOD_GET_FUNC(NAME, FUNC) |
| #define | DEF_ENUM_PARAM(NAME, DEFAULT, ...) |
| #define | DEF_INT_PARAM(NAME, DEFAULT, VALID_MIN, VALID_MAX) |
| #define | DEF_DBLE_PARAM(NAME, DEFAULT, VALID_MIN, VALID_MAX, ALLOW_NAN) |
| #define | DEF_DEG_PARAM(NAME, DEFAULT, VALID_MIN, VALID_MAX) |
| #define | DEF_BOOL_PARAM(NAME, DEFAULT) |
| #define | DEF_STR_PARAM(NAME, DEFAULT, MAX_STR_LEN) |
| #define | DEF_MAP_PARAM(NAME, SUBPARAMS) |
| #define | DEF_MAP_SUBPARAMS(NAME, ...) |
| #define | DEF_SEQ_PARAM(NAME, SUBPARAM) |
| #define | YAML_ASSERT(CHECK, MSG) |
| #define | YAML_ASSERT_F(CHECK, MSG, ...) |
| #define | YAML_UNREACHABLE_DEFAULT(MSG) |
| #define | YAML_UNREACHABLE_DEFAULT_F(MSG, ...) |
| #define | DEF_INTERP_STACK_ADD(NAME, ...) |
| #define | DEF_INTERP_STACK_ADD_NO_PARAM(NAME) |
| #define | DEF_INTERP_STACK_GET(NAME, ...) |
| #define | DEF_INTERP_STACK_GET_NO_PARAM(NAME) {} |
| #define | DEF_INTERP_METHOD(YAML_NAME, FUNC_ADD, FUNC_GET, ...) |
| #define | DEF_INTERP_METHOD_NO_PARAM(YAML_NAME, UI_NAME) |
| #define | ADD_INTERPOLATION(NAME, TYPE) |
| #define | ADD_INTERPOLATION_NO_PARAM(NAME, TYPE) |
Typedefs | |
| typedef struct fy_document * | fy_document_t |
| typedef struct fy_node * | fy_node_t |
| typedef struct fy_node_pair * | fy_node_pair_t |
| typedef struct interp_method_parameter_value | interp_method_parameter_value |
Functions | |
| char const * | yac_time_to_ISO (char const *time, enum yac_time_unit_type time_unit) |
| DEF_NAME_TYPE_PAIRS (yaml_base_keys, DEF_NAME_TYPE_PAIR(start_date, START_DATE), DEF_NAME_TYPE_PAIR(start_datetime, START_DATE), DEF_NAME_TYPE_PAIR(end_date, END_DATE), DEF_NAME_TYPE_PAIR(end_datetime, END_DATE), DEF_NAME_TYPE_PAIR(calendar, CALENDAR), DEF_NAME_TYPE_PAIR(timestep_unit, TIMESTEP_UNIT), DEF_NAME_TYPE_PAIR(coupling, COUPLING), DEF_NAME_TYPE_PAIR(debug, DEBUG)) | |
| DEF_INTERP_METHOD (average, DEF_INTERP_STACK_ADD(average,(enum yac_interp_avg_weight_type) parameter_value.data.map_values[0].data.enum_value, parameter_value.data.map_values[1].data.bool_value), enum yac_interp_avg_weight_type reduction_type;DEF_INTERP_STACK_GET(average, &reduction_type, ¶meter_value->data.map_values[1].data.bool_value) parameter_value->data.map_values[0].data.enum_value=(int) reduction_type;, DEF_ENUM_PARAM(weighted, YAC_INTERP_AVG_WEIGHT_TYPE_DEFAULT, DEF_NAME_TYPE_PAIR(distance_weighted, YAC_INTERP_AVG_DIST), DEF_NAME_TYPE_PAIR(arithmetic_average, YAC_INTERP_AVG_ARITHMETIC), DEF_NAME_TYPE_PAIR(barycentric_coordinate, YAC_INTERP_AVG_BARY)), DEF_BOOL_PARAM(partial_coverage, YAC_INTERP_AVG_PARTIAL_COVERAGE_DEFAULT)) DEF_INTERP_METHOD(ncc | |
| DEF_INTERP_STACK_ADD (ncc,(enum yac_interp_ncc_weight_type) parameter_value.data.map_values[0].data.enum_value, parameter_value.data.map_values[1].data.bool_value) | |
| DEF_INTERP_STACK_GET (ncc, &weight_type, ¶meter_value->data.map_values[1].data.bool_value) parameter_value -> data.map_values[0].data.enum_value=(int) weight_type | |
| DEF_ENUM_PARAM (weighted, YAC_INTERP_NCC_WEIGHT_TYPE_DEFAULT, DEF_NAME_TYPE_PAIR(arithmetic_average, YAC_INTERP_NCC_AVG), DEF_NAME_TYPE_PAIR(distance_weighted, YAC_INTERP_NCC_DIST)) | |
| DEF_BOOL_PARAM (partial_coverage, YAC_INTERP_NCC_PARTIAL_COVERAGE_DEFAULT) | |
| else | if (cell_area_value.is_set) |
| switch (weight_type) | |
| DEF_INTERP_STACK_ADD (dnn, weight_type, search_distance_type, search_distance, scale) | |
| DEF_INTERP_STACK_GET (dnn, &weight_type_get, &search_distance_type_get, &search_distance_get, &scale_get) parameter_value -> data.map_values[0].data.enum_value=(int) weight_type_get | |
| switch (weight_type_get) | |
| if (parameter_value->data.map_values[3].data.map_values==NULL) | |
| switch (search_distance_type_get) | |
| DEF_ENUM_PARAM (weighted, YAC_INTERP_DNN_WEIGHT_DEFAULT, DEF_NAME_TYPE_PAIR(distance_weighted, YAC_INTERP_DNN_WEIGHT_DIST), DEF_NAME_TYPE_PAIR(gauss_weighted, YAC_INTERP_DNN_WEIGHT_GAUSS), DEF_NAME_TYPE_PAIR(arithmetic_average, YAC_INTERP_DNN_WEIGHT_AVG), DEF_NAME_TYPE_PAIR(rbf_weighted, YAC_INTERP_DNN_WEIGHT_RBF)) | |
| DEF_DBLE_PARAM (gauss_scale, YAC_INTERP_DNN_GAUSS_SCALE_DEFAULT, -DBL_MAX, DBL_MAX, false) | |
| DEF_DBLE_PARAM (rbf_scale, YAC_INTERP_DNN_RBF_SCALE_DEFAULT, -DBL_MAX, DBL_MAX, false) | |
| DEF_MAP_PARAM (search_distance, dnn_search_distance) | |
| static void | get_cell_area_config_parameters (struct yac_spmap_cell_area_config const *cell_area_config, double *sphere_radius, char const **filename, char const **varname, int *min_global_id, char const *desc) |
| static void | parse_point_coordinates (interp_method_parameter_value const *parameters, double *lon, double *lat) |
| static struct yac_point_selection * | parse_point_selection_parameter_bnd_circle (interp_method_parameter_value const parameter) |
| DEF_MAP_SUBPARAMS (bounding_circle_center, DEF_DEG_PARAM(lon, DBL_MAX, -720.0, 720.0), DEF_DEG_PARAM(lat, DBL_MAX, -90.0, 90.0)) | |
| static struct yac_spmap_overwrite_config * | parse_overwrite_config_parameter (interp_method_parameter_value const *parameter_value, struct yac_spmap_scale_config *scale_config) |
| static void | get_point_selection_parameters (struct yac_point_selection const *point_selection, interp_method_parameter_value *parameter_value) |
| static interp_method_parameter_value | yaml_interp_method_parameter_get_default (struct interp_method_parameter parameter) |
| allocates parameter values and assigns default values based on provided interpolation parameter definition | |
| DEF_MAP_SUBPARAMS (source_to_target_map_overwrite, DEF_MAP_PARAM(condition, source_to_target_map_overwrite_condition), DEF_DEG_PARAM(spread_distance, YAC_INTERP_SPMAP_SPREAD_DISTANCE_DEFAULT, 0.0, 89.9999), DEF_DEG_PARAM(max_search_distance, YAC_INTERP_SPMAP_MAX_SEARCH_DISTANCE_DEFAULT, 0.0, 179.9999), DEF_ENUM_PARAM(weighted, YAC_INTERP_SPMAP_WEIGHTED_DEFAULT, DEF_NAME_TYPE_PAIR(distance_weighted, YAC_INTERP_SPMAP_DIST), DEF_NAME_TYPE_PAIR(arithmetic_average, YAC_INTERP_SPMAP_AVG))) | |
| DEF_MAP_SUBPARAMS (source_to_target_map_cell_area_provider_yac, DEF_DBLE_PARAM(sphere_radius, YAC_INTERP_SPMAP_SPHERE_RADIUS_DEFAULT, 1e-9, DBL_MAX, false)) | |
| static char const * | yaml_parse_string_value (fy_node_t value_node, char const *name, char const *yaml_filename) |
| static calendarType | yaml_parse_calendar_value (fy_node_t value_node, char const *key_name, char const *yaml_filename) |
| static char const * | yaml_parse_timestep_value (fy_node_t value_node, char const *key_name, char const *yaml_filename, enum yac_time_unit_type time_unit) |
| static enum yac_time_unit_type | yaml_parse_timestep_unit_value (fy_node_t value_node, char const *key_name, char const *yaml_filename) |
| static enum yac_reduction_type | yaml_parse_time_reduction_value (fy_node_t value_node, char const *key_name, char const *yaml_filename) |
| static int | yaml_parse_integer_value (fy_node_t value_node, char const *key_name, char const *yaml_filename) |
| static size_t | yaml_parse_size_t_value (fy_node_t value_node, char const *key_name, char const *yaml_filename) |
| static double | yaml_parse_double_value (fy_node_t value_node, char const *key_name, char const *yaml_filename) |
| static int | yaml_parse_enum_value (struct yac_name_type_pair const *valid_values, size_t num_valid_values, fy_node_t value_node, char const *key_name, char const *yaml_filename) |
| static void | yaml_parse_base_interp_method_node (char const **interpolation_type_str, fy_node_t *parameter_node, fy_node_t interp_method_node, char const *yaml_filename) |
| reads interpolation name and user-provided parameters from YAML node | |
| static void | yaml_interp_method_parameter_free (interp_method_parameter_value parameter_value, struct interp_method_parameter parameter) |
| free memory associated with provided interpolation parameter value | |
| static void | yaml_parse_interp_method_parameter_value (struct interp_method_parameter parameter, interp_method_parameter_value *parameter_value, fy_node_t value_node, char const *interpolation_name, char const *yaml_filename) |
| static void | yaml_parse_interp_method_map_parameter (struct interp_method_parameter map_parameter, interp_method_parameter_value *map_parameter_values, fy_node_t value_node, char const *interpolation_name, char const *yaml_filename) |
| static void | yaml_parse_interp_method_seq_parameter (struct interp_method_parameter seq_parameter, interp_method_parameter_value **seq_parameter_values, size_t *seq_parameter_count, fy_node_t value_node, char const *interpolation_name, char const *yaml_filename) |
| static void | yaml_parse_interp_method (struct yac_interp_stack_config *interp_stack, fy_node_t interp_method_node, char const *yaml_filename) |
| static void | yaml_parse_interp_stack_value (struct yac_interp_stack_config *interp_stack, fy_node_t interp_stack_node, char const *yaml_filename) |
| static struct field_couple_field_names | yaml_parse_field_name (fy_node_t field_node, const char *yaml_filename) |
| static void | yaml_parse_size_t_sequence (size_t **values, size_t *num_values, fy_node_t values_node, char const *sequence_name, const char *yaml_filename) |
| static void | yaml_parse_collection_selection_sequence (struct yac_collection_selection **collection_selection, fy_node_t values_node, char const *sequence_name, const char *yaml_filename) |
| static void | yaml_parse_string_sequence (char const ***values, size_t *num_values, fy_node_t values_node, char const *sequence_name, const char *yaml_filename) |
| static void | yaml_parse_field_names (struct field_couple_field_names **field_names, size_t *num_field_names, fy_node_t fields_node, const char *yaml_filename) |
| static void | yaml_parse_comp_grid_names (char const **comp_name, char const ***grid_names, size_t *num_grid_names, fy_node_t values_node, char const *type_name, const char *yaml_filename) |
| static void | yaml_parse_weight_file_data (char const **weight_file_name, enum yac_weight_file_on_existing *on_existing, fy_node_t values_node, char const *type_name, const char *yaml_filename) |
| static void | yaml_parse_couple_map_pair (struct field_couple_buffer *field_buffer, fy_node_pair_t couple_pair, const char *yaml_filename, enum yac_time_unit_type time_unit) |
| static void | yaml_parse_couple (struct yac_couple_config *couple_config, fy_node_t couple_node, char const *yaml_filename, enum yac_time_unit_type time_unit) |
| static void | yaml_parse_coupling (struct yac_couple_config *couple_config, fy_node_t coupling_node, char const *yaml_filename, enum yac_time_unit_type time_unit) |
| static struct debug_config_file | yaml_parse_config_file_value (fy_node_t config_file_node, char const *file_type_name, const char *yaml_filename) |
| static void | yaml_parse_debug_config_file_map_pair (struct debug_config_file_buffer *config_file_buffer, fy_node_pair_t config_file_pair, char const *config_file_type_name, const char *yaml_filename) |
| static struct debug_config_file_buffer | yaml_parse_debug_config_file_buffer (fy_node_t config_file_node, char const *config_file_type_name, char const *yaml_filename) |
| static void | yaml_parse_debug_global_config (struct yac_couple_config *couple_config, fy_node_t global_config_node, char const *yaml_filename) |
| static void | yaml_parse_output_grid_pair (char const **grid_name, char const **file_name, fy_node_pair_t output_grid_pair, char const *yaml_filename) |
| static void | yaml_parse_output_grid (struct yac_couple_config *couple_config, fy_node_t output_grid_node, char const *yaml_filename) |
| static void | yaml_parse_debug_output_grids (struct yac_couple_config *couple_config, fy_node_t output_grids_node, char const *yaml_filename) |
| static void | yaml_parse_debug_map_pair (struct yac_couple_config *couple_config, fy_node_pair_t debug_pair, const char *yaml_filename) |
| static void | yaml_parse_debug (struct yac_couple_config *couple_config, fy_node_t debug_node, char const *yaml_filename) |
| static void | yaml_parse_base_map_pair (struct yac_couple_config *couple_config, fy_node_pair_t base_pair, const char *yaml_filename, enum yac_time_unit_type *time_unit, char const **start_datetime, char const **end_datetime) |
| static void | yaml_parse_document (struct yac_couple_config *couple_config, fy_document_t document, const char *yaml_filename) |
| void | yac_yaml_read_coupling (struct yac_couple_config *couple_config, const char *yaml_filename, int parse_flags) |
| struct yac_interp_stack_config * | yac_yaml_parse_interp_stack_config_string (char const *str_interp_stack_config, int parse_flags) |
| static fy_node_t | yac_yaml_create_scalar (fy_document_t document, char const *value) |
| static fy_node_t | yac_yaml_create_scalar_int (fy_document_t document, int value) |
| static fy_node_t | yac_yaml_create_scalar_size_t (fy_document_t document, size_t value) |
| static fy_node_t | yac_yaml_create_scalar_dble (fy_document_t document, double value) |
| static fy_node_t | yac_yaml_create_sequence_scalar (fy_document_t document, char const *const *values, size_t num_values) |
| static fy_node_t | yac_yaml_create_sequence_scalar_size_t (fy_document_t document, size_t const *values, size_t num_values) |
| static void | yac_yaml_map_append (fy_node_t map, char const *key, fy_node_t value) |
| static void | yac_yaml_map_append_scalar (fy_node_t map, char const *key, char const *value) |
| static void | yac_yaml_map_append_scalar_int (fy_node_t map, char const *key, int value) |
| static void | yac_yaml_map_append_scalar_size_t (fy_node_t map, char const *key, size_t value) |
| static void | yac_yaml_map_append_scalar_dble (fy_node_t map, char const *key, double value) |
| static fy_node_t | yac_yaml_create_field_name_node (fy_document_t document, struct yac_couple_config *couple_config, size_t couple_idx, size_t field_couple_idx) |
| static fy_node_t | yac_yaml_create_scalar_parameter_node (fy_document_t document, struct interp_method_parameter parameter, interp_method_parameter_value parameter_value) |
| static void | yac_yaml_map_append_parameter (fy_document_t document, fy_node_t map, struct interp_method_parameter parameter, interp_method_parameter_value parameter_value) |
| static int | compare_parameter_values (interp_method_parameter_value const *a, interp_method_parameter_value const *b, struct interp_method_parameter parameter) |
| static fy_node_t | yac_yaml_create_non_default_map_parameter_node (fy_document_t document, interp_method_parameter_value const *map_parameter_values, struct interp_method_parameter parameter) |
| static fy_node_t | yac_yaml_create_seq_parameter_node (fy_document_t document, interp_method_parameter_value const *seq_parameter_values, size_t seq_parameter_values_count, struct interp_method_parameter parameter) |
| static fy_node_t | yac_yaml_create_interpolation_node (fy_document_t document, union yac_interp_stack_config_entry const *interp_stack_entry) |
| static fy_node_t | yac_yaml_create_interpolation_stack_node (fy_document_t document, struct yac_couple_config *couple_config, size_t couple_idx, size_t field_couple_idx) |
| static void | yac_yaml_append_couple_field_nodes (fy_node_t coupling_node, struct yac_couple_config *couple_config, size_t couple_idx, size_t field_couple_idx) |
| static void | yac_yaml_append_couple_nodes (fy_node_t coupling_node, struct yac_couple_config *couple_config, size_t couple_idx) |
| static fy_node_t | yac_yaml_create_output_grid_node (fy_document_t document, char const *grid_name, char const *file_name) |
| static fy_node_t | yac_yaml_create_output_grids_node (fy_document_t document, struct yac_couple_config *couple_config) |
| static fy_node_t | yac_yaml_create_debug_node (fy_document_t document, struct yac_couple_config *couple_config) |
| static fy_node_t | yac_yaml_create_coupling_node (fy_document_t document, struct yac_couple_config *couple_config) |
| static fy_node_t | yac_yaml_create_field_node (fy_document_t document, struct yac_couple_config *couple_config, size_t component_idx, size_t field_idx) |
| static fy_node_t | yac_yaml_create_fields_node (fy_document_t document, struct yac_couple_config *couple_config, size_t component_idx) |
| static fy_node_t | yac_yaml_create_component_node (fy_document_t document, struct yac_couple_config *couple_config, size_t component_idx) |
| static fy_node_t | yac_yaml_create_components_node (fy_document_t document, struct yac_couple_config *couple_config) |
| static fy_node_t | yac_yaml_create_grid_node (fy_document_t document, struct yac_couple_config *couple_config, size_t grid_idx) |
| static fy_node_t | yac_yaml_create_grids_node (fy_document_t document, struct yac_couple_config *couple_config) |
| static fy_node_t | yac_yaml_create_definitions_node (fy_document_t document, struct yac_couple_config *couple_config) |
| static fy_node_t | yac_yaml_create_couple_config_nodes (fy_document_t document, struct yac_couple_config *couple_config, int include_definitions) |
| char * | yac_yaml_emit_coupling (struct yac_couple_config *couple_config, int emit_flags, int include_definitions) |
Variables | |
| int const | YAC_YAML_EMITTER_DEFAULT = EMITTER_DEFAULT |
| emit to YAML format | |
| int const | YAC_YAML_EMITTER_JSON = EMITTER_JSON |
| emit to JSON format | |
| int const | YAC_YAML_PARSER_DEFAULT = PARSER_DEFAULT |
| default parse flags (YAML format) | |
| int const | YAC_YAML_PARSER_JSON_AUTO = PARSER_JSON_AUTO |
| int const | YAC_YAML_PARSER_JSON_FORCE = PARSER_JSON_FORCE |
| assume JSON format | |
| enum yac_interp_ncc_weight_type | weight_type |
| else | |
| search_distance = YAC_INTERP_DNN_SEARCH_DISTANCE_DEFAULT | |
| double | scale |
| enum yac_interp_dnn_weight_type | weight_type_get |
| enum yac_interp_dnn_search_distance_type | search_distance_type_get |
| double | search_distance_get |
| double | scale_get |
| const | interpolation_methods [] |
| #define ADD_INTERPOLATION | ( | NAME, | |
| TYPE ) |
| #define ADD_INTERPOLATION_NO_PARAM | ( | NAME, | |
| TYPE ) |
| #define CAST_NAME_TYPE_PAIRS | ( | ... | ) | (struct yac_name_type_pair[]) {__VA_ARGS__} |
Definition at line 186 of file config_yaml.c.
| #define COUNT_NAME_TYPE_PAIRS | ( | ... | ) | sizeof(CAST_NAME_TYPE_PAIRS(__VA_ARGS__)) / sizeof(struct yac_name_type_pair) |
Definition at line 187 of file config_yaml.c.
| #define DEF_BOOL_PARAM | ( | NAME, | |
| DEFAULT ) |
Definition at line 463 of file config_yaml.c.
| #define DEF_DBLE_PARAM | ( | NAME, | |
| DEFAULT, | |||
| VALID_MIN, | |||
| VALID_MAX, | |||
| ALLOW_NAN ) |
Definition at line 446 of file config_yaml.c.
| #define DEF_DEG_PARAM | ( | NAME, | |
| DEFAULT, | |||
| VALID_MIN, | |||
| VALID_MAX ) |
Definition at line 455 of file config_yaml.c.
| #define DEF_ENUM_PARAM | ( | NAME, | |
| DEFAULT, | |||
| ... ) |
Definition at line 432 of file config_yaml.c.
| #define DEF_INT_PARAM | ( | NAME, | |
| DEFAULT, | |||
| VALID_MIN, | |||
| VALID_MAX ) |
Definition at line 439 of file config_yaml.c.
| #define DEF_INTERP_METHOD | ( | YAML_NAME, | |
| FUNC_ADD, | |||
| FUNC_GET, | |||
| ... ) |
Definition at line 524 of file config_yaml.c.
| #define DEF_INTERP_METHOD_ADD_FUNC | ( | NAME, | |
| FUNC ) |
generates routine, which adds an interpolation based on a list of interpolation parameters to an interpolation stack
Definition at line 409 of file config_yaml.c.
| #define DEF_INTERP_METHOD_GET_FUNC | ( | NAME, | |
| FUNC ) |
generates a routine, which gets interpolation parameters from a interpolation stack entry
Definition at line 421 of file config_yaml.c.
| #define DEF_INTERP_METHOD_NO_PARAM | ( | YAML_NAME, | |
| UI_NAME ) |
Definition at line 529 of file config_yaml.c.
| #define DEF_INTERP_STACK_ADD | ( | NAME, | |
| ... ) |
Definition at line 509 of file config_yaml.c.
| #define DEF_INTERP_STACK_ADD_NO_PARAM | ( | NAME | ) |
Definition at line 513 of file config_yaml.c.
| #define DEF_INTERP_STACK_GET | ( | NAME, | |
| ... ) |
Definition at line 517 of file config_yaml.c.
| #define DEF_INTERP_STACK_GET_NO_PARAM | ( | NAME | ) | {} |
Definition at line 521 of file config_yaml.c.
| #define DEF_MAP_PARAM | ( | NAME, | |
| SUBPARAMS ) |
Definition at line 472 of file config_yaml.c.
| #define DEF_MAP_SUBPARAMS | ( | NAME, | |
| ... ) |
Definition at line 478 of file config_yaml.c.
Definition at line 189 of file config_yaml.c.
| #define DEF_NAME_TYPE_PAIRS | ( | NAME, | |
| ... ) |
Definition at line 190 of file config_yaml.c.
| #define DEF_SEQ_PARAM | ( | NAME, | |
| SUBPARAM ) |
Definition at line 484 of file config_yaml.c.
| #define DEF_STR_PARAM | ( | NAME, | |
| DEFAULT, | |||
| MAX_STR_LEN ) |
Definition at line 467 of file config_yaml.c.
| #define YAML_ASSERT | ( | CHECK, | |
| MSG ) |
Definition at line 492 of file config_yaml.c.
| #define YAML_ASSERT_F | ( | CHECK, | |
| MSG, | |||
| ... ) |
Definition at line 496 of file config_yaml.c.
| #define YAML_UNREACHABLE_DEFAULT | ( | MSG | ) |
Definition at line 500 of file config_yaml.c.
| #define YAML_UNREACHABLE_DEFAULT_F | ( | MSG, | |
| ... ) |
Definition at line 504 of file config_yaml.c.
| typedef struct fy_document* fy_document_t |
Definition at line 56 of file config_yaml.c.
| typedef struct fy_node_pair* fy_node_pair_t |
Definition at line 58 of file config_yaml.c.
| typedef struct fy_node* fy_node_t |
Definition at line 57 of file config_yaml.c.
| typedef struct interp_method_parameter_value interp_method_parameter_value |
| anonymous enum |
| Enumerator | |
|---|---|
| EMITTER_DEFAULT | |
| EMITTER_JSON | |
| PARSER_DEFAULT | |
| PARSER_JSON_AUTO | |
| PARSER_JSON_FORCE | |
Definition at line 60 of file config_yaml.c.
| anonymous enum |
| Enumerator | |
|---|---|
| NUM_INTERPOLATION_METHODS | |
Definition at line 1413 of file config_yaml.c.
| enum yaml_base_key_types |
| Enumerator | |
|---|---|
| START_DATE | |
| END_DATE | |
| CALENDAR | |
| TIMESTEP_UNIT | |
| COUPLING | |
| DEBUG | |
Definition at line 112 of file config_yaml.c.
| Enumerator | |
|---|---|
| COMP_NAME | |
| GRID_NAMES | |
Definition at line 162 of file config_yaml.c.
Definition at line 121 of file config_yaml.c.
| enum yaml_debug_key_types |
| Enumerator | |
|---|---|
| GLOBAL_CONFIG | |
| GLOBAL_DEFS | |
| OUTPUT_GRIDS | |
| MISSING_DEF | |
Definition at line 148 of file config_yaml.c.
| Enumerator | |
|---|---|
| OUTPUT_GRID_GRID_NAME | |
| OUTPUT_GRID_FILE_NAME | |
Definition at line 181 of file config_yaml.c.
| Enumerator | |
|---|---|
| SYNC_LOC_DEF_COMP | |
| SYNC_LOC_SYNC_DEF | |
| SYNC_LOC_ENDDEF | |
| SYNC_LOC_COUNT | |
Definition at line 155 of file config_yaml.c.
| Enumerator | |
|---|---|
| WEIGHT_FILE_DATA_NAME | |
| WEIGHT_FILE_DATA_ON_EXISTING | |
Definition at line 167 of file config_yaml.c.
|
static |
| DEF_BOOL_PARAM | ( | partial_coverage | , |
| YAC_INTERP_NCC_PARTIAL_COVERAGE_DEFAULT | ) |
Definition at line 577 of file config_yaml.c.
| DEF_DBLE_PARAM | ( | gauss_scale | , |
| YAC_INTERP_DNN_GAUSS_SCALE_DEFAULT | , | ||
| - | DBL_MAX, | ||
| DBL_MAX | , | ||
| false | ) |
| DEF_DBLE_PARAM | ( | rbf_scale | , |
| YAC_INTERP_DNN_RBF_SCALE_DEFAULT | , | ||
| - | DBL_MAX, | ||
| DBL_MAX | , | ||
| false | ) |
| DEF_ENUM_PARAM | ( | weighted | , |
| YAC_INTERP_DNN_WEIGHT_DEFAULT | , | ||
| DEF_NAME_TYPE_PAIR(distance_weighted, YAC_INTERP_DNN_WEIGHT_DIST) | , | ||
| DEF_NAME_TYPE_PAIR(gauss_weighted, YAC_INTERP_DNN_WEIGHT_GAUSS) | , | ||
| DEF_NAME_TYPE_PAIR(arithmetic_average, YAC_INTERP_DNN_WEIGHT_AVG) | , | ||
| DEF_NAME_TYPE_PAIR(rbf_weighted, YAC_INTERP_DNN_WEIGHT_RBF) | ) |
| DEF_ENUM_PARAM | ( | weighted | , |
| YAC_INTERP_NCC_WEIGHT_TYPE_DEFAULT | , | ||
| DEF_NAME_TYPE_PAIR(arithmetic_average, YAC_INTERP_NCC_AVG) | , | ||
| DEF_NAME_TYPE_PAIR(distance_weighted, YAC_INTERP_NCC_DIST) | ) |
| DEF_INTERP_METHOD | ( | average | , |
| DEF_INTERP_STACK_ADD(average,(enum yac_interp_avg_weight_type) parameter_value.data.map_values[0].data.enum_value, parameter_value.data.map_values[1].data.bool_value) | , | ||
| enum yac_interp_avg_weight_type reduction_type;DEF_INTERP_STACK_GET(average, &reduction_type, ¶meter_value->data.map_values[1].data.bool_value) parameter_value->data.map_values.data. | enum_value[0] = (int)reduction_type;, | ||
| DEF_ENUM_PARAM( weighted, YAC_INTERP_AVG_WEIGHT_TYPE_DEFAULT, DEF_NAME_TYPE_PAIR(distance_weighted, YAC_INTERP_AVG_DIST), DEF_NAME_TYPE_PAIR(arithmetic_average, YAC_INTERP_AVG_ARITHMETIC), DEF_NAME_TYPE_PAIR(barycentric_coordinate, YAC_INTERP_AVG_BARY)) | , | ||
| DEF_BOOL_PARAM( partial_coverage, YAC_INTERP_AVG_PARTIAL_COVERAGE_DEFAULT) | ) |
| DEF_INTERP_STACK_ADD | ( | dnn | , |
| weight_type | , | ||
| search_distance_type | , | ||
| search_distance | , | ||
| scale | ) |
| DEF_INTERP_STACK_ADD | ( | ncc | , |
| (enum yac_interp_ncc_weight_type) parameter_value.data.map_values.data. | enum_value[0], | ||
| parameter_value.data.map_values.data. | bool_value[1] ) |
| DEF_INTERP_STACK_GET | ( | dnn | , |
| & | weight_type_get, | ||
| & | search_distance_type_get, | ||
| & | search_distance_get, | ||
| & | scale_get ) -> data.map_values[0].data.enum_value=(int) weight_type_get |
| DEF_INTERP_STACK_GET | ( | ncc | , |
| & | weight_type, | ||
| ¶meter_value->data.map_values.data. | bool_value[1] ) -> data.map_values[0].data.enum_value=(int) weight_type |
| DEF_MAP_PARAM | ( | search_distance | , |
| dnn_search_distance | ) |
| DEF_MAP_SUBPARAMS | ( | bounding_circle_center | , |
| DEF_DEG_PARAM(lon, DBL_MAX, -720.0, 720.0) | , | ||
| DEF_DEG_PARAM(lat, DBL_MAX, -90.0, 90.0) | ) |
| DEF_MAP_SUBPARAMS | ( | source_to_target_map_cell_area_provider_yac | , |
| DEF_DBLE_PARAM( sphere_radius, YAC_INTERP_SPMAP_SPHERE_RADIUS_DEFAULT, 1e-9, DBL_MAX, false) | ) |
Definition at line 1091 of file config_yaml.c.
| DEF_MAP_SUBPARAMS | ( | source_to_target_map_overwrite | , |
| DEF_MAP_PARAM(condition, source_to_target_map_overwrite_condition) | , | ||
| DEF_DEG_PARAM( spread_distance, YAC_INTERP_SPMAP_SPREAD_DISTANCE_DEFAULT, 0.0, 89.9999) | , | ||
| DEF_DEG_PARAM( max_search_distance, YAC_INTERP_SPMAP_MAX_SEARCH_DISTANCE_DEFAULT, 0.0, 179.9999) | , | ||
| DEF_ENUM_PARAM( weighted, YAC_INTERP_SPMAP_WEIGHTED_DEFAULT, DEF_NAME_TYPE_PAIR(distance_weighted, YAC_INTERP_SPMAP_DIST), DEF_NAME_TYPE_PAIR(arithmetic_average, YAC_INTERP_SPMAP_AVG)) | ) |
parameter_value[0] condition parameter_value[1] spread_distance parameter_value[2] max_search_distance parameter_value[3] weighted
Definition at line 1045 of file config_yaml.c.
| DEF_NAME_TYPE_PAIRS | ( | yaml_base_keys | , |
| DEF_NAME_TYPE_PAIR(start_date, START_DATE) | , | ||
| DEF_NAME_TYPE_PAIR(start_datetime, START_DATE) | , | ||
| DEF_NAME_TYPE_PAIR(end_date, END_DATE) | , | ||
| DEF_NAME_TYPE_PAIR(end_datetime, END_DATE) | , | ||
| DEF_NAME_TYPE_PAIR(calendar, CALENDAR) | , | ||
| DEF_NAME_TYPE_PAIR(timestep_unit, TIMESTEP_UNIT) | , | ||
| DEF_NAME_TYPE_PAIR(coupling, COUPLING) | , | ||
| DEF_NAME_TYPE_PAIR(debug, DEBUG) | ) |
Definition at line 194 of file config_yaml.c.
|
static |
|
static |
parameter_value[0] condition parameter_value[0][0] bnd_circle parameter_value[0][0][0] center parameter_value[0][0][0][0] lon parameter_value[0][0][0][1] lat parameter_value[0][0][1] radius
Definition at line 998 of file config_yaml.c.

| else if | ( | cell_area_value. | is_set | ) |
| if | ( | parameter_value->data.map_values.data. | map_values[3] = = NULL | ) |
Definition at line 731 of file config_yaml.c.
|
static |
parameter_value[0] condition parameter_value[0][0] bnd_circle parameter_value[0][0][0] center parameter_value[0][0][0][0] lon parameter_value[0][0][0][1] lat parameter_value[0][0][1] radius
Definition at line 960 of file config_yaml.c.

|
static |
|
static |
Definition at line 892 of file config_yaml.c.


| switch | ( | search_distance_type_get | ) |
Definition at line 737 of file config_yaml.c.
| switch | ( | weight_type | ) |
Definition at line 674 of file config_yaml.c.
| switch | ( | weight_type_get | ) |
Definition at line 705 of file config_yaml.c.
| char const * yac_time_to_ISO | ( | char const * | time, |
| enum yac_time_unit_type | time_unit ) |
|
static |
Definition at line 3700 of file config_yaml.c.


|
static |
Definition at line 3945 of file config_yaml.c.


|
static |
Definition at line 4175 of file config_yaml.c.


|
static |
Definition at line 4206 of file config_yaml.c.


|
static |
Definition at line 4310 of file config_yaml.c.


|
static |
Definition at line 4056 of file config_yaml.c.


|
static |
Definition at line 4028 of file config_yaml.c.


|
static |
Definition at line 4288 of file config_yaml.c.


|
static |
Definition at line 3295 of file config_yaml.c.


|
static |
Definition at line 4078 of file config_yaml.c.


|
static |
Definition at line 4146 of file config_yaml.c.


|
static |
Definition at line 4235 of file config_yaml.c.


|
static |
Definition at line 4260 of file config_yaml.c.


|
static |
Definition at line 3604 of file config_yaml.c.


|
static |
Definition at line 3658 of file config_yaml.c.


|
static |
Definition at line 3510 of file config_yaml.c.


|
static |
Definition at line 3958 of file config_yaml.c.


|
static |
Definition at line 3982 of file config_yaml.c.


|
static |
|
static |
Definition at line 3139 of file config_yaml.c.


|
static |
Definition at line 3111 of file config_yaml.c.


|
static |
Definition at line 3324 of file config_yaml.c.


|
static |
Definition at line 3125 of file config_yaml.c.


|
static |
Definition at line 3430 of file config_yaml.c.


|
static |
Definition at line 3153 of file config_yaml.c.


|
static |
Definition at line 3184 of file config_yaml.c.


| char * yac_yaml_emit_coupling | ( | struct yac_couple_config * | couple_config, |
| int | emit_flags, | ||
| int | include_definitions ) |
Emit coupling configuration to string
| [in] | couple_config | coupling configuration |
| [in] | emit_flags | flags to be used for emitting the coupling configuration |
| [in] | include_definitions | include debug definitions (components, grids, and fields) in the output file |
Definition at line 4376 of file config_yaml.c.


Definition at line 3225 of file config_yaml.c.


|
static |
Definition at line 3373 of file config_yaml.c.


|
static |
Definition at line 3248 of file config_yaml.c.


|
static |
Definition at line 3283 of file config_yaml.c.


|
static |
Definition at line 3259 of file config_yaml.c.


|
static |
Definition at line 3271 of file config_yaml.c.


| struct yac_interp_stack_config * yac_yaml_parse_interp_stack_config_string | ( | char const * | interp_stack_config, |
| int | parse_flags ) |
Parse a "0"-terminated string that contains an interpolation stack configuration
| [in] | interp_stack_config | string containing interpolation stack configuration |
| [in] | parse_flags | flags to be used for parsing the string |
Definition at line 3052 of file config_yaml.c.


| void yac_yaml_read_coupling | ( | struct yac_couple_config * | couple_config, |
| const char * | yaml_filename, | ||
| int | parse_flags ) |
Reader for yaml while, which parses the given yaml file and adds the coupling from the file to the coupling configuration data
| [in,out] | couple_config | coupling configuration data |
| [in] | yaml_filename | name of yaml configuration file |
| [in] | parse_flags | flags to be used for parsing the configuration file |
Definition at line 3003 of file config_yaml.c.


|
static |
free memory associated with provided interpolation parameter value
| parameter_value | parameter values to be freed |
| parameter | parameter definition associated with the values |
Definition at line 1700 of file config_yaml.c.


|
static |
allocates parameter values and assigns default values based on provided interpolation parameter definition
| [in] | parameter | parameter definition |
Definition at line 1647 of file config_yaml.c.


|
static |
reads interpolation name and user-provided parameters from YAML node
| [out] | interpolation_type_str | name of the interpolation |
| [out] | parameter_node | YAML node containing user-provided interpolation method configuration |
| [in] | interp_method_node | YAML node containing interpolation |
| [in] | yaml_filename | name of the YAML file (used for error messages) |
Definition at line 1589 of file config_yaml.c.


|
static |
Definition at line 2902 of file config_yaml.c.


|
static |
Definition at line 1430 of file config_yaml.c.


|
static |
Definition at line 2121 of file config_yaml.c.


|
static |
Definition at line 2200 of file config_yaml.c.


|
static |
Definition at line 2596 of file config_yaml.c.


|
static |
Definition at line 2451 of file config_yaml.c.


|
static |
Definition at line 2303 of file config_yaml.c.


|
static |
Definition at line 2575 of file config_yaml.c.


|
static |
Definition at line 2882 of file config_yaml.c.


|
static |
Definition at line 2705 of file config_yaml.c.


|
static |
Definition at line 2673 of file config_yaml.c.


|
static |
Definition at line 2743 of file config_yaml.c.


|
static |
Definition at line 2848 of file config_yaml.c.


|
static |
Definition at line 2829 of file config_yaml.c.


|
static |
Definition at line 2964 of file config_yaml.c.


|
static |
Definition at line 1544 of file config_yaml.c.


|
static |
Definition at line 1561 of file config_yaml.c.


|
static |
Definition at line 2043 of file config_yaml.c.


|
static |
Definition at line 2175 of file config_yaml.c.


|
static |
Definition at line 1507 of file config_yaml.c.


|
static |
Definition at line 1984 of file config_yaml.c.


|
static |
Parses a YAML map parameter node
| [out] | map_parameter | parameter map configuration |
| [in,out] | map_parameter_values | values of map parameters |
| [in] | value_node | YAML containing the map data |
| [in] | interpolation_name | name of the interpolation (used for error messages) |
| [in] | yaml_filename | name of the YAML file (used for error messages) |
Definition at line 1764 of file config_yaml.c.


|
static |
reads a user-provided parameter value. Afterwards this value is converted to the associated data-type and it is check for validity.
| [in] | parameter | configuration of the parameter |
| [out] | parameter_value | parsed user-provided parameter value |
| [in] | value_node | YAML node containing the user-provoided paramter value |
| [in] | interpolation_name | name of the interpolation (used for error messages) |
| [in] | yaml_filename | name of the user-provided yaml file (used for error messages) |
Definition at line 1867 of file config_yaml.c.


|
static |
Parses a YAML sequence parameter node
| [in] | seq_parameter | sequence parameter configuration |
| [out] | seq_parameter_values | value of the sequence |
| [out] | seq_parameter_count | number of entries in the sequence |
| [in] | value_node | YAML node containing the sequence |
| [in] | interpolation_name | name of the interpolation (used for error messages) |
| [in] | yaml_filename | name of the YAML file (used for error messages) |
Definition at line 1820 of file config_yaml.c.


|
static |
Definition at line 2024 of file config_yaml.c.


|
static |
Definition at line 2802 of file config_yaml.c.


|
static |
Definition at line 2769 of file config_yaml.c.


|
static |
Definition at line 2089 of file config_yaml.c.


|
static |
Definition at line 1525 of file config_yaml.c.


|
static |
Definition at line 2145 of file config_yaml.c.


|
static |
|
static |
Definition at line 1489 of file config_yaml.c.


|
static |
Definition at line 1471 of file config_yaml.c.


|
static |
Definition at line 1448 of file config_yaml.c.


|
static |
Definition at line 2249 of file config_yaml.c.


| else |
Definition at line 667 of file config_yaml.c.
| const interpolation_methods[] |
Definition at line 1399 of file config_yaml.c.
| double scale |
Definition at line 673 of file config_yaml.c.
| double scale_get |
Definition at line 697 of file config_yaml.c.
| search_distance = YAC_INTERP_DNN_SEARCH_DISTANCE_DEFAULT |
Definition at line 669 of file config_yaml.c.
| double search_distance_get |
Definition at line 696 of file config_yaml.c.
| enum yac_interp_dnn_search_distance_type search_distance_type_get |
Definition at line 695 of file config_yaml.c.
Definition at line 564 of file config_yaml.c.
| enum yac_interp_dnn_weight_type weight_type_get |
Definition at line 694 of file config_yaml.c.
| int const YAC_YAML_EMITTER_DEFAULT = EMITTER_DEFAULT |
emit to YAML format
Definition at line 68 of file config_yaml.c.
| int const YAC_YAML_EMITTER_JSON = EMITTER_JSON |
emit to JSON format
Definition at line 69 of file config_yaml.c.
| int const YAC_YAML_PARSER_DEFAULT = PARSER_DEFAULT |
default parse flags (YAML format)
Definition at line 70 of file config_yaml.c.
| int const YAC_YAML_PARSER_JSON_AUTO = PARSER_JSON_AUTO |
switch to JSON format, if indicated by file extension
Definition at line 71 of file config_yaml.c.
| int const YAC_YAML_PARSER_JSON_FORCE = PARSER_JSON_FORCE |
assume JSON format
Definition at line 72 of file config_yaml.c.