imod.select.points_values#

imod.select.points_values(da, out_of_bounds='raise', **points)[source]#

Get values from specified points.

This function will raise a ValueError if the points fall outside of the bounds of the DataArray to avoid ambiguous behavior. Use the imod.select.points_in_bounds function to detect these points.

Parameters
  • da (xr.DataArray) –

  • out_of_bounds ({"raise", "warn", "ignore"}, default: "raise") – What to do if the points are not located in the bounds of the DataArray: - “raise”: raise an exception - “warn”: raise a warning, and ignore the missing points - “ignore”: ignore the missing points

  • points (keyword arguments of coordinate=values) – keyword arguments specifying coordinate and values.

Returns

selection

Return type

xr.DataArray

Examples

>>> x = [1.0, 2.2, 3.0]
>>> y = [4.0, 5.6, 7.0]
>>> selection = imod.select.points_values(da, x=x, y=y)