imod.prepare.allocate_rch_cells#

imod.prepare.allocate_rch_cells(allocation_option: ALLOCATION_OPTION, active: DataArray | UgridDataArray, rate: DataArray | UgridDataArray) DataArray | UgridDataArray[source]#

Allocate recharge 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 | UgridDataArray) – Boolean array containing active model cells. For Modflow 6, this is the equivalent of idomain == 1.

  • rate (DataArray | UgridDataArray) – Array with recharge rates. This will only be used to infer where recharge cells are defined.

Returns:

Allocated recharge cells

Return type:

DataArray | UgridDataArray

Examples

>>> from imod.prepare.topsystem import ALLOCATION_OPTION, allocate_rch_cells
>>> setting = ALLOCATION_OPTION.at_first_active
>>> allocated = allocate_rch_cells(setting, active, rate)