imod.mf6.ConstantHead.from_imod5_shd_data#

classmethod ConstantHead.from_imod5_shd_data(imod5_data: dict[str, dict[str, ~xarray.core.dataarray.DataArray | ~xugrid.core.wrap.UgridDataArray]], target_dis: ~imod.mf6.dis.StructuredDiscretization, regridder_types: ~imod.mf6.regrid.regrid_schemes.ConstantHeadRegridMethod | None = None, regrid_cache: ~imod.mf6.utilities.regrid.RegridderWeightsCache = <imod.mf6.utilities.regrid.RegridderWeightsCache object>) ConstantHead[source]#

Construct a ConstantHead-package from iMOD5 data, loaded with the imod.formats.prj.open_projectfile_data() function.

This function can be used if no chd packages at all are defined in the imod5 data.

In that case, imod5 assumed that at all the locations where ibound = -1, a chd package is active with the starting head of the simulation as a constant.

So this function creates a single chd package that will be present at all locations where ibound == -1. The assigned head will be the starting head, specified in the array “shd” in the imod5 data.

Parameters:
  • imod5_data (dict) – Dictionary with iMOD5 data. This can be constructed from the imod.formats.prj.open_projectfile_data() method.

  • target_dis (StructuredDiscretization package) – The grid that should be used for the new package. Does not need to be identical to one of the input grids.

  • regridder_types (ConstantHeadRegridMethod, optional) – Optional dataclass with regridder types for a specific variable. Use this to override default regridding methods.

  • regrid_cache (RegridderWeightsCache, optional) – stores regridder weights for different regridders. Can be used to speed up regridding, if the same regridders are used several times for regridding different arrays.

Return type:

A Modflow 6 ConstantHead package.