10#define COUPLE_CONFIG_H
50#define MISSING_DEFINITION_IS_FATAL_DEFAULT_VALUE (1)
65 char const * start,
char const * end);
80 char const * comp_name,
const char* metadata);
83 char const * comp_name);
98 char const * grid_name,
const char* metadata);
101 char const * grid_name);
108 char const * output_filename);
115 const char * component_name,
const char * grid_name,
116 const char * name,
const char * timestep,
size_t collection_size);
119 char const * comp_name,
char const * grid_name,
char const * field_name,
120 const char* metadata);
123 char const * comp_name,
char const * grid_name,
char const * field_name);
126 size_t grid_idx,
char const * field_name);
129 char const * comp_name,
char const * grid_name,
char const * field_name,
130 double frac_mask_fallback_value);
133 char const * component_name,
char const * grid_name,
134 char const * field_name);
143 char const * component_name,
char const * grid_name,
144 char const * field_name);
147 char const * component_name,
char const * grid_name,
148 char const * field_name);
151 char const * component_name,
char const * grid_name,
152 char const * field_name);
155 size_t component_idx,
size_t field_idx);
160 char const * src_comp_name,
char const * src_grid_name,
char const * src_field_name,
161 char const * tgt_comp_name,
char const * tgt_grid_name,
char const * tgt_field_name,
162 char const * coupling_period,
int time_reduction,
164 int src_lag,
int tgt_lag,
165 char const * weight_file_name,
int mapping_on_source,
166 double scale_factor,
double scale_summand,
167 size_t num_src_mask_names,
char const *
const * src_mask_names,
168 char const * tgt_mask_name);
175 char const * couple_component_names[2]);
178 size_t couple_idx,
size_t field_couple_idx,
179 char const ** src_component_name,
char const ** tgt_component_name);
182 size_t couple_idx,
size_t field_couple_idx,
183 char const ** src_grid_name,
char const ** tgt_grid_name);
186 size_t couple_idx,
size_t field_couple_idx,
187 const char ** src_field_name,
const char ** tgt_field_name);
190 size_t couple_idx,
size_t field_couple_idx);
193 size_t couple_idx,
size_t field_couple_idx);
196 size_t couple_idx,
size_t field_couple_idx);
199 size_t couple_idx,
size_t field_couple_idx);
202 size_t couple_idx,
size_t field_couple_idx);
205 size_t couple_idx,
size_t field_couple_idx);
208 size_t couple_idx,
size_t field_couple_idx);
211 size_t couple_idx,
size_t field_couple_idx);
214 size_t couple_idx,
size_t field_couple_idx);
217 size_t couple_idx,
size_t field_couple_idx);
220 size_t couple_idx,
size_t field_couple_idx);
223 size_t couple_idx,
size_t field_couple_idx);
226 size_t couple_idx,
size_t field_couple_idx,
227 char const *
const ** mask_names,
size_t * num_mask_names);
230 size_t couple_idx,
size_t field_couple_idx);
244 char const * output_ref);
263 int include_definitions);
282 int missing_definition_is_fatal);
void yac_couple_config_grid_set_metadata(struct yac_couple_config *couple_config, char const *grid_name, const char *metadata)
int yac_couple_config_field_is_valid(struct yac_couple_config *couple_config, size_t component_idx, size_t field_idx)
void yac_couple_config_sync(struct yac_couple_config *couple_config, MPI_Comm comm, char const *output_ref)
void yac_couple_config_field_enable_frac_mask(struct yac_couple_config *couple_config, char const *comp_name, char const *grid_name, char const *field_name, double frac_mask_fallback_value)
@ YAC_TEXT_FILETYPE_YAML
YAML format.
@ YAC_TEXT_FILETYPE_JSON
JSON format.
size_t yac_couple_config_get_num_fields(struct yac_couple_config *couple_config, size_t component_idx)
void yac_couple_config_get_field_grid_names(struct yac_couple_config *couple_config, size_t couple_idx, size_t field_couple_idx, char const **src_grid_name, char const **tgt_grid_name)
int yac_couple_config_contains_grid_name(struct yac_couple_config *couple_config, char const *grid_name)
const char * yac_couple_config_grid_get_output_filename(struct yac_couple_config *couple_config, const char *grid_name)
char * yac_couple_config_get_start_datetime(struct yac_couple_config *couple_config)
void yac_couple_config_set_datetime(struct yac_couple_config *couple_config, char const *start, char const *end)
char const * yac_couple_config_get_field_timestep(struct yac_couple_config *couple_config, char const *component_name, char const *grid_name, char const *field_name)
int yac_couple_config_mapping_on_source(struct yac_couple_config *couple_config, size_t couple_idx, size_t field_couple_idx)
int yac_couple_config_get_field_role(struct yac_couple_config *couple_config, char const *component_name, char const *grid_name, char const *field_name)
int yac_couple_config_component_name_is_valid(struct yac_couple_config *couple_config, char const *component_name)
char const * yac_couple_config_get_coupling_period(struct yac_couple_config *couple_config, size_t couple_idx, size_t field_couple_idx)
struct yac_interp_stack_config * yac_couple_config_get_interp_stack(struct yac_couple_config *couple_config, size_t couple_idx, size_t field_couple_idx)
char const * yac_couple_config_get_field_name(struct yac_couple_config *couple_config, size_t component_idx, size_t field_idx)
size_t yac_couple_config_get_field_idx(struct yac_couple_config *couple_config, size_t component_idx, size_t grid_idx, char const *field_name)
void yac_couple_config_component_set_metadata(struct yac_couple_config *couple_config, char const *comp_name, const char *metadata)
size_t yac_couple_config_get_field_collection_size(struct yac_couple_config *couple_config, char const *component_name, char const *grid_name, char const *field_name)
size_t yac_couple_config_get_num_couple_fields(struct yac_couple_config *couple_config, size_t couple_idx)
void yac_couple_config_get_src_mask_names(struct yac_couple_config *couple_config, size_t couple_idx, size_t field_couple_idx, char const *const **mask_names, size_t *num_mask_names)
void yac_couple_config_def_couple(struct yac_couple_config *couple_config, char const *src_comp_name, char const *src_grid_name, char const *src_field_name, char const *tgt_comp_name, char const *tgt_grid_name, char const *tgt_field_name, char const *coupling_period, int time_reduction, struct yac_interp_stack_config *interp_stack, int src_lag, int tgt_lag, char const *weight_file_name, int mapping_on_source, double scale_factor, double scale_summand, size_t num_src_mask_names, char const *const *src_mask_names, char const *tgt_mask_name)
size_t yac_couple_config_get_num_couples(struct yac_couple_config *couple_config)
const char * yac_couple_config_field_get_metadata(struct yac_couple_config *couple_config, char const *comp_name, char const *grid_name, char const *field_name)
int yac_couple_config_get_target_lag(struct yac_couple_config *couple_config, size_t couple_idx, size_t field_couple_idx)
double yac_couple_config_get_frac_mask_fallback_value(struct yac_couple_config *couple_config, char const *component_name, char const *grid_name, char const *field_name)
int yac_couple_config_get_source_lag(struct yac_couple_config *couple_config, size_t couple_idx, size_t field_couple_idx)
void yac_couple_config_get_couple_component_names(struct yac_couple_config *couple_config, size_t couple_idx, char const *couple_component_names[2])
double yac_couple_config_get_scale_factor(struct yac_couple_config *couple_config, size_t couple_idx, size_t field_couple_idx)
size_t yac_couple_config_get_grid_idx(struct yac_couple_config *couple_config, char const *grid_name)
size_t yac_couple_config_get_component_idx(struct yac_couple_config *couple_config, char const *component_name)
char const * yac_couple_config_get_tgt_mask_name(struct yac_couple_config *couple_config, size_t couple_idx, size_t field_couple_idx)
const char * yac_couple_config_component_get_metadata(struct yac_couple_config *couple_config, char const *comp_name)
const char * yac_couple_config_grid_get_metadata(struct yac_couple_config *couple_config, char const *grid_name)
void yac_couple_config_add_grid(struct yac_couple_config *couple_config, char const *name)
char const * yac_couple_config_get_grid_name(struct yac_couple_config *couple_config, size_t grid_idx)
double yac_couple_config_get_scale_summand(struct yac_couple_config *couple_config, size_t couple_idx, size_t field_couple_idx)
enum yac_reduction_type yac_couple_config_get_coupling_period_operation(struct yac_couple_config *couple_config, size_t couple_idx, size_t field_couple_idx)
void yac_couple_config_grid_set_output_filename(struct yac_couple_config *couple_config, const char *grid_name, char const *output_filename)
int yac_couple_config_enforce_write_weight_file(struct yac_couple_config *couple_config, size_t couple_idx, size_t field_couple_idx)
struct yac_couple_config * yac_couple_config_new()
char const * yac_couple_config_get_weight_file_name(struct yac_couple_config *couple_config, size_t couple_idx, size_t field_couple_idx)
void yac_couple_config_get_field_names(struct yac_couple_config *couple_config, size_t couple_idx, size_t field_couple_idx, const char **src_field_name, const char **tgt_field_name)
int yac_couple_config_get_missing_definition_is_fatal(struct yac_couple_config *couple_config)
void yac_couple_config_get_field_couple_component_names(struct yac_couple_config *couple_config, size_t couple_idx, size_t field_couple_idx, char const **src_component_name, char const **tgt_component_name)
char const * yac_couple_config_get_component_name(struct yac_couple_config *couple_config, size_t component_idx)
void yac_couple_config_set_missing_definition_is_fatal(struct yac_couple_config *couple_config, int missing_definition_is_fatal)
char const * yac_couple_config_get_source_timestep(struct yac_couple_config *couple_config, size_t couple_idx, size_t field_couple_idx)
void yac_couple_config_component_add_field(struct yac_couple_config *couple_config, const char *component_name, const char *grid_name, const char *name, const char *timestep, size_t collection_size)
void yac_couple_config_add_component(struct yac_couple_config *couple_config, char const *name)
size_t yac_couple_config_get_num_grids(struct yac_couple_config *couple_config)
char const * yac_couple_config_get_field_grid_name(struct yac_couple_config *couple_config, size_t component_idx, size_t field_idx)
void yac_couple_config_field_set_metadata(struct yac_couple_config *couple_config, char const *comp_name, char const *grid_name, char const *field_name, const char *metadata)
void yac_couple_config_set_config_output_filename(struct yac_couple_config *couple_config, char const *filename, enum yac_text_filetype filetype, char const *ref, int include_definitions)
char * yac_couple_config_get_end_datetime(struct yac_couple_config *couple_config)
char const * yac_couple_config_get_target_timestep(struct yac_couple_config *couple_config, size_t couple_idx, size_t field_couple_idx)
void yac_couple_config_delete(struct yac_couple_config *couple_config)
size_t yac_couple_config_get_num_components(struct yac_couple_config *couple_config)