Node attributes
- class anemoi.graphs.nodes.attributes.BaseNodeAttribute(norm: str | None = None, dtype: str = 'float32')
Bases:
ABC,NormaliserMixinBase class for the weights of the nodes.
- post_process(values: ndarray) Tensor
Post-process the values.
- class anemoi.graphs.nodes.attributes.UniformWeights(norm: str | None = None, dtype: str = 'float32')
Bases:
BaseNodeAttributeImplements a uniform weight for the nodes.
- compute(self, graph, nodes_name)
Compute the area attributes for each node.
- class anemoi.graphs.nodes.attributes.AreaWeights(flat: bool = False, **kwargs)
Bases:
BaseNodeAttributeImplements the area of the nodes as the weights.
- \*\*other
Additional keyword arguments, see PlanarAreaWeights and SphericalAreaWeights for details.
- Type:
Any
- compute(self, graph, nodes_name)
Compute the area attributes for each node.
- class anemoi.graphs.nodes.attributes.PlanarAreaWeights(norm: str | None = None, dtype: str = 'float32')
Bases:
BaseNodeAttributeImplements 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.SphericalAreaWeights(norm: str | None = None, radius: float = 1.0, centre: ndarray = array([0, 0, 0]), fill_value: float = 0.0, dtype: str = 'float32')
Bases:
BaseNodeAttributeImplements 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.
- class anemoi.graphs.nodes.attributes.NonmissingZarrVariable(variable: str)
Bases:
BooleanBaseNodeAttributeMask of valid (not missing) values of a Zarr dataset variable.
It reads a variable from a Zarr 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.CutOutMask
Bases:
BooleanBaseNodeAttributeCut out mask.
- class anemoi.graphs.nodes.attributes.BooleanNot(masks: str | Type[BooleanBaseNodeAttribute] | list[str | Type[BooleanBaseNodeAttribute]])
Bases:
BooleanOperationBoolean NOT mask.