xugrid.UgridRolesAccessor#
- class xugrid.UgridRolesAccessor(ds: Dataset)[source]#
Xarray Dataset “accessor” to retrieve the names of UGRID variables.
Examples
To get a list of the UGRID dummy variables in the dataset:
>>> dataset.ugrid_roles.topology
To get the names of the connectivity variables in the dataset:
>>> dataset.ugrid_roles.connectivity
Names can also be accessed directly through the topology:
>>> dataset.ugrid_roles["mesh2d"]["node_dimension"]
Methods
__init__
(ds)Attributes
Get the names of the variables containing the UGRID connectivity data.
Get the names of the coordinate variables from the topology attributes.
Get the dimension names from the topology attributes and infer them from connectivity arrays or coordinates.
Get the names of the topology dummy variables, marked by a CF-role of
mesh_topology
.