imod.prepare.cleanup_ghb#
- imod.prepare.cleanup_ghb(idomain: DataArray | UgridDataArray, head: DataArray | UgridDataArray, conductance: DataArray | UgridDataArray, concentration: DataArray | UgridDataArray | None = None) dict[str, DataArray | UgridDataArray] [source]#
Clean up general head boundary data, fixes some common mistakes causing ValidationErrors by doing the following:
Cells where conductance <= 0 are deactivated.
Cells where concentration < 0 are set to 0.0.
Cells outside active domain (idomain==1) are removed.
Align NoData: If one variable has an inactive cell in one cell, ensure this cell is deactivated for all variables.
- Parameters:
idomain (xarray.DataArray | xugrid.UgridDataArray) – MODFLOW 6 model domain. idomain==1 is considered active domain.
head (xarray.DataArray | xugrid.UgridDataArray) – Grid with heads
conductance (xarray.DataArray | xugrid.UgridDataArray) – Grid with conductances
concentration (xarray.DataArray | xugrid.UgridDataArray, optional) – Optional grid with concentrations
- Returns:
Dict of cleaned up grids. Has keys: “head”, “conductance”, “concentration”.
- Return type:
dict[str, xarray.DataArray | xugrid.UgridDataArray]