imod.mf6.ConstantHead.from_imod5_data#

classmethod ConstantHead.from_imod5_data(key: str, 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 chd packages are defined in the imod5 data.

If they are not, then 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. In that case, use the from_imod5_shd_data function instead of this one.

The creation of a chd package from shd data should only be done if no chd packages at all are present in the imod5_data

Parameters:
  • key (str) – The key used in the imod5 data dictionary that is used to refer to the chd package that we want to import.

  • 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 (RegridMethodType, optional) – Optional dataclass with regridder types for a specific variable. Use this to override default regridding methods.

Return type:

A list of Modflow 6 ConstantHead packages.