YetAnotherCoupler 3.4.0
Loading...
Searching...
No Matches
yac.h
Go to the documentation of this file.
1// Copyright (c) 2024 The YAC Authors
2//
3// SPDX-License-Identifier: BSD-3-Clause
4
5#ifndef YAC_H
6#define YAC_H
7
8#include <stddef.h>
9
10#include <mpi.h>
11
12extern int const YAC_LOCATION_CELL;
13extern int const YAC_LOCATION_CORNER;
14extern int const YAC_LOCATION_EDGE;
15
16extern int const YAC_EXCHANGE_TYPE_NONE;
17extern int const YAC_EXCHANGE_TYPE_SOURCE;
18extern int const YAC_EXCHANGE_TYPE_TARGET;
19
20extern int const YAC_ACTION_NONE;
21extern int const YAC_ACTION_REDUCTION;
22extern int const YAC_ACTION_COUPLING;
23extern int const YAC_ACTION_GET_FOR_RESTART;
24extern int const YAC_ACTION_PUT_FOR_RESTART;
25extern int const YAC_ACTION_OUT_OF_BOUND;
26
27extern int const YAC_REDUCTION_TIME_NONE;
28extern int const YAC_REDUCTION_TIME_ACCUMULATE;
29extern int const YAC_REDUCTION_TIME_AVERAGE;
30extern int const YAC_REDUCTION_TIME_MINIMUM;
31extern int const YAC_REDUCTION_TIME_MAXIMUM;
32
33extern int const YAC_TIME_UNIT_MILLISECOND;
34extern int const YAC_TIME_UNIT_SECOND;
35extern int const YAC_TIME_UNIT_MINUTE;
36extern int const YAC_TIME_UNIT_HOUR;
37extern int const YAC_TIME_UNIT_DAY;
38extern int const YAC_TIME_UNIT_MONTH;
39extern int const YAC_TIME_UNIT_YEAR;
40extern int const YAC_TIME_UNIT_ISO_FORMAT;
41
42extern int const YAC_CALENDAR_NOT_SET;
43extern int const YAC_PROLEPTIC_GREGORIAN;
44extern int const YAC_YEAR_OF_365_DAYS;
45extern int const YAC_YEAR_OF_360_DAYS;
46
47extern int const YAC_AVG_ARITHMETIC;
48extern int const YAC_AVG_DIST;
49extern int const YAC_AVG_BARY;
50
51extern int const YAC_NCC_AVG;
52extern int const YAC_NCC_DIST;
53
54extern int const YAC_NNN_AVG;
55extern int const YAC_NNN_DIST;
56extern int const YAC_NNN_GAUSS;
57extern int const YAC_NNN_RBF;
58extern int const YAC_NNN_ZERO;
59
60extern int const YAC_CONSERV_DESTAREA;
61extern int const YAC_CONSERV_FRACAREA;
62
63extern int const YAC_SPMAP_AVG;
64extern int const YAC_SPMAP_DIST;
65
66extern int const YAC_SPMAP_NONE;
67extern int const YAC_SPMAP_SRCAREA;
68extern int const YAC_SPMAP_INVTGTAREA;
69extern int const YAC_SPMAP_FRACAREA;
70
71extern int const YAC_YAML_EMITTER_DEFAULT;
72extern int const YAC_YAML_EMITTER_JSON;
73
74extern int const YAC_CONFIG_OUTPUT_FORMAT_YAML;
75extern int const YAC_CONFIG_OUTPUT_FORMAT_JSON;
76
77extern int const YAC_CONFIG_OUTPUT_SYNC_LOC_DEF_COMP; // after component definition
78extern int const YAC_CONFIG_OUTPUT_SYNC_LOC_SYNC_DEF; // after synchronization of definition
79extern int const YAC_CONFIG_OUTPUT_SYNC_LOC_ENDDEF; // after end of definitions
80
81#define YAC_MAX_CHARLEN (132)
82
143/* -----------------------------------------------------------------------------
144
145 C and Fortran description of the user API
146
147 ----------------------------------------------------------------------------- */
148
175 void yac_cmpi_handshake( MPI_Comm comm,
176 size_t n,
177 char const** group_names,
178 MPI_Comm * group_comms );
179
189
198 void yac_cinit (void);
199
209 void yac_cinit_instance ( int * yac_instance_id );
210
220 void yac_cinit_comm ( MPI_Comm comm );
221
231 void yac_cinit_comm_instance ( MPI_Comm comm,
232 int * yac_instance_id );
233
234/* -------------------------------------------------------------------------------- */
235
241 void yac_cinit_dummy(void);
242
251 void yac_cinit_comm_dummy ( MPI_Comm comm );
252
253/* -------------------------------------------------------------------------------- */
254
261 void yac_cread_config_yaml_instance( int yac_instance_id,
262 const char * yaml_file);
263
268 void yac_cread_config_yaml(const char * yaml_file);
269
276 void yac_cread_config_json_instance( int yac_instance_id,
277 const char * json_file);
278
283 void yac_cread_config_json( const char * json_file );
284
285/* -------------------------------------------------------------------------------- */
286
301 void yac_cset_config_output_file_instance( int yac_instance_id,
302 const char * filename,
303 int fileformat,
304 int sync_location,
305 int include_definitions);
306
320 void yac_cset_config_output_file( const char * filename,
321 int fileformat,
322 int sync_location,
323 int include_definitions);
324
325/* -------------------------------------------------------------------------------- */
326
334 void yac_cset_grid_output_file_instance( int yac_instance_id,
335 const char * gridname,
336 const char * filename);
337
344 void yac_cset_grid_output_file( const char * gridname,
345 const char * filename);
346
347/* -------------------------------------------------------------------------------- */
348
355 void yac_ccleanup ();
356
363 void yac_ccleanup_instance ( int yac_instance_id );
364
365/* -------------------------------------------------------------------------------- */
366
370 void yac_cfinalize ();
371
376 void yac_cfinalize_instance (int yac_instance_id);
377
378/* -------------------------------------------------------------------------------- */
379
386 void yac_cdef_datetime ( const char * start_datetime,
387 const char * end_datetime );
388
396 void yac_cdef_datetime_instance ( int yac_instance_id,
397 const char * start_datetime,
398 const char * end_datetime );
399
405 void yac_cdef_calendar ( int calendar );
406
410 int yac_cget_calendar ( );
411
412/* -------------------------------------------------------------------------------- */
413
421 void yac_cget_groupcomm( MPI_Comm * group_comm );
422
431 void yac_cget_groupcomm_instance( int yac_instance_id,
432 MPI_Comm * group_comm );
433
434/* -------------------------------------------------------------------------------- */
435
444 void yac_cpredef_comp( char const * comp_name,
445 int * comp_id );
446
456 void yac_cpredef_comp_instance( int yac_instance_id,
457 char const * comp_name,
458 int * comp_id );
459
460/* -------------------------------------------------------------------------------- */
461
472 void yac_cdef_comp ( const char * comp_name,
473 int * comp_id );
474
487 void yac_cdef_comp_instance ( int yac_instance_id,
488 const char * comp_name,
489 int * comp_id );
490
491/* -------------------------------------------------------------------------------- */
492
504 void yac_cdef_comps ( const char ** comp_names,
505 int num_comps,
506 int * comp_ids );
507
520 void yac_cdef_comps_instance ( int yac_instance_id,
521 const char ** comp_names,
522 int num_comps,
523 int * comp_ids );
524
525/* -------------------------------------------------------------------------------- */
526
534 void yac_cget_comp_comm ( int comp_id,
535 MPI_Comm *comp_comm );
536
537/* -------------------------------------------------------------------------------- */
538
551 void yac_cget_comps_comm ( const char ** comp_names,
552 int num_comps,
553 MPI_Comm * comps_comm);
554
567 void yac_cget_comps_comm_instance ( int yac_instance_id,
568 const char ** comp_names,
569 int num_comps,
570 MPI_Comm * comps_comm );
571
572/* -------------------------------------------------------------------------------- */
573
591 void yac_cdef_points_reg2d ( int const grid_id,
592 int const *nbr_points,
593 int const location,
594 double const *x_points,
595 double const *y_points,
596 int *point_id );
597
598/* -------------------------------------------------------------------------------- */
599
617 void yac_cdef_points_curve2d ( int const grid_id,
618 int const *nbr_points,
619 int const location,
620 double const *x_points,
621 double const *y_points,
622 int *point_id );
623
624/* -------------------------------------------------------------------------------- */
625
639 void yac_cdef_points_unstruct ( int const grid_id,
640 int const nbr_points,
641 int const location,
642 double const *x_points,
643 double const *y_points,
644 int *point_id );
645
646/* -------------------------------------------------------------------------------- */
647
697 void yac_cdef_grid_reg2d ( const char * grid_name,
698 int nbr_vertices[2],
699 int cyclic[2],
700 double *x_vertices,
701 double *y_vertices,
702 int *grid_id);
703
704/* -------------------------------------------------------------------------------- */
705
755 void yac_cdef_grid_curve2d ( const char * grid_name,
756 int nbr_vertices[2],
757 int cyclic[2],
758 double *x_vertices,
759 double *y_vertices,
760 int *grid_id);
761
762/* -------------------------------------------------------------------------------- */
763
779 void yac_cdef_grid_unstruct ( const char * grid_name,
780 int nbr_vertices,
781 int nbr_cells,
782 int *num_vertices_per_cell,
783 double *x_vertices,
784 double *y_vertices,
785 int *cell_to_vertex,
786 int *grid_id);
787
788/* -------------------------------------------------------------------------------- */
789
810 void yac_cdef_grid_unstruct_ll ( const char * grid_name,
811 int nbr_vertices,
812 int nbr_cells,
813 int *num_vertices_per_cell,
814 double *x_vertices,
815 double *y_vertices,
816 int *cell_to_vertex,
817 int *grid_id);
818
819/* -------------------------------------------------------------------------------- */
820
829 void yac_cdef_grid_cloud ( const char * grid_name,
830 int nbr_points,
831 double *x_points,
832 double *y_points,
833 int *grid_id);
834
835/* -------------------------------------------------------------------------------- */
836
846 void yac_cset_global_index ( int const * global_index,
847 int location,
848 int grid_id);
849
850/* -------------------------------------------------------------------------------- */
851
864 void yac_cset_core_mask ( int const * is_core,
865 int location,
866 int grid_id);
867
868/* -------------------------------------------------------------------------------- */
869
876 void yac_cset_mask ( int const * is_valid,
877 int points_id );
878
879/* -------------------------------------------------------------------------------- */
880
890 void yac_cdef_mask ( int const grid_id,
891 int const nbr_points,
892 int const location,
893 int const * is_valid,
894 int *mask_id );
895
896/* -------------------------------------------------------------------------------- */
897
908 void yac_cdef_mask_named ( int const grid_id,
909 int const nbr_points,
910 int const location,
911 int const * is_valid,
912 char const * name,
913 int *mask_id );
914
915/* -------------------------------------------------------------------------------- */
916
935 void yac_cdef_field ( char const * field_name,
936 int const component_id,
937 int const * point_ids,
938 int const num_pointsets,
939 int collection_size,
940 const char* timestep,
941 int time_unit,
942 int * field_id );
943
944/* -------------------------------------------------------------------------------- */
945
965 void yac_cdef_field_mask ( char const * field_name,
966 int const component_id,
967 int const * point_ids,
968 int const * mask_ids,
969 int const num_pointsets,
970 int collection_size,
971 const char* timestep,
972 int time_unit,
973 int * field_id );
974
975/* -------------------------------------------------------------------------- */
976
989 void yac_cenable_field_frac_mask( const char* comp_name,
990 const char* grid_name,
991 const char* field_name,
992 double frac_mask_fallback_value);
993
1008 int yac_instance_id,
1009 const char* comp_name,
1010 const char* grid_name,
1011 const char* field_name,
1012 double frac_mask_fallback_value);
1013
1014/* -------------------------------------------------------------------------- */
1015
1020 void yac_cdef_component_metadata( const char* comp_name,
1021 const char* metadata);
1022
1028 void yac_cdef_component_metadata_instance( int yac_instance_id,
1029 const char* comp_name,
1030 const char* metadata);
1031
1036 void yac_cdef_grid_metadata( const char* grid_name,
1037 const char* metadata);
1038
1044 void yac_cdef_grid_metadata_instance( int yac_instance_id,
1045 const char* grid_name,
1046 const char* metadata);
1047
1054 void yac_cdef_field_metadata( const char* comp_name,
1055 const char* grid_name,
1056 const char* field_name,
1057 const char* metadata);
1058
1066 void yac_cdef_field_metadata_instance( int yac_instance_id,
1067 const char* comp_name,
1068 const char* grid_name,
1069 const char* field_name,
1070 const char* metadata);
1071
1072/* -------------------------------------------------------------------------- */
1073
1090 void yac_cget_action( int field_id,
1091 int * action);
1092
1098 const char * yac_cget_field_datetime(int field_id);
1099
1100/* -------------------------------------------------------------------------- */
1101
1113 void yac_cupdate(int field_id);
1114
1115/* -------------------------------------------------------------------------- */
1116
1121 void yac_cget_ext_couple_config(int * ext_couple_config_id);
1122
1126 void yac_cfree_ext_couple_config(int ext_couple_config_id);
1127
1136 void yac_cset_ext_couple_config_weight_file( int ext_couple_config_id,
1137 char const * weight_file);
1138
1144 void yac_cget_ext_couple_config_weight_file( int ext_couple_config_id,
1145 char const ** weight_file);
1146
1152 void yac_cset_ext_couple_config_mapping_side( int ext_couple_config_id,
1153 int mapping_side);
1154
1159 void yac_cget_ext_couple_config_mapping_side( int ext_couple_config_id,
1160 int * mapping_side);
1161
1166 void yac_cset_ext_couple_config_scale_factor( int ext_couple_config_id,
1167 double scale_factor);
1168
1173 void yac_cget_ext_couple_config_scale_factor( int ext_couple_config_id,
1174 double * scale_factor);
1175
1180 void yac_cset_ext_couple_config_scale_summand( int ext_couple_config_id,
1181 double scale_summand);
1182
1187 void yac_cget_ext_couple_config_scale_summand( int ext_couple_config_id,
1188 double * scale_summand);
1189
1196 int ext_couple_config_id,
1197 size_t num_src_mask_names,
1198 char const * const * src_mask_names);
1199
1206 int ext_couple_config_id,
1207 size_t * num_src_mask_names,
1208 char const * const ** src_mask_names);
1209
1214 void yac_cset_ext_couple_config_tgt_mask_name( int ext_couple_config_id,
1215 char const * tgt_mask_name);
1216
1221 void yac_cget_ext_couple_config_mask_name( int ext_couple_config_id,
1222 char const ** tgt_mask_name);
1223
1224/* -------------------------------------------------------------------------- */
1225
1246 void yac_cdef_couple_custom_instance( int yac_instance_id,
1247 char const * src_comp_name,
1248 char const * src_grid_name,
1249 char const * src_field_name,
1250 char const * tgt_comp_name,
1251 char const * tgt_grid_name,
1252 char const * tgt_field_name,
1253 char const * coupling_timestep,
1254 int time_unit,
1255 int time_reduction,
1256 int interp_stack_config_id,
1257 int src_lag,
1258 int tgt_lag,
1259 int ext_couple_config_id);
1260
1281 void yac_cdef_couple_custom( char const * src_comp_name,
1282 char const * src_grid_name,
1283 char const * src_field_name,
1284 char const * tgt_comp_name,
1285 char const * tgt_grid_name,
1286 char const * tgt_field_name,
1287 char const * coupling_timestep,
1288 int time_unit,
1289 int time_reduction,
1290 int interp_stack_config_id,
1291 int src_lag,
1292 int tgt_lag,
1293 int ext_couple_config_id);
1294
1295/* -------------------------------------------------------------------------- */
1296
1316 void yac_cdef_couple_instance( int yac_instance_id,
1317 char const * src_comp_name,
1318 char const * src_grid_name,
1319 char const * src_field_name,
1320 char const * tgt_comp_name,
1321 char const * tgt_grid_name,
1322 char const * tgt_field_name,
1323 char const * coupling_timestep,
1324 int time_unit,
1325 int time_reduction,
1326 int interp_stack_config_id,
1327 int src_lag,
1328 int tgt_lag);
1329
1348 void yac_cdef_couple( char const * src_comp_name,
1349 char const * src_grid_name,
1350 char const * src_field_name,
1351 char const * tgt_comp_name,
1352 char const * tgt_grid_name,
1353 char const * tgt_field_name,
1354 char const * coupling_timestep,
1355 int time_unit,
1356 int time_reduction,
1357 int interp_stack_config_id,
1358 int src_lag,
1359 int tgt_lag);
1360
1361/* -------------------------------------------------------------------------------- */
1362
1373 void yac_ccheck_field_dimensions ( int field_id,
1374 int collection_size,
1375 int num_pointsets,
1376 int const * pointset_sizes );
1377
1378/* -------------------------------------------------------------------------------- */
1379
1390 void yac_cget_ ( int const field_id,
1391 int const collection_size,
1392 double *recv_field,
1393 int *info,
1394 int *ierror );
1395
1405 void yac_cget ( int const field_id,
1406 int const collection_size,
1407 double **recv_field,
1408 int *info,
1409 int *ierror );
1410
1425 void yac_cget_async_ ( int const field_id,
1426 int const collection_size,
1427 double *recv_field,
1428 int *info,
1429 int *ierror );
1430
1444 void yac_cget_async ( int const field_id,
1445 int const collection_size,
1446 double **recv_field,
1447 int *info,
1448 int *ierror );
1449
1450/* -------------------------------------------------------------------------------- */
1451
1465 void yac_cput_ ( int const field_id,
1466 int const collection_size,
1467 double *send_field,
1468 int *info,
1469 int *ierror );
1470
1483 void yac_cput ( int const field_id,
1484 int const collection_size,
1485 double *** const send_field,
1486 int *info,
1487 int *ierror );
1488
1489/* -------------------------------------------------------------------------------- */
1490
1509 void yac_cput_frac_ ( int const field_id,
1510 int const collection_size,
1511 double *send_field,
1512 double *send_frac_mask,
1513 int *info,
1514 int *ierror );
1515
1532 void yac_cput_frac ( int const field_id,
1533 int const collection_size,
1534 double *** const send_field,
1535 double *** const send_frac_mask,
1536 int *info,
1537 int *ierror );
1538
1539/* -------------------------------------------------------------------------------- */
1540
1552 void yac_cput_ptr_ ( int const field_id,
1553 int const collection_size,
1554 double ** send_field,
1555 int *info,
1556 int *ierror );
1557
1558/* -------------------------------------------------------------------------------- */
1559
1574 void yac_cput_frac_ptr_ ( int const field_id,
1575 int const collection_size,
1576 double ** send_field,
1577 double ** send_frac_mask,
1578 int *info,
1579 int *ierror );
1580
1581/* -------------------------------------------------------------------------------- */
1582
1601 void yac_cexchange_ ( int const send_field_id,
1602 int const recv_field_id,
1603 int const collection_size,
1604 double *send_field ,
1605 double *recv_field,
1606 int *send_info,
1607 int *recv_info,
1608 int *ierror );
1609
1610
1627 void yac_cexchange ( int const send_field_id,
1628 int const recv_field_id,
1629 int const collection_size,
1630 double *** const send_field,
1631 double ** recv_field,
1632 int *send_info,
1633 int *recv_info,
1634 int *ierror );
1635
1636/* -------------------------------------------------------------------------------- */
1637
1661 void yac_cexchange_frac_ ( int const send_field_id,
1662 int const recv_field_id,
1663 int const collection_size,
1664 double *send_field,
1665 double *send_frac_mask,
1666 double *recv_field,
1667 int *send_info,
1668 int *recv_info,
1669 int *ierror );
1670
1671
1692 void yac_cexchange_frac ( int const send_field_id,
1693 int const recv_field_id,
1694 int const collection_size,
1695 double *** const send_field,
1696 double *** const send_frac_mask,
1697 double ** recv_field,
1698 int *send_info,
1699 int *recv_info,
1700 int *ierror );
1701
1702/* -------------------------------------------------------------------------------- */
1703
1719 void yac_cexchange_ptr_ ( int const send_field_id,
1720 int const recv_field_id,
1721 int const collection_size,
1722 double ** send_field,
1723 double ** recv_field,
1724 int *send_info,
1725 int *recv_info,
1726 int *ierror );
1727
1728/* -------------------------------------------------------------------------------- */
1729
1748 void yac_cexchange_frac_ptr_ ( int const send_field_id,
1749 int const recv_field_id,
1750 int const collection_size,
1751 double ** send_field,
1752 double ** send_frac_mask,
1753 double ** recv_field,
1754 int *send_info,
1755 int *recv_info,
1756 int *ierror );
1757
1758/* -------------------------------------------------------------------------------- */
1759
1769 void yac_ctest ( int field_id, int * flag );
1770
1771/* -------------------------------------------------------------------------------- */
1772
1779 void yac_cwait ( int field_id );
1780
1781/* -------------------------------------------------------------------------------- */
1782
1785 void yac_csync_def ( void );
1786
1791 void yac_csync_def_instance ( int yac_instance_id );
1792
1797 void yac_cenddef ( void );
1798
1805 void yac_cenddef_instance ( int yac_instance_id );
1806
1822 void yac_cenddef_and_emit_config ( int emit_flags,
1823 char ** config );
1824
1839 void yac_cenddef_and_emit_config_instance ( int yac_instance_id,
1840 int emit_flags,
1841 char ** config);
1842
1843/* --------------------------------------------------------------------------------
1844 query routines
1845 -------------------------------------------------------------------------------- */
1846
1850 char * yac_cget_start_datetime ( void );
1851
1857 char * yac_cget_start_datetime_instance ( int yac_instance_id );
1858
1862 char * yac_cget_end_datetime ( void );
1863
1869 char * yac_cget_end_datetime_instance ( int yac_instance_id );
1870
1874 char * yac_cget_version ( void );
1875
1876/* -------------------------------------------------------------------------------- */
1877
1884 int yac_cget_nbr_comps ( void );
1885
1891 int yac_cget_nbr_comps_instance ( int yac_instance_id );
1892
1900 int yac_cget_nbr_grids ( );
1901
1908 int yac_cget_nbr_grids_instance ( int yac_instance_id );
1909
1917 int yac_cget_comp_nbr_grids ( const char* comp_name );
1918
1926 int yac_cget_comp_nbr_grids_instance ( int yac_instance_id,
1927 const char* comp_name );
1928
1937 int yac_cget_nbr_fields ( const char* comp_name,
1938 const char* grid_name );
1939
1949 int yac_cget_nbr_fields_instance ( int yac_instance_id,
1950 const char* comp_name,
1951 const char* grid_name);
1952
1953/* -------------------------------------------------------------------------------- */
1954
1961 void yac_cget_comp_names ( int nbr_comps,
1962 const char ** comp_names );
1963
1971 void yac_cget_comp_names_instance ( int yac_instance_id,
1972 int nbr_comps,
1973 const char ** comp_names );
1974
1983 void yac_cget_grid_names ( int nbr_grids,
1984 const char ** grid_names );
1985
1994 void yac_cget_grid_names_instance ( int yac_instance_id,
1995 int nbr_grids,
1996 const char ** grid_names );
1997
2007 void yac_cget_comp_grid_names ( const char* comp_name,
2008 int nbr_grids,
2009 const char ** grid_names );
2010
2021 void yac_cget_comp_grid_names_instance ( int yac_instance_id,
2022 const char* comp_name,
2023 int nbr_grids,
2024 const char ** grid_names );
2025
2035 void yac_cget_field_names ( const char* comp_name,
2036 const char* grid_name,
2037 int nbr_fields,
2038 const char ** field_names );
2039
2049 void yac_cget_field_names_instance ( int yac_instance_id,
2050 const char * comp_name,
2051 const char* grid_name,
2052 int nbr_fields,
2053 const char ** field_names );
2054
2055/* ---------------------------------------------------------------------- */
2056
2065 const char* yac_cget_component_name_from_field_id ( int field_id );
2066
2075 const char* yac_cget_grid_name_from_field_id ( int field_id );
2076
2085 const char* yac_cget_field_name_from_field_id ( int field_id );
2086
2096 const char* yac_cget_timestep_from_field_id ( int field_id );
2097
2105 int yac_cget_collection_size_from_field_id ( int field_id );
2106
2119 int yac_cget_role_from_field_id ( int field_id );
2120
2129 int yac_cget_field_id( const char* comp_name,
2130 const char* grid_name,
2131 const char* field_name);
2132
2142 int yac_cget_field_id_instance( int yac_instance_id,
2143 const char* comp_name,
2144 const char* grid_name,
2145 const char* field_name);
2146
2147/* ---------------------------------------------------------------------- */
2148
2153 const char* yac_cget_component_metadata(const char* comp_name);
2154
2160 const char* yac_cget_component_metadata_instance( int yac_instance_id,
2161 const char* comp_name);
2162
2167 const char* yac_cget_grid_metadata(const char* grid_name);
2168
2174 const char* yac_cget_grid_metadata_instance( int yac_instance_id,
2175 const char* grid_name);
2176
2183 const char* yac_cget_field_metadata( const char* comp_name,
2184 const char* grid_name,
2185 const char* field_name);
2186
2194 const char* yac_cget_field_metadata_instance( int yac_instance_id,
2195 const char* comp_name,
2196 const char* grid_name,
2197 const char* field_name);
2198
2199/* ---------------------------------------------------------------------- */
2200
2211 const char* yac_cget_field_timestep ( const char* comp_name,
2212 const char* grid_name,
2213 const char* field_name );
2214
2226 const char* yac_cget_field_timestep_instance ( int yac_instance_id,
2227 const char* comp_name,
2228 const char* grid_name,
2229 const char* field_name );
2230
2242 double yac_cget_field_frac_mask_fallback_value( const char* comp_name,
2243 const char* grid_name,
2244 const char* field_name);
2245
2255 int yac_cget_field_collection_size( const char* comp_name,
2256 const char* grid_name,
2257 const char* field_name);
2258
2272 int yac_instance_id,
2273 const char* comp_name,
2274 const char* grid_name,
2275 const char* field_name );
2276
2288 int yac_instance_id,
2289 const char* comp_name,
2290 const char* grid_name,
2291 const char* field_name);
2292
2307 int yac_cget_field_role ( const char* comp_name,
2308 const char* grid_name,
2309 const char* field_name );
2310
2326 int yac_cget_field_role_instance ( int yac_instance_id,
2327 const char* comp_name,
2328 const char* grid_name,
2329 const char* field_name );
2330
2331/* --------------------------------------------------------------------------------
2332 auxiliary routines
2333 -------------------------------------------------------------------------------- */
2334
2335#ifndef __GNUC__
2336# define __attribute__(x) /*NOTHING*/
2337#endif
2338
2339// prevent warning if compile with cython
2340#ifdef YAC_CYTHON
2341# define __attribute__(x) /*NOTHING*/
2342#endif
2343
2347typedef void (*yac_abort_func)(MPI_Comm comm, const char *msg,
2348 const char *source, int line)
2349 __attribute__((noreturn));
2350
2351
2352#ifdef YAC_CYTHON
2353# undef __attribute__
2354#endif
2355
2363 void yac_abort( MPI_Comm comm,
2364 const char *msg,
2365 const char *source,
2366 int line)
2367 __attribute__((noreturn));
2368
2375 void yac_abort_message( char const *msg,
2376 const char *source,
2377 int line);
2378
2382
2390
2395
2400
2404 void yac_set_default_comm(MPI_Comm comm);
2405
2406/* -------------------------------------------------------------------------------- */
2407
2415 size_t yac_cget_grid_size ( int location,
2416 int grid_id );
2417
2418/* -------------------------------------------------------------------------------- */
2419
2427 void yac_ccompute_grid_cell_areas ( int grid_id,
2428 double * cell_areas );
2429
2430
2431/* -------------------------------------------------------------------------------- */
2432
2439 size_t yac_cget_points_size ( int points_id );
2440
2441/* -------------------------------------------------------------------------------- */
2442
2446 void yac_cget_interp_stack_config(int * interp_stack_config_id);
2447
2451 void yac_cfree_interp_stack_config(int interp_stack_config_id);
2452
2458 void yac_cadd_interp_stack_config_average( int interp_stack_config_id,
2459 int reduction_type,
2460 int partial_coverage);
2461
2468 void yac_cadd_interp_stack_config_ncc( int interp_stack_config_id,
2469 int weight_type,
2470 int partial_coverage);
2471
2483 void yac_cadd_interp_stack_config_nnn( int interp_stack_config_id,
2484 int type,
2485 size_t n,
2486 double max_search_distance,
2487 double scale);
2488
2497 int interp_stack_config_id,
2498 int order,
2499 int enforced_conserv,
2500 int partial_coverage,
2501 int normalisation);
2502
2516 int interp_stack_config_id,
2517 double spread_distance,
2518 double max_search_distance,
2519 int weight_type,
2520 int scale_type,
2521 double src_sphere_radius,
2522 double tgt_sphere_radius);
2523
2527 void yac_cadd_interp_stack_config_hcsbb(int interp_stack_config_id);
2528
2538 int interp_stack_config_id, char const * filename);
2539
2544 void yac_cadd_interp_stack_config_fixed( int interp_stack_config_id,
2545 double value);
2546
2556 void yac_cadd_interp_stack_config_check( int interp_stack_config_id,
2557 char const * constructor_key,
2558 char const * do_search_key);
2559
2564 void yac_cadd_interp_stack_config_creep( int interp_stack_config_id,
2565 int creep_distance);
2566
2574 int interp_stack_config_id,
2575 char const * func_compute_weights_key);
2576
2646#ifndef TYPEDEF_YAC_FUNC_COMPUTE_WEIGHTS
2647#define TYPEDEF_YAC_FUNC_COMPUTE_WEIGHTS
2648
2649// Remark: make sure that this typedef is consistent with the one in interp_method_callback.h
2651 double const tgt_coords[3], int src_cell_id, size_t src_cell_idx,
2652 int const ** global_results_points, double ** result_weights,
2653 size_t * result_count, void * user_data);
2654#endif
2655
2668 yac_func_compute_weights compute_weights_callback,
2669 void * user_data,
2670 char const * key);
2671
2679 char const * interp_stack_config, int * interp_stack_config_id);
2680
2688 char const * interp_stack_config, int * interp_stack_config_id);
2689
2690#endif // YAC_H
enum yac_interp_ncc_weight_type weight_type
void * user_data
char * key
struct @7::@8 value
enum callback_type type
int const YAC_YEAR_OF_365_DAYS
Definition yac.c:62
void yac_cdef_comps(const char **comp_names, int num_comps, int *comp_ids)
Definition yac.c:870
int const YAC_REDUCTION_TIME_AVERAGE
Definition yac.c:47
void yac_cenddef_and_emit_config(int emit_flags, char **config)
Definition yac.c:2968
void yac_cdef_points_curve2d(int const grid_id, int const *nbr_points, int const location, double const *x_points, double const *y_points, int *point_id)
Definition yac.c:990
void yac_cread_config_yaml_instance(int yac_instance_id, const char *yaml_file)
Definition yac.c:464
void yac_ccompute_grid_cell_areas(int grid_id, double *cell_areas)
Definition yac.c:3530
void yac_cinit_comm_dummy(MPI_Comm comm)
Definition yac.c:428
void yac_cget_grid_names(int nbr_grids, const char **grid_names)
Definition yac.c:3125
void yac_cadd_interp_stack_config_ncc(int interp_stack_config_id, int weight_type, int partial_coverage)
Definition yac.c:3604
void yac_cread_config_json_instance(int yac_instance_id, const char *json_file)
Definition yac.c:478
void yac_cget_ext_couple_config_scale_factor(int ext_couple_config_id, double *scale_factor)
Definition yac.c:1425
const char * yac_cget_field_metadata_instance(int yac_instance_id, const char *comp_name, const char *grid_name, const char *field_name)
Definition yac.c:1315
void yac_cexchange_frac(int const send_field_id, int const recv_field_id, int const collection_size, double ***const send_field, double ***const send_frac_mask, double **recv_field, int *send_info, int *recv_info, int *ierror)
Definition yac.c:2780
int const YAC_NCC_AVG
Definition yac.c:69
void yac_cget_async(int const field_id, int const collection_size, double **recv_field, int *info, int *ierror)
Definition yac.c:1969
void yac_cadd_interp_stack_config_spmap(int interp_stack_config_id, double spread_distance, double max_search_distance, int weight_type, int scale_type, double src_sphere_radius, double tgt_sphere_radius)
Definition yac.c:3662
void yac_cput_frac_ptr_(int const field_id, int const collection_size, double **send_field, double **send_frac_mask, int *info, int *ierror)
Definition yac.c:2145
void yac_cenddef(void)
Definition yac.c:2953
yac_abort_func yac_get_abort_handler(void)
void yac_ccheck_field_dimensions(int field_id, int collection_size, int num_pointsets, int const *pointset_sizes)
Definition yac.c:1659
void yac_cget_groupcomm_instance(int yac_instance_id, MPI_Comm *group_comm)
void yac_cenable_field_frac_mask(const char *comp_name, const char *grid_name, const char *field_name, double frac_mask_fallback_value)
Definition yac.c:1237
int const YAC_ACTION_OUT_OF_BOUND
put/get is outside of the valid range
Definition yac.c:43
void yac_cget_ext_couple_config_mapping_side(int ext_couple_config_id, int *mapping_side)
Definition yac.c:1402
void yac_cput_(int const field_id, int const collection_size, double *send_field, int *info, int *ierror)
Definition yac.c:2027
int const YAC_SPMAP_SRCAREA
Definition yac.c:85
int const YAC_CONFIG_OUTPUT_SYNC_LOC_ENDDEF
Definition yac.c:102
char * yac_cget_start_datetime_instance(int yac_instance_id)
Definition yac.c:670
void yac_cset_global_index(int const *global_index, int location, int grid_id)
Definition yac.c:3438
void yac_cset_grid_output_file_instance(int yac_instance_id, const char *gridname, const char *filename)
Definition yac.c:537
int const YAC_NNN_RBF
Definition yac.c:75
void yac_cdef_datetime_instance(int yac_instance_id, const char *start_datetime, const char *end_datetime)
Definition yac.c:629
int yac_cget_role_from_field_id(int field_id)
Definition yac.c:3260
int yac_cget_nbr_grids_instance(int yac_instance_id)
Definition yac.c:3013
void yac_cfree_ext_couple_config(int ext_couple_config_id)
Definition yac.c:1350
const char * yac_cget_grid_metadata_instance(int yac_instance_id, const char *grid_name)
Definition yac.c:1302
char * yac_cget_end_datetime_instance(int yac_instance_id)
Definition yac.c:685
void yac_cdef_datetime(const char *start_datetime, const char *end_datetime)
Definition yac.c:638
int const YAC_SPMAP_INVTGTAREA
Definition yac.c:86
void yac_cget_ext_couple_config_mask_name(int ext_couple_config_id, char const **tgt_mask_name)
Definition yac.c:1503
int const YAC_LOCATION_CELL
Definition yac.c:27
int const YAC_REDUCTION_TIME_MINIMUM
Definition yac.c:48
void yac_cset_ext_couple_config_tgt_mask_name(int ext_couple_config_id, char const *tgt_mask_name)
Definition yac.c:1496
void yac_cget_async_(int const field_id, int const collection_size, double *recv_field, int *info, int *ierror)
Definition yac.c:1951
void yac_cdef_field(char const *field_name, int const component_id, int const *point_ids, int const num_pointsets, int collection_size, const char *timestep, int time_unit, int *field_id)
Definition yac.c:1194
void yac_cdef_grid_metadata(const char *grid_name, const char *metadata)
Definition yac.c:1268
int const YAC_TIME_UNIT_MINUTE
Definition yac.c:53
void yac_cdef_grid_curve2d(const char *grid_name, int nbr_vertices[2], int cyclic[2], double *x_vertices, double *y_vertices, int *grid_id)
Definition yac.c:3362
void yac_cget_grid_names_instance(int yac_instance_id, int nbr_grids, const char **grid_names)
Definition yac.c:3105
void yac_cset_ext_couple_config_scale_factor(int ext_couple_config_id, double scale_factor)
Definition yac.c:1418
int const YAC_NCC_DIST
Definition yac.c:70
void yac_cadd_interp_stack_config_creep(int interp_stack_config_id, int creep_distance)
Definition yac.c:3734
void yac_cdef_mask(int const grid_id, int const nbr_points, int const location, int const *is_valid, int *mask_id)
Definition yac.c:1093
void yac_cdef_component_metadata(const char *comp_name, const char *metadata)
Definition yac.c:1254
int const YAC_TIME_UNIT_YEAR
Definition yac.c:57
void yac_cexchange(int const send_field_id, int const recv_field_id, int const collection_size, double ***const send_field, double **recv_field, int *send_info, int *recv_info, int *ierror)
Definition yac.c:2916
int yac_cget_field_role(const char *comp_name, const char *grid_name, const char *field_name)
Definition yac.c:3335
void yac_ccleanup()
Definition yac.c:589
int const YAC_AVG_ARITHMETIC
Definition yac.c:65
void yac_set_default_comm(MPI_Comm comm)
void yac_cput_frac_(int const field_id, int const collection_size, double *send_field, double *send_frac_mask, int *info, int *ierror)
Definition yac.c:2048
void yac_cadd_compute_weights_callback(yac_func_compute_weights compute_weights_callback, void *user_data, char const *key)
Definition yac.c:3757
void yac_cmpi_handshake(MPI_Comm comm, size_t n, char const **group_names, MPI_Comm *group_comms)
Definition yac.c:343
void yac_cput(int const field_id, int const collection_size, double ***const send_field, int *info, int *ierror)
Definition yac.c:2625
int const YAC_REDUCTION_TIME_MAXIMUM
Definition yac.c:49
int const YAC_TIME_UNIT_MILLISECOND
Definition yac.c:51
int yac_cget_field_id_instance(int yac_instance_id, const char *comp_name, const char *grid_name, const char *field_name)
Definition yac.c:2979
int yac_cget_comp_nbr_grids_instance(int yac_instance_id, const char *comp_name)
Definition yac.c:3026
void yac_cdef_grid_unstruct_ll(const char *grid_name, int nbr_vertices, int nbr_cells, int *num_vertices_per_cell, double *x_vertices, double *y_vertices, int *cell_to_vertex, int *grid_id)
Definition yac.c:3401
const char * yac_cget_timestep_from_field_id(int field_id)
Definition yac.c:3246
int yac_cget_nbr_fields(const char *comp_name, const char *grid_name)
Definition yac.c:3074
int const YAC_NNN_GAUSS
Definition yac.c:74
int const YAC_YAML_EMITTER_DEFAULT
emit to YAML format
Definition config_yaml.c:63
void yac_csync_def_instance(int yac_instance_id)
Definition yac.c:2933
void yac_cget_interp_stack_config_from_string_json(char const *interp_stack_config, int *interp_stack_config_id)
Definition yac.c:3795
void yac_csync_def(void)
Definition yac.c:2938
void(* yac_abort_func)(MPI_Comm comm, const char *msg, const char *source, int line) __attribute__((noreturn))
Definition yac.h:2347
int const YAC_TIME_UNIT_HOUR
Definition yac.c:54
void yac_cinit(void)
Definition yac.c:418
int const YAC_YEAR_OF_360_DAYS
Definition yac.c:63
void yac_cfinalize_instance(int yac_instance_id)
Definition yac.c:608
void yac_cfinalize()
Definition yac.c:617
const char * yac_cget_field_name_from_field_id(int field_id)
Definition yac.c:3239
void yac_cadd_interp_stack_config_check(int interp_stack_config_id, char const *constructor_key, char const *do_search_key)
Definition yac.c:3722
void yac_cenddef_instance(int yac_instance_id)
Definition yac.c:2946
void yac_cset_ext_couple_config_src_mask_names(int ext_couple_config_id, size_t num_src_mask_names, char const *const *src_mask_names)
Definition yac.c:1471
int const YAC_YAML_EMITTER_JSON
emit to JSON format
Definition config_yaml.c:64
int yac_cget_nbr_comps_instance(int yac_instance_id)
Definition yac.c:3000
int yac_cget_nbr_fields_instance(int yac_instance_id, const char *comp_name, const char *grid_name)
Definition yac.c:3054
void yac_cdef_comp(const char *comp_name, int *comp_id)
Definition yac.c:884
void yac_cget_ext_couple_config(int *ext_couple_config_id)
Definition yac.c:1342
void yac_cdef_grid_metadata_instance(int yac_instance_id, const char *grid_name, const char *metadata)
Definition yac.c:1259
void yac_cset_ext_couple_config_weight_file(int ext_couple_config_id, char const *weight_file)
Definition yac.c:1369
const char * yac_cget_component_metadata_instance(int yac_instance_id, const char *comp_name)
Definition yac.c:1289
int const YAC_LOCATION_CORNER
Definition yac.c:28
void yac_cdef_couple_custom(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_timestep, int time_unit, int time_reduction, int interp_stack_config_id, int src_lag, int tgt_lag, int ext_couple_config_id)
Definition yac.c:1553
const char * yac_cget_field_timestep_instance(int yac_instance_id, const char *comp_name, const char *grid_name, const char *field_name)
Definition yac.c:3269
void yac_cset_ext_couple_config_scale_summand(int ext_couple_config_id, double scale_summand)
Definition yac.c:1441
void yac_cget_comp_comm(int comp_id, MPI_Comm *comp_comm)
Definition yac.c:727
const char * yac_cget_field_datetime(int field_id)
Definition yac.c:1763
int const YAC_SPMAP_AVG
Definition yac.c:81
int const YAC_CONSERV_DESTAREA
Definition yac.c:78
int const YAC_EXCHANGE_TYPE_SOURCE
Definition yac.c:32
void yac_cupdate(int field_id)
Definition yac.c:1783
void yac_cget_action(int field_id, int *action)
Definition yac.c:1720
size_t yac_cget_grid_size(int location, int grid_id)
Definition yac.c:3519
int const YAC_REDUCTION_TIME_ACCUMULATE
Definition yac.c:46
void yac_abort(MPI_Comm comm, const char *msg, const char *source, int line) __attribute__((noreturn))
int yac_cget_field_id(const char *comp_name, const char *grid_name, const char *field_name)
Definition yac.c:2992
void yac_cget_ext_couple_config_src_mask_names(int ext_couple_config_id, size_t *num_src_mask_names, char const *const **src_mask_names)
Definition yac.c:1479
const char * yac_cget_grid_name_from_field_id(int field_id)
Definition yac.c:3231
int yac_cget_collection_size_from_field_id(int field_id)
Definition yac.c:3253
void yac_cdef_comps_instance(int yac_instance_id, const char **comp_names, int num_comps, int *comp_ids)
Definition yac.c:845
void yac_cdef_grid_reg2d(const char *grid_name, int nbr_vertices[2], int cyclic[2], double *x_vertices, double *y_vertices, int *grid_id)
Definition yac.c:3344
int const YAC_EXCHANGE_TYPE_NONE
Definition yac.c:31
void yac_cdef_couple_custom_instance(int yac_instance_id, 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_timestep, int time_unit, int time_reduction, int interp_stack_config_id, int src_lag, int tgt_lag, int ext_couple_config_id)
Definition yac.c:1538
void yac_cset_config_output_file_instance(int yac_instance_id, const char *filename, int fileformat, int sync_location, int include_definitions)
Definition yac.c:494
void yac_cget_comps_comm(const char **comp_names, int num_comps, MPI_Comm *comps_comm)
Definition yac.c:777
void yac_cinit_comm_instance(MPI_Comm comm, int *yac_instance_id)
Definition yac.c:380
int const YAC_EXCHANGE_TYPE_TARGET
Definition yac.c:33
void yac_cput_frac(int const field_id, int const collection_size, double ***const send_field, double ***const send_frac_mask, int *info, int *ierror)
Definition yac.c:2535
const char * yac_cget_grid_metadata(const char *grid_name)
Definition yac.c:1310
void yac_cenable_field_frac_mask_instance(int yac_instance_id, const char *comp_name, const char *grid_name, const char *field_name, double frac_mask_fallback_value)
Definition yac.c:1225
char * yac_cget_start_datetime(void)
Definition yac.c:677
void yac_cget_interp_stack_config_from_string_yaml(char const *interp_stack_config, int *interp_stack_config_id)
Definition yac.c:3787
int const YAC_TIME_UNIT_MONTH
Definition yac.c:56
int const YAC_CONFIG_OUTPUT_FORMAT_YAML
Definition yac.c:89
int const YAC_TIME_UNIT_SECOND
Definition yac.c:52
void yac_cget(int const field_id, int const collection_size, double **recv_field, int *info, int *ierror)
Definition yac.c:1960
void yac_cadd_interp_stack_config_conservative(int interp_stack_config_id, int order, int enforced_conserv, int partial_coverage, int normalisation)
Definition yac.c:3643
void yac_cdef_grid_cloud(const char *grid_name, int nbr_points, double *x_points, double *y_points, int *grid_id)
Definition yac.c:3422
void yac_cget_comps_comm_instance(int yac_instance_id, const char **comp_names, int num_comps, MPI_Comm *comps_comm)
Definition yac.c:767
void yac_cdef_grid_unstruct(const char *grid_name, int nbr_vertices, int nbr_cells, int *num_vertices_per_cell, double *x_vertices, double *y_vertices, int *cell_to_vertex, int *grid_id)
Definition yac.c:3380
char * yac_cget_version(void)
Definition yac.c:703
int const YAC_LOCATION_EDGE
Definition yac.c:29
void yac_cput_ptr_(int const field_id, int const collection_size, double **send_field, int *info, int *ierror)
Definition yac.c:2125
void yac_cexchange_ptr_(int const send_field_id, int const recv_field_id, int const collection_size, double **send_field, double **recv_field, int *send_info, int *recv_info, int *ierror)
Definition yac.c:2714
#define __attribute__(x)
Definition yac.h:2336
void yac_cexchange_frac_(int const send_field_id, int const recv_field_id, int const collection_size, double *send_field, double *send_frac_mask, double *recv_field, int *send_info, int *recv_info, int *ierror)
Definition yac.c:2672
int yac_cget_default_instance_id()
Definition yac.c:375
void yac_cadd_interp_stack_config_user_file(int interp_stack_config_id, char const *filename)
Definition yac.c:3701
void yac_cexchange_frac_ptr_(int const send_field_id, int const recv_field_id, int const collection_size, double **send_field, double **send_frac_mask, double **recv_field, int *send_info, int *recv_info, int *ierror)
Definition yac.c:2744
void(* yac_func_compute_weights)(double const tgt_coords[3], int src_cell_id, size_t src_cell_idx, int const **global_results_points, double **result_weights, size_t *result_count, void *user_data)
Definition yac.h:2650
const char * yac_cget_component_name_from_field_id(int field_id)
Definition yac.c:3224
int yac_cget_field_collection_size(const char *comp_name, const char *grid_name, const char *field_name)
Definition yac.c:3317
int const YAC_CONFIG_OUTPUT_SYNC_LOC_DEF_COMP
Definition yac.c:98
void yac_restore_default_abort_handler(void)
int const YAC_SPMAP_FRACAREA
Definition yac.c:87
void yac_cdef_component_metadata_instance(int yac_instance_id, const char *comp_name, const char *metadata)
Definition yac.c:1246
void yac_cenddef_and_emit_config_instance(int yac_instance_id, int emit_flags, char **config)
Definition yac.c:2959
void yac_abort_message(char const *msg, const char *source, int line)
yac_abort_func yac_get_default_abort_handler(void)
char * yac_cget_end_datetime(void)
Definition yac.c:692
void yac_cread_config_yaml(const char *yaml_file)
Definition yac.c:473
int const YAC_ACTION_NONE
no data exchanges
Definition yac.c:35
void yac_cdef_calendar(int calendar)
Definition yac.c:646
int const YAC_SPMAP_NONE
Definition yac.c:84
void yac_cset_core_mask(int const *is_core, int location, int grid_id)
Definition yac.c:3479
void yac_cwait(int field_id)
Definition yac.c:2200
int yac_cget_calendar()
Definition yac.c:663
int const YAC_CONFIG_OUTPUT_SYNC_LOC_SYNC_DEF
Definition yac.c:100
void yac_cget_comp_names(int nbr_comps, const char **comp_names)
Definition yac.c:3099
const char * yac_cget_field_metadata(const char *comp_name, const char *grid_name, const char *field_name)
Definition yac.c:1324
int const YAC_ACTION_REDUCTION
data reduction, but data exchange
Definition yac.c:36
void yac_cdef_field_mask(char const *field_name, int const component_id, int const *point_ids, int const *mask_ids, int const num_pointsets, int collection_size, const char *timestep, int time_unit, int *field_id)
Definition yac.c:1121
int const YAC_ACTION_GET_FOR_RESTART
last valid get
Definition yac.c:39
int const YAC_PROLEPTIC_GREGORIAN
Definition yac.c:61
void yac_cdef_points_unstruct(int const grid_id, int const nbr_points, int const location, double const *x_points, double const *y_points, int *point_id)
Definition yac.c:1028
void yac_cget_comp_grid_names_instance(int yac_instance_id, const char *comp_name, int nbr_grids, const char **grid_names)
Definition yac.c:3130
double yac_cget_field_frac_mask_fallback_value(const char *comp_name, const char *grid_name, const char *field_name)
Definition yac.c:3309
void yac_cset_mask(int const *is_valid, int points_id)
Definition yac.c:1102
void yac_cadd_interp_stack_config_hcsbb(int interp_stack_config_id)
Definition yac.c:3692
void yac_cdef_comp_instance(int yac_instance_id, const char *comp_name, int *comp_id)
Definition yac.c:878
void yac_cadd_interp_stack_config_fixed(int interp_stack_config_id, double value)
Definition yac.c:3712
int const YAC_TIME_UNIT_DAY
Definition yac.c:55
int yac_cget_comp_nbr_grids(const char *comp_name)
Definition yac.c:3049
int const YAC_ACTION_COUPLING
data exchange
Definition yac.c:37
double yac_cget_field_frac_mask_fallback_value_instance(int yac_instance_id, const char *comp_name, const char *grid_name, const char *field_name)
Definition yac.c:3288
int const YAC_TIME_UNIT_ISO_FORMAT
Definition yac.c:58
void yac_cpredef_comp_instance(int yac_instance_id, char const *comp_name, int *comp_id)
Definition yac.c:807
int const YAC_AVG_DIST
Definition yac.c:66
int yac_cget_field_role_instance(int yac_instance_id, const char *comp_name, const char *grid_name, const char *field_name)
Definition yac.c:3324
int const YAC_CONSERV_FRACAREA
Definition yac.c:79
void yac_cadd_interp_stack_config_user_callback(int interp_stack_config_id, char const *func_compute_weights_key)
Definition yac.c:3744
void yac_cset_ext_couple_config_mapping_side(int ext_couple_config_id, int mapping_side)
Definition yac.c:1395
void yac_ccleanup_instance(int yac_instance_id)
Definition yac.c:581
int yac_cget_field_collection_size_instance(int yac_instance_id, const char *comp_name, const char *grid_name, const char *field_name)
Definition yac.c:3299
void yac_cfree_interp_stack_config(int interp_stack_config_id)
Definition yac.c:3565
int const YAC_CALENDAR_NOT_SET
Definition yac.c:60
void yac_cset_grid_output_file(const char *gridname, const char *filename)
Definition yac.c:554
int const YAC_NNN_AVG
Definition yac.c:72
void yac_cdef_points_reg2d(int const grid_id, int const *nbr_points, int const location, double const *x_points, double const *y_points, int *point_id)
Definition yac.c:954
void yac_cadd_interp_stack_config_nnn(int interp_stack_config_id, int type, size_t n, double max_search_distance, double scale)
Definition yac.c:3622
void yac_cget_ext_couple_config_scale_summand(int ext_couple_config_id, double *scale_summand)
Definition yac.c:1448
int const YAC_CONFIG_OUTPUT_FORMAT_JSON
Definition yac.c:90
void yac_cinit_instance(int *yac_instance_id)
Definition yac.c:406
void yac_ctest(int field_id, int *flag)
Definition yac.c:2176
void yac_cset_config_output_file(const char *filename, int fileformat, int sync_location, int include_definitions)
Definition yac.c:525
void yac_cget_interp_stack_config(int *interp_stack_config_id)
Definition yac.c:3551
void yac_cinit_dummy(void)
Definition yac.c:444
void yac_cadd_interp_stack_config_average(int interp_stack_config_id, int reduction_type, int partial_coverage)
Definition yac.c:3585
int const YAC_ACTION_PUT_FOR_RESTART
last valid put
Definition yac.c:40
int const YAC_NNN_ZERO
Definition yac.c:76
void yac_cread_config_json(const char *json_file)
Definition yac.c:487
void yac_cpredef_comp(char const *comp_name, int *comp_id)
Definition yac.c:840
int const YAC_SPMAP_DIST
Definition yac.c:82
size_t yac_cget_points_size(int points_id)
Definition yac.c:3539
void yac_cdef_couple_instance(int yac_instance_id, 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_timestep, int time_unit, int time_reduction, int interp_stack_config_id, int src_lag, int tgt_lag)
Definition yac.c:1568
void yac_cdef_couple(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_timestep, int time_unit, int time_reduction, int interp_stack_config_id, int src_lag, int tgt_lag)
Definition yac.c:1585
int yac_cget_nbr_comps(void)
Definition yac.c:3008
void yac_cdef_field_metadata_instance(int yac_instance_id, const char *comp_name, const char *grid_name, const char *field_name, const char *metadata)
Definition yac.c:1273
int const YAC_AVG_BARY
Definition yac.c:67
void yac_set_abort_handler(yac_abort_func custom_abort)
void yac_cget_(int const field_id, int const collection_size, double *recv_field, int *info, int *ierror)
Definition yac.c:1942
void yac_cdef_mask_named(int const grid_id, int const nbr_points, int const location, int const *is_valid, char const *name, int *mask_id)
Definition yac.c:1074
int const YAC_NNN_DIST
Definition yac.c:73
void yac_cget_comp_grid_names(const char *comp_name, int nbr_grids, const char **grid_names)
Definition yac.c:3172
int yac_cget_nbr_grids()
Definition yac.c:3021
void yac_cget_field_names_instance(int yac_instance_id, const char *comp_name, const char *grid_name, int nbr_fields, const char **field_names)
Definition yac.c:3178
void yac_cexchange_(int const send_field_id, int const recv_field_id, int const collection_size, double *send_field, double *recv_field, int *send_info, int *recv_info, int *ierror)
Definition yac.c:2639
int const YAC_REDUCTION_TIME_NONE
Definition yac.c:45
void yac_cget_comp_names_instance(int yac_instance_id, int nbr_comps, const char **comp_names)
Definition yac.c:3079
void yac_cdef_field_metadata(const char *comp_name, const char *grid_name, const char *field_name, const char *metadata)
Definition yac.c:1282
const char * yac_cget_component_metadata(const char *comp_name)
Definition yac.c:1297
const char * yac_cget_field_timestep(const char *comp_name, const char *grid_name, const char *field_name)
Definition yac.c:3281
void yac_cget_field_names(const char *comp_name, const char *grid_name, int nbr_fields, const char **field_names)
Definition yac.c:3217
void yac_cget_groupcomm(MPI_Comm *group_comm)
void yac_cget_ext_couple_config_weight_file(int ext_couple_config_id, char const **weight_file)
Definition yac.c:1376
void yac_cinit_comm(MPI_Comm comm)
Definition yac.c:392