imod.prepare.allocate_ghb_cells#

imod.prepare.allocate_ghb_cells(allocation_option: ALLOCATION_OPTION, active: Union[DataArray, UgridDataArray], top: Union[DataArray, UgridDataArray], bottom: Union[DataArray, UgridDataArray], head: Union[DataArray, UgridDataArray]) Union[DataArray, UgridDataArray][source]#

Allocate general head boundary (GHB) 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.

  • head (DataArray | UgridDatarray) – Planar grid containing general head boundary’s head. Is not allowed to have a layer dimension.

Returns

Allocated general head boundary cells

Return type

DataArray | UgridDatarray

Examples

>>> from imod.prepare.topsystem import ALLOCATION_OPTION, allocate_ghb_cells
>>> setting = ALLOCATION_OPTION.at_elevation
>>> allocated = allocate_ghb_cells(setting, active, top, bottom, head)