xugrid.UgridDataArrayAccessor.intersect_line#

UgridDataArrayAccessor.intersect_line(start: Sequence[float], end: Sequence[float]) DataArray[source]#

Intersect a line with the grid of this data, and fetch the values of the intersected faces.

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

  • start (sequence of two floats) – coordinate pair (x, y), designating the start point of the line.

  • end (sequence of two floats) – coordinate pair (x, y), designating the end point of the line.

Returns:

intersection – The length along the line is returned as the “s” coordinate.

Return type:

xr.DataArray