imod.prepare.allocate_drn_cells#
- imod.prepare.allocate_drn_cells(allocation_option: ALLOCATION_OPTION, active: DataArray | UgridDataArray, top: DataArray | UgridDataArray, bottom: DataArray | UgridDataArray, elevation: DataArray | UgridDataArray) DataArray | UgridDataArray [source]#
Allocate drain 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.
elevation (DataArray | UgridDatarray) – Planar grid containing drain elevation. Is not allowed to have a layer dimension.
- Returns:
Allocated drain cells
- Return type:
DataArray | UgridDatarray
Examples
>>> from imod.prepare.topsystem import ALLOCATION_OPTION, allocate_drn_cells >>> setting = ALLOCATION_OPTION.at_elevation >>> allocated = allocate_drn_cells(setting, active, top, bottom, stage, drain_elevation)