imod.prepare.allocate_riv_cells#

imod.prepare.allocate_riv_cells(allocation_option: ALLOCATION_OPTION, active: DataArray | UgridDataArray, top: DataArray | UgridDataArray, bottom: DataArray | UgridDataArray, stage: DataArray | UgridDataArray, bottom_elevation: DataArray | UgridDataArray) tuple[DataArray | UgridDataArray, DataArray | UgridDataArray | None][source]#

Allocate river cells from a planar grid across the vertical dimension. Multiple options are available, which can be selected in ALLOCATION_OPTION.

Parameters:
  • allocation_option (ALLOCATION_OPTION) – Chosen allocation option, can be selected using the ALLOCATION_OPTION enumerator.

  • active (DataArray | UgridDatarray) – Boolean array containing active model cells. For Modflow 6, this is the equivalent of idomain == 1.

  • top (DataArray | UgridDatarray) – Grid containing tops of model layers. If has no layer dimension, is assumed as top of upper layer and the other layers are padded with bottom values of the overlying model layer.

  • bottom (DataArray | UgridDatarray) – Grid containing bottoms of model layers.

  • stage (DataArray | UgridDatarray) – Planar grid containing river stages. Is not allowed to have a layer dimension.

  • bottom_elevation (DataArray | UgridDatarray) – Planar grid containing river bottom elevations. Is not allowed to have a layer dimension.

Returns:

Allocated river cells

Return type:

tuple(DataArray | UgridDatarray)

Examples

>>> from imod.prepare.topsystem import ALLOCATION_OPTION, allocate_riv_cells
>>> setting = ALLOCATION_OPTION.stage_to_riv_bot
>>> allocated = allocate_riv_cells(setting, active, top, bottom, stage, bottom_elevation)