Node attributes
- class anemoi.graphs.nodes.attributes.SphericalAreaWeights(norm: str | None = None, radius: float = 1.0, centre: ndarray = array([0, 0, 0]), fill_value: float = 0.0, dtype: str = 'float32')
Bases:
BaseNodeAttribute
Implements the 3D area of the nodes as the weights.
- centre
Centre of the sphere.
- Type:
np.ndarray
- compute(self, graph, nodes_name)
Compute the area attributes for each node.
- get_raw_values(nodes: NodeStorage, **kwargs) ndarray
Compute the area associated to each node.
It uses Voronoi diagrams to compute the area of each node.
- Parameters:
nodes (NodeStorage) – Nodes of the graph.
kwargs (dict) – Additional keyword arguments.
- Returns:
Attributes.
- Return type:
np.ndarray
- class anemoi.graphs.nodes.attributes.PlanarAreaWeights(norm: str | None = None, dtype: str = 'float32')
Bases:
BaseNodeAttribute
Implements the 2D area of the nodes as the weights.
- compute(self, graph, nodes_name)
Compute the area attributes for each node.
- class anemoi.graphs.nodes.attributes.UniformWeights(norm: str | None = None, dtype: str = 'float32')
Bases:
BaseNodeAttribute
Implements a uniform weight for the nodes.
- compute(self, graph, nodes_name)
Compute the area attributes for each node.
- class anemoi.graphs.nodes.attributes.CutOutMask
Bases:
BooleanBaseNodeAttribute
Cut out mask.
- class anemoi.graphs.nodes.attributes.NonmissingAnemoiDatasetVariable(variable: str)
Bases:
BooleanBaseNodeAttribute
Mask of valid (not missing) values of a Anemoi dataset variable.
It reads a variable from a Anemoi dataset and returns a boolean mask of nonmissing values in the first timestep.
- compute(self, graph, nodes_name)
Compute the attribute for each node.
- class anemoi.graphs.nodes.attributes.BooleanAndMask(masks: str | Type[BooleanBaseNodeAttribute] | list[str | Type[BooleanBaseNodeAttribute]])
Bases:
BooleanOperation
Boolean AND mask.