YetAnotherCoupler 3.5.2
|
#include "config.h"
#include <libfyaml.h>
#include <stdlib.h>
#include <string.h>
#include <stdbool.h>
#include "yac.h"
#include "utils_mci.h"
#include "config_yaml.h"
#include "mtime_calendar.h"
#include "geometry.h"
#include "io_utils.h"
#include "interp_method_avg.h"
#include "interp_method_callback.h"
#include "interp_method_check.h"
#include "interp_method_conserv.h"
#include "interp_method_creep.h"
#include "interp_method_file.h"
#include "interp_method_fixed.h"
#include "interp_method_hcsbb.h"
#include "interp_method_ncc.h"
#include "interp_method_nnn.h"
#include "interp_method_spmap.h"
#include "interp_stack_config.h"
#include "instance.h"
#include "fields.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 |
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) |
#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_INTERP_METHOD_PARAM(NAME, ...) |
#define | YAML_ASSERT(CHECK, MSG) |
#define | YAML_ASSERT_F(CHECK, 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(NAME, FUNC_ADD, FUNC_GET, ...) |
#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 |
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(end_date, 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) parameters[0].enum_value, parameters[1].bool_value), enum yac_interp_avg_weight_type reduction_type;DEF_INTERP_STACK_GET(average, &reduction_type, ¶meter_values[1].bool_value) parameter_values[0].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) parameters[0].enum_value, parameters[1].bool_value) | |
DEF_INTERP_STACK_GET (ncc, &weight_type, ¶meter_values[1].bool_value) parameter_values[0].enum_value | |
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) | |
DEF_INTERP_METHOD (source_to_target_map, double src_sphere_radius=parameters[4].dble_value;char const *src_filename=parameters[5].str_value;char const *src_varname=parameters[6].str_value;int src_min_global_id=parameters[7].int_value;double tgt_sphere_radius=parameters[8].dble_value;char const *tgt_filename=parameters[9].str_value;char const *tgt_varname=parameters[10].str_value;int tgt_min_global_id=parameters[11].int_value;get_spmap_parameters(&src_sphere_radius, src_filename, src_varname, routine_name, yaml_filename, "source");get_spmap_parameters(&tgt_sphere_radius, tgt_filename, tgt_varname, routine_name, yaml_filename, "target");DEF_INTERP_STACK_ADD(spmap, parameters[0].dble_value, parameters[1].dble_value,(enum yac_interp_spmap_weight_type) parameters[2].enum_value,(enum yac_interp_spmap_scale_type) parameters[3].enum_value, src_sphere_radius, src_filename, src_varname, src_min_global_id, tgt_sphere_radius, tgt_filename, tgt_varname, tgt_min_global_id), enum yac_interp_spmap_weight_type weight_type;enum yac_interp_spmap_scale_type scale_type;DEF_INTERP_STACK_GET(spmap, ¶meter_values[0].dble_value, ¶meter_values[1].dble_value, &weight_type, &scale_type, ¶meter_values[4].dble_value, ¶meter_values[5].str_value, ¶meter_values[6].str_value, ¶meter_values[7].int_value, ¶meter_values[8].dble_value, ¶meter_values[9].str_value, ¶meter_values[10].str_value, ¶meter_values[11].int_value) parameter_values[0].dble_value/=YAC_RAD;parameter_values[1].dble_value/=YAC_RAD;parameter_values[2].enum_value=(int) weight_type;parameter_values[3].enum_value=(int) scale_type;, 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_ENUM_PARAM(scale, YAC_INTERP_SPMAP_SCALE_TYPE_DEFAULT, DEF_NAME_TYPE_PAIR(none, YAC_INTERP_SPMAP_NONE), DEF_NAME_TYPE_PAIR(srcarea, YAC_INTERP_SPMAP_SRCAREA), DEF_NAME_TYPE_PAIR(invtgtarea, YAC_INTERP_SPMAP_INVTGTAREA), DEF_NAME_TYPE_PAIR(fracarea, YAC_INTERP_SPMAP_FRACAREA)), DEF_DBLE_PARAM(src_cell_area:yac:sphere_radius, 0.0, 1e-9, DBL_MAX), DEF_STR_PARAM(src_cell_area:file:filename, NULL, YAC_MAX_FILE_NAME_LENGTH), DEF_STR_PARAM(src_cell_area:file:varname, NULL, 128), DEF_INT_PARAM(src_cell_area:file:min_global_id, YAC_INTERP_SPMAP_MIN_GLOBAL_ID_DEFAULT, -INT_MAX, INT_MAX), DEF_DBLE_PARAM(tgt_cell_area:yac:sphere_radius, 0.0, 1e-9, DBL_MAX), DEF_STR_PARAM(tgt_cell_area:file:filename, NULL, YAC_MAX_FILE_NAME_LENGTH), DEF_STR_PARAM(tgt_cell_area:file:varname, NULL, 128), DEF_INT_PARAM(tgt_cell_area:file:min_global_id, YAC_INTERP_SPMAP_MIN_GLOBAL_ID_DEFAULT, -INT_MAX, INT_MAX)) DEF_INTERP_METHOD(fixed | |
YAML_ASSERT (parameters[0].dble_value !=DBL_MAX, "parameter 'user_value' of interpolation method 'fixed' is unset") | |
DEF_INTERP_STACK_ADD (fixed, parameters[0].dble_value) | |
DEF_INTERP_STACK_GET (fixed, ¶meter_values[0].dble_value) | |
DEF_DBLE_PARAM (user_value, YAC_INTERP_FIXED_VALUE_DEFAULT, -DBL_MAX, DBL_MAX)) DEF_INTERP_METHOD(user_file | |
YAML_ASSERT (parameters[0].str_value, "parameter \"filename\" of interpolation method \"user file\" is unset") DEF_INTERP_STACK_ADD(user_file | |
char *parameters[0] | DEF_INTERP_STACK_GET (user_file, ¶meter_values[0].str_value) |
char *parameters[0] | DEF_STR_PARAM (filename, YAC_INTERP_FILE_WEIGHT_FILE_NAME_DEFAULT, YAC_MAX_FILE_NAME_LENGTH) |
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 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) |
static interp_method_parameter_value | yaml_parse_interp_method_parameter_value (struct interp_method_parameter const *parameter, fy_node_t value_node, char const *interpolation_name, char const *yaml_filename) |
static void | yaml_parse_interp_method_parameter (interp_method_parameter_value *parameter_values, struct interp_method_parameter const *parameters, size_t num_parameters, fy_node_pair_t parameter_pair, char const *interpolation_name, char const *parameter_name_prefix, char const *yaml_filename) |
static void | yaml_parse_interp_method_parameters (interp_method_parameter_value *parameter_values, struct yac_interpolation_method const *interp_method, fy_node_t parameter_node, 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_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_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_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 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_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 void | yac_yaml_map_append_parameter (fy_node_t map, struct interp_method_parameter const *parameter, interp_method_parameter_value value) |
static int | compare_parameter_values (interp_method_parameter_value const *a, interp_method_parameter_value const *b, enum interp_method_parameter_value_type type) |
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 | |
interp_method_parameter_value | |
enum yac_interp_ncc_weight_type | weight_type |
char *parameters[0] | str_value |
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 165 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 166 of file config_yaml.c.
#define DEF_BOOL_PARAM | ( | NAME, | |
DEFAULT ) |
Definition at line 398 of file config_yaml.c.
#define DEF_DBLE_PARAM | ( | NAME, | |
DEFAULT, | |||
VALID_MIN, | |||
VALID_MAX ) |
Definition at line 384 of file config_yaml.c.
#define DEF_DEG_PARAM | ( | NAME, | |
DEFAULT, | |||
VALID_MIN, | |||
VALID_MAX ) |
Definition at line 391 of file config_yaml.c.
#define DEF_ENUM_PARAM | ( | NAME, | |
DEFAULT, | |||
... ) |
Definition at line 370 of file config_yaml.c.
#define DEF_INT_PARAM | ( | NAME, | |
DEFAULT, | |||
VALID_MIN, | |||
VALID_MAX ) |
Definition at line 377 of file config_yaml.c.
#define DEF_INTERP_METHOD | ( | NAME, | |
FUNC_ADD, | |||
FUNC_GET, | |||
... ) |
Definition at line 435 of file config_yaml.c.
#define DEF_INTERP_METHOD_ADD_FUNC | ( | NAME, | |
FUNC ) |
Definition at line 350 of file config_yaml.c.
#define DEF_INTERP_METHOD_GET_FUNC | ( | NAME, | |
FUNC ) |
Definition at line 360 of file config_yaml.c.
#define DEF_INTERP_METHOD_PARAM | ( | NAME, | |
... ) |
Definition at line 407 of file config_yaml.c.
#define DEF_INTERP_STACK_ADD | ( | NAME, | |
... ) |
Definition at line 420 of file config_yaml.c.
#define DEF_INTERP_STACK_ADD_NO_PARAM | ( | NAME | ) |
Definition at line 424 of file config_yaml.c.
#define DEF_INTERP_STACK_GET | ( | NAME, | |
... ) |
Definition at line 428 of file config_yaml.c.
#define DEF_INTERP_STACK_GET_NO_PARAM | ( | NAME | ) | {} |
Definition at line 432 of file config_yaml.c.
#define DEF_NAME_TYPE_PAIR | ( | NAME, | |
TYPE ) {.name = #NAME, .type = (int)(TYPE)} |
Definition at line 168 of file config_yaml.c.
#define DEF_NAME_TYPE_PAIRS | ( | NAME, | |
... ) |
Definition at line 169 of file config_yaml.c.
#define DEF_STR_PARAM | ( | NAME, | |
DEFAULT, | |||
MAX_STR_LEN ) |
Definition at line 402 of file config_yaml.c.
#define YAML_ASSERT | ( | CHECK, | |
MSG ) |
Definition at line 411 of file config_yaml.c.
#define YAML_ASSERT_F | ( | CHECK, | |
MSG, | |||
... ) |
Definition at line 415 of file config_yaml.c.
typedef struct fy_document* fy_document_t |
Definition at line 51 of file config_yaml.c.
typedef struct fy_node_pair* fy_node_pair_t |
Definition at line 53 of file config_yaml.c.
typedef struct fy_node* fy_node_t |
Definition at line 52 of file config_yaml.c.
anonymous enum |
Enumerator | |
---|---|
EMITTER_DEFAULT | |
EMITTER_JSON | |
PARSER_DEFAULT | |
PARSER_JSON_AUTO | |
PARSER_JSON_FORCE |
Definition at line 55 of file config_yaml.c.
anonymous enum |
Enumerator | |
---|---|
NUM_INTERPOLATION_METHODS |
Definition at line 754 of file config_yaml.c.
Enumerator | |
---|---|
ENUM_PARAM | |
INT_PARAM | |
DBLE_PARAM | |
BOOL_PARAM | |
STR_PARAM | |
DEG_PARAM |
Definition at line 306 of file config_yaml.c.
enum yaml_base_key_types |
Enumerator | |
---|---|
START_DATE | |
END_DATE | |
CALENDAR | |
TIMESTEP_UNIT | |
COUPLING | |
DEBUG |
Definition at line 100 of file config_yaml.c.
Enumerator | |
---|---|
COMP_NAME | |
GRID_NAMES |
Definition at line 146 of file config_yaml.c.
Definition at line 109 of file config_yaml.c.
enum yaml_debug_key_types |
Enumerator | |
---|---|
GLOBAL_CONFIG | |
GLOBAL_DEFS | |
OUTPUT_GRIDS | |
MISSING_DEF |
Definition at line 132 of file config_yaml.c.
Enumerator | |
---|---|
OUTPUT_GRID_GRID_NAME | |
OUTPUT_GRID_FILE_NAME |
Definition at line 160 of file config_yaml.c.
Enumerator | |
---|---|
SYNC_LOC_DEF_COMP | |
SYNC_LOC_SYNC_DEF | |
SYNC_LOC_ENDDEF | |
SYNC_LOC_COUNT |
Definition at line 139 of file config_yaml.c.
|
static |
DEF_BOOL_PARAM | ( | partial_coverage | , |
YAC_INTERP_NCC_PARTIAL_COVERAGE_DEFAULT | ) |
Definition at line 470 of file config_yaml.c.
DEF_DBLE_PARAM | ( | user_value | , |
YAC_INTERP_FIXED_VALUE_DEFAULT | , | ||
- | DBL_MAX, | ||
DBL_MAX | ) |
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) parameters[0].enum_value, parameters[1].bool_value) | , | ||
enum yac_interp_avg_weight_type reduction_type;DEF_INTERP_STACK_GET(average, &reduction_type, ¶meter_values[1].bool_value) parameter_values. | 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_METHOD | ( | source_to_target_map | , |
double | src_sphere_radius = parameters[4].dble_value; char const * src_filename = parameters[5].str_value; char const * src_varname = parameters[6].str_value; int src_min_global_id = parameters[7].int_value; double tgt_sphere_radius = parameters[8].dble_value; char const * tgt_filename = parameters[9].str_value; char const * tgt_varname = parameters[10].str_value; int tgt_min_global_id = parameters[11].int_value; get_spmap_parameters( &src_sphere_radius, src_filename, src_varname, routine_name, yaml_filename, "source"); get_spmap_parameters( &tgt_sphere_radius, tgt_filename, tgt_varname, routine_name, yaml_filename, "target"); DEF_INTERP_STACK_ADD(spmap, parameters[0].dble_value, parameters[1].dble_value, (enum yac_interp_spmap_weight_type)parameters[2].enum_value, (enum yac_interp_spmap_scale_type)parameters[3].enum_value, src_sphere_radius, src_filename, src_varname, src_min_global_id, tgt_sphere_radius, tgt_filename, tgt_varname, tgt_min_global_id), | ||
enum yac_interp_spmap_weight_type weight_type;enum yac_interp_spmap_scale_type scale_type;DEF_INTERP_STACK_GET(spmap, ¶meter_values[0].dble_value, ¶meter_values[1].dble_value, &weight_type, &scale_type, ¶meter_values[4].dble_value, ¶meter_values[5].str_value, ¶meter_values[6].str_value, ¶meter_values[7].int_value, ¶meter_values[8].dble_value, ¶meter_values[9].str_value, ¶meter_values[10].str_value, ¶meter_values[11].int_value) parameter_values.dble_value/ | [0] = YAC_RAD; parameter_values[1].dble_value /= YAC_RAD; parameter_values[2].enum_value = (int)weight_type; parameter_values[3].enum_value = (int)scale_type;, | ||
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_ENUM_PARAM( scale, YAC_INTERP_SPMAP_SCALE_TYPE_DEFAULT, DEF_NAME_TYPE_PAIR(none, YAC_INTERP_SPMAP_NONE), DEF_NAME_TYPE_PAIR(srcarea, YAC_INTERP_SPMAP_SRCAREA), DEF_NAME_TYPE_PAIR(invtgtarea, YAC_INTERP_SPMAP_INVTGTAREA), DEF_NAME_TYPE_PAIR(fracarea, YAC_INTERP_SPMAP_FRACAREA)) | , | ||
DEF_DBLE_PARAM( src_cell_area:yac:sphere_radius, 0.0, 1e-9, DBL_MAX) | , | ||
DEF_STR_PARAM( src_cell_area:file:filename, NULL, YAC_MAX_FILE_NAME_LENGTH) | , | ||
DEF_STR_PARAM(src_cell_area:file:varname, NULL, 128) | , | ||
DEF_INT_PARAM( src_cell_area:file:min_global_id, YAC_INTERP_SPMAP_MIN_GLOBAL_ID_DEFAULT, -INT_MAX, INT_MAX) | , | ||
DEF_DBLE_PARAM( tgt_cell_area:yac:sphere_radius, 0.0, 1e-9, DBL_MAX) | , | ||
DEF_STR_PARAM( tgt_cell_area:file:filename, NULL, YAC_MAX_FILE_NAME_LENGTH) | , | ||
DEF_STR_PARAM(tgt_cell_area:file:varname, NULL, 128) | , | ||
DEF_INT_PARAM( tgt_cell_area:file:min_global_id, YAC_INTERP_SPMAP_MIN_GLOBAL_ID_DEFAULT, -INT_MAX, INT_MAX) | ) |
DEF_INTERP_STACK_ADD | ( | fixed | , |
parameters. | dble_value[0] ) |
DEF_INTERP_STACK_ADD | ( | ncc | , |
(enum yac_interp_ncc_weight_type) parameters. | enum_value[0], | ||
parameters. | bool_value[1] ) |
DEF_INTERP_STACK_GET | ( | fixed | , |
¶meter_values. | dble_value[0] ) |
DEF_INTERP_STACK_GET | ( | ncc | , |
& | weight_type, | ||
¶meter_values. | bool_value[1] ) |
char *parameters[0] DEF_INTERP_STACK_GET | ( | user_file | , |
¶meter_values. | str_value[0] ) |
DEF_NAME_TYPE_PAIRS | ( | yaml_base_keys | , |
DEF_NAME_TYPE_PAIR(start_date, START_DATE) | , | ||
DEF_NAME_TYPE_PAIR(end_date, 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 173 of file config_yaml.c.
char *parameters[0] DEF_STR_PARAM | ( | filename | , |
YAC_INTERP_FILE_WEIGHT_FILE_NAME_DEFAULT | , | ||
YAC_MAX_FILE_NAME_LENGTH | ) |
Definition at line 638 of file config_yaml.c.
char const * yac_time_to_ISO | ( | char const * | time, |
enum yac_time_unit_type | time_unit ) |
Definition at line 329 of file event.c.
|
static |
Definition at line 2459 of file config_yaml.c.
|
static |
Definition at line 2652 of file config_yaml.c.
|
static |
Definition at line 2882 of file config_yaml.c.
|
static |
Definition at line 2913 of file config_yaml.c.
|
static |
Definition at line 3017 of file config_yaml.c.
|
static |
Definition at line 2763 of file config_yaml.c.
|
static |
Definition at line 2735 of file config_yaml.c.
|
static |
Definition at line 2995 of file config_yaml.c.
|
static |
Definition at line 2235 of file config_yaml.c.
|
static |
Definition at line 2785 of file config_yaml.c.
|
static |
Definition at line 2853 of file config_yaml.c.
|
static |
Definition at line 2942 of file config_yaml.c.
|
static |
Definition at line 2967 of file config_yaml.c.
|
static |
Definition at line 2352 of file config_yaml.c.
|
static |
Definition at line 2417 of file config_yaml.c.
|
static |
Definition at line 2665 of file config_yaml.c.
|
static |
Definition at line 2689 of file config_yaml.c.
|
static |
|
static |
Definition at line 2132 of file config_yaml.c.
|
static |
Definition at line 2118 of file config_yaml.c.
|
static |
Definition at line 2146 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 user definitions (components, grids, and fields) in the output file |
Definition at line 3083 of file config_yaml.c.
Definition at line 2177 of file config_yaml.c.
|
static |
Definition at line 2264 of file config_yaml.c.
|
static |
Definition at line 2200 of file config_yaml.c.
|
static |
Definition at line 2223 of file config_yaml.c.
|
static |
Definition at line 2211 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 a 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 2059 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 2010 of file config_yaml.c.
YAML_ASSERT | ( | parameters.dble_value ! | [0] = DBL_MAX, |
"parameter 'user_value' of interpolation method 'fixed' is unset" | ) |
YAML_ASSERT | ( | parameters. | str_value[0], |
"parameter \"filename\" of interpolation method \"user file\" is unset" | ) |
|
static |
Definition at line 902 of file config_yaml.c.
|
static |
Definition at line 1898 of file config_yaml.c.
|
static |
Definition at line 771 of file config_yaml.c.
|
static |
Definition at line 1291 of file config_yaml.c.
|
static |
Definition at line 1598 of file config_yaml.c.
|
static |
Definition at line 1462 of file config_yaml.c.
|
static |
Definition at line 1340 of file config_yaml.c.
|
static |
Definition at line 1577 of file config_yaml.c.
|
static |
Definition at line 1878 of file config_yaml.c.
|
static |
Definition at line 1702 of file config_yaml.c.
|
static |
Definition at line 1670 of file config_yaml.c.
|
static |
Definition at line 1740 of file config_yaml.c.
|
static |
Definition at line 1845 of file config_yaml.c.
|
static |
Definition at line 1826 of file config_yaml.c.
|
static |
Definition at line 1971 of file config_yaml.c.
|
static |
Definition at line 866 of file config_yaml.c.
|
static |
Definition at line 883 of file config_yaml.c.
|
static |
Definition at line 1197 of file config_yaml.c.
|
static |
Definition at line 1266 of file config_yaml.c.
|
static |
Definition at line 848 of file config_yaml.c.
|
static |
Definition at line 1146 of file config_yaml.c.
|
static |
Definition at line 1055 of file config_yaml.c.
|
static |
Definition at line 956 of file config_yaml.c.
|
static |
Definition at line 1116 of file config_yaml.c.
|
static |
Definition at line 1178 of file config_yaml.c.
|
static |
Definition at line 1799 of file config_yaml.c.
|
static |
Definition at line 1767 of file config_yaml.c.
|
static |
Definition at line 1236 of file config_yaml.c.
|
static |
|
static |
Definition at line 830 of file config_yaml.c.
|
static |
Definition at line 812 of file config_yaml.c.
|
static |
Definition at line 789 of file config_yaml.c.
interp_method_parameter_value |
Definition at line 304 of file config_yaml.c.
const interpolation_methods[] |
Definition at line 741 of file config_yaml.c.
char* parameters [0] str_value |
Definition at line 635 of file config_yaml.c.
enum yac_interp_ncc_weight_type weight_type |
Definition at line 462 of file config_yaml.c.
int const YAC_YAML_EMITTER_DEFAULT = EMITTER_DEFAULT |
emit to YAML format
Definition at line 63 of file config_yaml.c.
int const YAC_YAML_EMITTER_JSON = EMITTER_JSON |
int const YAC_YAML_PARSER_DEFAULT = PARSER_DEFAULT |
default parse flags (YAML format)
Definition at line 65 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 66 of file config_yaml.c.