xugrid.Ugrid2d.sel#

Ugrid2d.sel(obj, x=None, y=None)[source]#

Find selection in the UGRID x and y coordinates.

The indexing for x and y always occurs orthogonally, i.e.: .sel(x=[0.0, 5.0], y=[10.0, 15.0]) results in a four points. For vectorized indexing (equal to zip``ing through x and y), see ``.sel_points.

Parameters:
  • obj (xr.DataArray or xr.Dataset) –

  • x (float, 1d array, slice) –

  • y (float, 1d array, slice) –

Returns:

  • dimension (str)

  • as_ugrid (bool)

  • index (1d array of integers)

  • coords (dict)