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]], period_data: dict[str, list[~datetime.datetime]], target_dis: ~imod.mf6.dis.StructuredDiscretization, time_min: ~datetime.datetime, time_max: ~datetime.datetime, regridder_types: ~imod.mf6.regrid.regrid_schemes.ConstantHeadRegridMethod | None = None, regrid_cache: ~imod.util.regrid.RegridderWeightsCache = <imod.util.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.period_data (dict) – Dictionary with iMOD5 period 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.
time_min (datetime) – Begin-time of the simulation. Used for expanding period data.
time_max (datetime) – End-time of the simulation. Used for expanding period data.
regridder_types (RegridMethodType, 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 list of Modflow 6 ConstantHead packages.