YAC 3.21.0
Yet Another Coupler
Loading...
Searching...
No Matches
yac.YAC Class Reference

Initializies a YAC instance and provides further functionality. More...

Collaboration diagram for yac.YAC:
Collaboration graph

Public Member Functions

 __init__ (self, comm=None, default_instance=False)
 
 default_instance_id_defined (cls)
 
 default_instance (cls)
 
 from_id (cls, id)
 
 __del__ (self)
 
 cleanup (self)
 
 size (self)
 number of processes in this instance
 
 rank (self)
 process index in this instance
 
 def_comp (self, str comp_name)
 
 def_comps (self, comp_names=[])
 
 predef_comp (self, str comp_name)
 
 def_datetime (self, start_datetime, end_datetime)
 
 start_datetime (self)
 
 end_datetime (self)
 
 sync_def (self)
 
 sync_def_comps (self, list comp_names)
 
 def_couple (self, str src_comp, str src_grid, src_field, str tgt_comp, str tgt_grid, tgt_field, str coupling_timestep, TimeUnit timeunit, Reduction time_reduction, interp_stack, src_lag=0, tgt_lag=0, weight_file=None, WeightFileOnExisting weight_file_on_existing=WeightFileOnExisting.OVERWRITE, mapping_on_source=1, scale_factor=1.0, scale_summand=0.0, src_masks_names=None, tgt_mask_name=None, yaxt_exchanger_name=None, collection_selection=None, use_raw_exchange=False)
 
 enddef (self)
 
 get_component (self, str comp_name)
 
 get_grid (self, str grid_name)
 
 component_names (self)
 
 grid_names (self)
 
 get_comp_grid_names (self, comp_name)
 
 get_field_names (self, str comp_name, str grid_name)
 
 get_field_is_defined (self, str comp_name, str grid_name, str field_name)
 
 get_field_id (self, str comp_name, str grid_name, str field_name)
 
 get_field (self, str comp_name, str grid_name, str field_name)
 
 get_field_timestep (self, str comp_name, str grid_name, str field_name)
 
 get_field_role (self, str comp_name, str grid_name, str field_name)
 
 get_field_source (self, str comp_name, str grid_name, str field_name)
 
 get_field_collection_size (self, str comp_name, str grid_name, str field_name)
 
 get_field_frac_mask_fallback_value (self, str comp_name, str grid_name, str field_name)
 
 enable_field_frac_mask (self, str comp_name, str grid_name, str field_name, _np.float64 frac_mask_fallback_value)
 
 def_component_metadata (self, str comp_name, bytes metadata)
 
 def_grid_metadata (self, str grid_name, bytes metadata)
 
 def_field_metadata (self, str comp_name, str grid_name, str field_name, bytes metadata)
 
 get_component_metadata (self, str comp_name)
 
 get_grid_metadata (self, str grid_name)
 
 get_field_metadata (self, str comp_name, str grid_name, str field_name)
 
 get_comps_comm (self, comp_names)
 
 read_config_yaml (self, str yaml_file)
 
 set_config_output_file (self, str filename, ConfigOutputFormat fileformat, ConfigOutputSyncLoc sync_location, bool include_definitions=False)
 
 set_grid_output_file (self, str gridname, str filename)
 
 set_grids_output_file (self, str filename)
 
 set_coordinates_check (self, bool check_coordinates)
 
 set_coordinates_mismatch_is_fatal (self, bool mismatch_is_fatal)
 

Data Fields

 instance_id
 
 owned_instance
 
 default_instance_id_defined
 

Detailed Description

Initializies a YAC instance and provides further functionality.

The destructor finalizes the YAC instance by calling yac_cfinalize_instance

Definition at line 755 of file yac.pyx.

Constructor & Destructor Documentation

◆ __init__()

yac.YAC.__init__ ( self,
comm = None,
default_instance = False )
See also
yac_cinit_instance

Definition at line 761 of file yac.pyx.

Here is the call graph for this function:

◆ __del__()

yac.YAC.__del__ ( self)

Definition at line 818 of file yac.pyx.

Here is the call graph for this function:

Member Function Documentation

◆ cleanup()

yac.YAC.cleanup ( self)
See also
yac_ccleanup_instance

Definition at line 821 of file yac.pyx.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ component_names()

yac.YAC.component_names ( self)
See also
yac_cget_comp_names

Definition at line 1049 of file yac.pyx.

Here is the call graph for this function:

◆ def_comp()

yac.YAC.def_comp ( self,
str comp_name )
See also
yac_cdef_comp_instance

Definition at line 849 of file yac.pyx.

Here is the call graph for this function:

◆ def_component_metadata()

yac.YAC.def_component_metadata ( self,
str comp_name,
bytes metadata )
See also
yac_cdef_component_metadata

Definition at line 1194 of file yac.pyx.

Here is the call graph for this function:

◆ def_comps()

yac.YAC.def_comps ( self,
comp_names = [] )
See also
yac_cdef_comps_instance

