imod.select.upper_active_layer#

imod.select.upper_active_layer(da, is_ibound=True, include_constant_head=False)[source]#

Function to get the upper active layer from ibound xarray.DataArray

Parameters:
  • da (xarray.DataArray) – A 3D DataArray

  • is_ibound (bool, optional) – If True, da is interpreted as ibound, with values 0: inactive, 1: active, -1 constant head. If False, upper_active_layer is interpreted as first layer that has data. Default is True.

  • include_constant_head (bool, optional) – If True and is_ibound, also include constant head cells. Default is False.

Return type:

2d xr.DataArray of layernumber of upper active model layer