xugrid.Ugrid2d.isel#

Ugrid2d.isel(indexers=None, return_index=False, **indexers_kwargs)[source]#

Select based on node, edge, or face.

Face selection always results in a valid UGRID topology. Node or edge selection may result in invalid topologies (incomplete faces), and will error in such a case.

Parameters:
  • indexers (dict of str to np.ndarray of integers or bools)

  • return_index (bool, optional) – Whether to return node_index, edge_index, face_index.

Returns:

  • obj (xr.Dataset or xr.DataArray)

  • grid (Ugrid2d)

  • indexes (dict) – Dictionary with keys node dimension, edge dimension, face dimension and values their respective index. Only returned if return_index is True.