imod.formats.prj.open_projectfile_data#
- imod.formats.prj.open_projectfile_data(path: str | PathLike[str]) Dict[str, Any] [source]#
Read the contents of an iMOD project file and read/open the data present in it:
IDF data is lazily loaded into xarray.DataArrays.
GEN data is eagerly loaded into geopandas.GeoDataFrames
IPF data is eagerly loaded into pandas.DataFrames
Non-file based entries (such as the PCG settings) are kept as a dictionary.
When multiple systems are present, they are numbered starting from one, e.g.:
drn-1
drn-2
Xarray requires valid dates for the time coordinate. Aliases such as “summer” and “winter” that are associated with dates in the project file Periods block cannot be used in the time coordinate. Hence, this function will instead insert the dates associated with the aliases, with the year replaced by 1899; as the iMOD calendar starts at 1900, this ensures that the repeats are always first and that no date collisions will occur.
- Parameters:
path (pathlib.Path or str.)
- Returns:
data (Dict[str, Any])
Keys are the iMOD project file “topics”, without parentheses.