YetAnotherCoupler 3.2.0_a
Loading...
Searching...
No Matches
couple_config.h
Go to the documentation of this file.
1// Copyright (c) 2024 The YAC Authors
2//
3// SPDX-License-Identifier: BSD-3-Clause
4
9#ifndef COUPLE_CONFIG_H
10#define COUPLE_CONFIG_H
11
12#include "interp_method_avg.h"
14#include "interp_method_check.h"
16#include "interp_method_creep.h"
17#include "interp_method_file.h"
18#include "interp_method_fixed.h"
19#include "interp_method_hcsbb.h"
20#include "interp_method_ncc.h"
21#include "interp_method_nnn.h"
22#include "interp_method_spmap.h"
23#include "interp_stack_config.h"
24
36
44
46
47// general couple config routines
49void yac_couple_config_delete(struct yac_couple_config * couple_config);
50
51// basic run parameters
53 struct yac_couple_config * couple_config);
55 struct yac_couple_config * couple_config);
57 struct yac_couple_config * couple_config,
58 char const * start, char const * end);
59
60// components
62 struct yac_couple_config * couple_config);
64 struct yac_couple_config * couple_config, char const * component_name);
66 struct yac_couple_config * couple_config, char const * component_name);
68 struct yac_couple_config * couple_config, size_t component_idx);
70 struct yac_couple_config * couple_config, char const * name);
72 struct yac_couple_config * couple_config,
73 char const * comp_name, const char* metadata);
75 struct yac_couple_config * couple_config,
76 char const * comp_name);
77
78// grids
80 struct yac_couple_config * couple_config, char const * grid_name);
82 struct yac_couple_config * couple_config, char const * name);
84 struct yac_couple_config * couple_config,
85 char const * grid_name, const char* metadata);
87 struct yac_couple_config * couple_config,
88 char const * grid_name);
90 struct yac_couple_config * couple_config, char const * grid_name);
92 struct yac_couple_config * couple_config, size_t grid_idx);
93
94// fields
96 struct yac_couple_config * couple_config,
97 const char * component_name, const char * grid_name,
98 const char * name, const char * timestep, size_t collection_size);
100 struct yac_couple_config * couple_config,
101 char const * comp_name, char const * grid_name, char const * field_name,
102 const char* metadata);
104 struct yac_couple_config * couple_config,
105 char const * comp_name, char const * grid_name, char const * field_name);
107 struct yac_couple_config * couple_config, size_t component_idx,
108 size_t grid_idx, char const * field_name);
110 struct yac_couple_config * couple_config,
111 char const * comp_name, char const * grid_name, char const * field_name,
112 double frac_mask_fallback_value);
114 struct yac_couple_config * couple_config,
115 char const * component_name, char const * grid_name,
116 char const * field_name);
118 struct yac_couple_config * couple_config, size_t component_idx,
119 size_t field_idx);
121 struct yac_couple_config * couple_config, size_t component_idx,
122 size_t field_idx);
124 struct yac_couple_config * couple_config,
125 char const * component_name, char const * grid_name,
126 char const * field_name);
128 struct yac_couple_config * couple_config,
129 char const * component_name, char const * grid_name,
130 char const * field_name);
132 struct yac_couple_config * couple_config,
133 size_t component_idx, size_t field_idx);
134
135// couples
137 struct yac_couple_config * couple_config);
139 struct yac_couple_config * couple_config, size_t couple_idx);
141 struct yac_couple_config * couple_config, size_t couple_idx,
142 char const * couple_component_names[2]);
144 struct yac_couple_config * couple_config,
145 char const * src_comp_name, char const * src_grid_name, char const * src_field_name,
146 char const * tgt_comp_name, char const * tgt_grid_name, char const * tgt_field_name,
147 char const * coupling_period, int time_reduction,
148 struct yac_interp_stack_config * interp_stack,
149 int src_lag, int tgt_lag,
150 char const * weight_file_name, int mapping_on_source,
151 double scale_factor, double scale_summand,
152 size_t num_src_mask_names, char const * const * src_mask_names,
153 char const * tgt_mask_name);
155 struct yac_couple_config * couple_config, char const * component_name);
157 struct yac_couple_config * couple_config);
159 struct yac_couple_config * couple_config, char const * component_name);
161 struct yac_couple_config * couple_config);
163 struct yac_couple_config * couple_config, size_t component_idx);
165 struct yac_couple_config * couple_config, size_t component_idx);
167 struct yac_couple_config * couple_config,
168 size_t couple_idx, size_t field_couple_idx);
170 struct yac_couple_config * couple_config,
171 size_t couple_idx, size_t field_couple_idx,
172 char const ** src_grid_name, char const ** tgt_grid_name);
174 struct yac_couple_config * couple_config,
175 size_t couple_idx, size_t field_couple_idx,
176 char const ** src_component_name, char const ** tgt_component_name);
178 struct yac_couple_config * couple_config,
179 char const * component_name, char const * grid_name,
180 char const * field_name);
182 struct yac_couple_config * couple_config,
183 size_t couple_idx, size_t field_couple_idx,
184 const char ** src_field_name, const char ** tgt_field_name);
186 struct yac_couple_config * couple_config,
187 size_t couple_idx, size_t field_couple_idx);
189 struct yac_couple_config * couple_config,
190 size_t couple_idx, size_t field_couple_idx);
192 struct yac_couple_config * couple_config,
193 size_t couple_idx, size_t field_couple_idx);
195 struct yac_couple_config * couple_config,
196 size_t couple_idx, size_t field_couple_idx);
198 struct yac_couple_config * couple_config,
199 size_t couple_idx, size_t field_couple_idx);
201 struct yac_couple_config * couple_config,
202 size_t couple_idx, size_t field_couple_idx);
204 struct yac_couple_config * couple_config,
205 size_t couple_idx, size_t field_couple_idx);
207 struct yac_couple_config * couple_config);
209 struct yac_couple_config * couple_config);
211 struct yac_couple_config * couple_config,
212 size_t couple_idx, size_t field_couple_idx);
214 struct yac_couple_config * couple_config,
215 size_t couple_idx, size_t field_couple_idx);
217 struct yac_couple_config * couple_config,
218 size_t couple_idx, size_t field_couple_idx);
220 struct yac_couple_config * couple_config,
221 size_t couple_idx, size_t field_couple_idx);
223 struct yac_couple_config * couple_config,
224 size_t couple_idx, size_t field_couple_idx,
225 char const * const ** mask_names, size_t * num_mask_names);
227 struct yac_couple_config * couple_config,
228 size_t couple_idx, size_t field_couple_idx);
229
236 struct yac_couple_config * couple_config, MPI_Comm comm);
237
238#endif // COUPLE_CONFIG_H
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_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)
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)
yac_reduction_type
@ TIME_NONE
@ TIME_ACCUMULATE
@ TIME_MAXIMUM
@ TIME_MINIMUM
@ TIME_AVERAGE
void yac_couple_config_sync(struct yac_couple_config *couple_config, MPI_Comm comm)
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_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)
char const * yac_couple_config_get_end_datetime(struct yac_couple_config *couple_config)
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)
yac_time_unit_type
@ C_SECOND
@ TIME_UNIT_UNDEFINED
@ C_HOUR
@ C_DAY
@ C_MILLISECOND
@ C_MINUTE
@ C_MONTH
@ C_ISO_FORMAT
@ C_YEAR
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)
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)
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)
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)
char const * yac_couple_config_get_start_datetime(struct yac_couple_config *couple_config)
size_t yac_couple_config_get_collection_size(struct yac_couple_config *couple_config, char const *component_name, char const *grid_name, char const *field_name)
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)