imod.mf6.HorizontalFlowBarrierResistance.from_imod5_data#

classmethod HorizontalFlowBarrierResistance.from_imod5_data(key: str, imod5_data: Dict[str, dict[str, DataArray | UgridDataArray]])[source]#

Import HFB data from imod5 data dictionary. Data from “3D GEN” files, so with a polygon geometry, can be loaded with this method.

Parameters:
  • key (str) – Key in the imod5_data dictionary where the HFB data is stored.

  • imod5_data (Dict[str, GridDataDict]) – Dictionary with data from imod5, where the HFB data is stored under the provided key.

Returns:

HFB package with data from the imod5 data dictionary.

Return type:

HorizontalFlowBarrierResistance

Examples

Load HFB data from an imod5 data dictionary. The imod5 data dictionary can be obtained by reading a .prj file with the imod.prj.open_projectfile_data() function. The projectfile should point to 3D GEN files.

>>> imod5_data, _ = imod.prj.open_projectfile_data("path/to/prj/file.prj")
>>> hfb = HorizontalFlowBarrierResistance.from_imod5_data("hfb-1", imod5_data)