Definition at line 859 of file yac.pyx.

Here is the call graph for this function:

◆ def_couple()

yac.YAC.def_couple ( self,
str src_comp,
str src_grid,
src_field,
str tgt_comp,
str tgt_grid,
tgt_field,
str coupling_timestep,
TimeUnit timeunit,
Reduction time_reduction,
interp_stack,
src_lag = 0,
tgt_lag = 0,
weight_file = None,
WeightFileOnExisting weight_file_on_existing = WeightFileOnExisting.OVERWRITE,
mapping_on_source = 1,
scale_factor = 1.0,
scale_summand = 0.0,
src_masks_names = None,
tgt_mask_name = None,
yaxt_exchanger_name = None,
collection_selection = None,
use_raw_exchange = False )
See also
yac_cdef_couple_instance

Definition at line 957 of file yac.pyx.

Here is the call graph for this function:

◆ def_datetime()

yac.YAC.def_datetime ( self,
start_datetime,
end_datetime )
See also
yac_cdef_datetime_instance

The parameters can be given either as a string in iso8601 format or as datetime objects

Datetimes are interpreted with UTC semantics and are stored without a timezone offset. If no time zone is provided, UTC is assumed. Explicitly specifying UTC as Z or +00:00 is allowed; using other time zones than UTC is not supported and will lead to an error.

Definition at line 887 of file yac.pyx.

◆ def_field_metadata()

yac.YAC.def_field_metadata ( self,
str comp_name,
str grid_name,
str field_name,
bytes metadata )
See also
yac_cdef_field_metadata

Definition at line 1210 of file yac.pyx.

Here is the call graph for this function:

◆ def_grid_metadata()

yac.YAC.def_grid_metadata ( self,
str grid_name,
bytes metadata )
See also
yac_cdef_grid_metadata

Definition at line 1202 of file yac.pyx.

Here is the call graph for this function:

◆ default_instance()

yac.YAC.default_instance ( cls)
See also
yac_cget_default_instance_id
Returns
Default instance if exists, None if no default instance exists

Definition at line 800 of file yac.pyx.

◆ default_instance_id_defined()

yac.YAC.default_instance_id_defined ( cls)
Returns
True if default_instance_id is defined

Definition at line 793 of file yac.pyx.

Here is the call graph for this function:

◆ enable_field_frac_mask()

yac.YAC.enable_field_frac_mask ( self,
str comp_name,
str grid_name,
str field_name,
_np.float64 frac_mask_fallback_value )
See also
yac_cenable_field_frac_mask

Definition at line 1182 of file yac.pyx.

Here is the call graph for this function:

◆ end_datetime()

yac.YAC.end_datetime ( self)
See also
yac_cget_end_datetime_instance (datetime.datetime, read-only).

Definition at line 931 of file yac.pyx.

Here is the call graph for this function:

◆ enddef()

yac.YAC.enddef ( self)
See also
yac_cenddef_instance

Definition at line 1029 of file yac.pyx.

Here is the call graph for this function:

◆ from_id()

yac.YAC.from_id ( cls,
id )

Definition at line 812 of file yac.pyx.

◆ get_comp_grid_names()

yac.YAC.get_comp_grid_names ( self,
comp_name )
See also
yac_cget_comp_grid_names

Definition at line 1072 of file yac.pyx.

Here is the call graph for this function:

◆ get_component()

yac.YAC.get_component ( self,
str comp_name )
See also
yac_cget_comp_id_instance

Definition at line 1036 of file yac.pyx.

Here is the call graph for this function:

◆ get_component_metadata()

yac.YAC.get_component_metadata ( self,
str comp_name )
See also
yac_cget_component_metadata

Definition at line 1221 of file yac.pyx.

Here is the call graph for this function:

◆ get_comps_comm()

yac.YAC.get_comps_comm ( self,
comp_names )
See also
yac_cget_comps_comm

Definition at line 1247 of file yac.pyx.

Here is the call graph for this function:

◆ get_field()

yac.YAC.get_field ( self,
str comp_name,
str grid_name,
str field_name )
See also
yac_cget_field_id

Definition at line 1115 of file yac.pyx.

◆ get_field_collection_size()

yac.YAC.get_field_collection_size ( self,
str comp_name,
str grid_name,
str field_name )
See also
yac_cget_field_collection_size
Return values
intthe collection size, if defined for this field
Noneif no collection size is defined for this field

Definition at line 1159 of file yac.pyx.

Here is the call graph for this function:

◆ get_field_frac_mask_fallback_value()

yac.YAC.get_field_frac_mask_fallback_value ( self,
str comp_name,
str grid_name,
str field_name )
See also
yac_cget_field_frac_mask_fallback_value

Definition at line 1173 of file yac.pyx.

Here is the call graph for this function:

◆ get_field_id()

yac.YAC.get_field_id ( self,
str comp_name,
str grid_name,
str field_name )
See also
yac_cget_field_id

