imod.prepare.allocate_riv_cells#

imod.prepare.allocate_riv_cells(allocation_option: ALLOCATION_OPTION, active: Union[DataArray, UgridDataArray], top: Union[DataArray, UgridDataArray], bottom: Union[DataArray, UgridDataArray], stage: Union[DataArray, UgridDataArray], bottom_elevation: Union[DataArray, UgridDataArray]) tuple[Union[xarray.core.dataarray.DataArray, xugrid.core.wrap.UgridDataArray], Union[xarray.core.dataarray.DataArray, xugrid.core.wrap.UgridDataArray, NoneType]][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)