Definition at line 1106 of file yac.pyx.

◆ get_field_is_defined()

yac.YAC.get_field_is_defined ( self,
str comp_name,
str grid_name,
str field_name )
See also
yac_cget_field_is_defined

Definition at line 1097 of file yac.pyx.

◆ get_field_metadata()

yac.YAC.get_field_metadata ( self,
str comp_name,
str grid_name,
str field_name )
See also
yac_cget_field_metadata

Definition at line 1237 of file yac.pyx.

Here is the call graph for this function:

◆ get_field_names()

yac.YAC.get_field_names ( self,
str comp_name,
str grid_name )
See also
yac_cget_field_names

Definition at line 1083 of file yac.pyx.

Here is the call graph for this function:

◆ get_field_role()

yac.YAC.get_field_role ( self,
str comp_name,
str grid_name,
str field_name )
See also
yac_cget_field_role

Definition at line 1134 of file yac.pyx.

◆ get_field_source()

yac.YAC.get_field_source ( self,
str comp_name,
str grid_name,
str field_name )

Definition at line 1143 of file yac.pyx.

Here is the call graph for this function:

◆ get_field_timestep()

yac.YAC.get_field_timestep ( self,
str comp_name,
str grid_name,
str field_name )
See also
yac_cget_field_timestep

Definition at line 1124 of file yac.pyx.

Here is the call graph for this function:

◆ get_grid()

yac.YAC.get_grid ( self,
str grid_name )
See also
yac_cget_grid_id

Definition at line 1042 of file yac.pyx.

Here is the call graph for this function:

◆ get_grid_metadata()

yac.YAC.get_grid_metadata ( self,
str grid_name )
See also
yac_cget_grid_metadata

Definition at line 1229 of file yac.pyx.

Here is the call graph for this function:

◆ grid_names()

yac.YAC.grid_names ( self)
See also
yac_cget_grid_names

Definition at line 1061 of file yac.pyx.

Here is the call graph for this function:

◆ predef_comp()

yac.YAC.predef_comp ( self,
str comp_name )
See also
yac_cpredef_comp_instance

Definition at line 877 of file yac.pyx.

Here is the call graph for this function:

◆ rank()

yac.YAC.rank ( self)

process index in this instance

Definition at line 841 of file yac.pyx.

Here is the call graph for this function:

◆ read_config_yaml()

yac.YAC.read_config_yaml ( self,
str yaml_file )
See also
yac_cread_config_yaml_instance

Definition at line 1262 of file yac.pyx.

Here is the call graph for this function:

◆ set_config_output_file()

yac.YAC.set_config_output_file ( self,
str filename,
ConfigOutputFormat fileformat,
ConfigOutputSyncLoc sync_location,
bool include_definitions = False )
See also
yac_cset_config_output_file_instance

Definition at line 1269 of file yac.pyx.

Here is the call graph for this function:

◆ set_coordinates_check()

yac.YAC.set_coordinates_check ( self,
bool check_coordinates )
See also
yac_cset_coordinates_check_instance

Definition at line 1297 of file yac.pyx.

Here is the call graph for this function:

◆ set_coordinates_mismatch_is_fatal()

yac.YAC.set_coordinates_mismatch_is_fatal ( self,
bool mismatch_is_fatal )
See also
yac_cset_coordinates_mismatch_is_fatal_instance

Definition at line 1304 of file yac.pyx.

Here is the call graph for this function:

◆ set_grid_output_file()

yac.YAC.set_grid_output_file ( self,
str gridname,
str filename )
See also
yac_cset_grid_output_file_instance

Definition at line 1282 of file yac.pyx.

Here is the call graph for this function:

◆ set_grids_output_file()

yac.YAC.set_grids_output_file ( self,
str filename )
See also
yac_cset_grids_output_file_instance

Definition at line 1290 of file yac.pyx.

Here is the call graph for this function:

◆ size()

yac.YAC.size ( self)

number of processes in this instance

Definition at line 832 of file yac.pyx.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ start_datetime()

yac.YAC.start_datetime ( self)
See also
yac_cget_start_datetime_instance (datetime.datetime, read-only).

Definition at line 923 of file yac.pyx.

Here is the call graph for this function:

◆ sync_def()

yac.YAC.sync_def ( self)
See also
yac_csync_def_instance

Definition at line 938 of file yac.pyx.

Here is the call graph for this function:

◆ sync_def_comps()

yac.YAC.sync_def_comps ( self,
list comp_names )
See also
yac_csync_def_comps_instance

Definition at line 945 of file yac.pyx.

Here is the call graph for this function:

Field Documentation

◆ default_instance_id_defined

yac.YAC.default_instance_id_defined

Definition at line 806 of file yac.pyx.

◆ instance_id

yac.YAC.instance_id

Definition at line 789 of file yac.pyx.

◆ owned_instance

yac.YAC.owned_instance

Definition at line 790 of file yac.pyx.


The documentation for this class was generated from the following file: