Skip to content

Latest commit

Β 

History

History
1882 lines (1603 loc) Β· 84.6 KB

File metadata and controls

1882 lines (1603 loc) Β· 84.6 KB

Changelog

All notable changes to this project will be documented in this file.

The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.

[Unreleased]

Added

Fixed

Changed

  • proportion_depth and proportion_rate in :class:`imod.mf6.Evapotranspiration` are now optional variables. If provided, now require "segment" dimension when proportion_depth and proportion_rate.

[1.0.0] - 2025-11-11

Fixed

Added

Changed

[1.0.0rc7] - 2025-10-28

Added

Changed

Removed

Fixed

[1.0.0rc6] - 2025-08-28

Small post-release to fix rendering of documentation online.

[1.0.0rc5] - 2025-08-27

Added

Fixed

Changed

Removed

[1.0.0rc4] - 2025-06-20

Added

Fixed

Changed

[1.0.0rc3] - 2025-04-17

Added

Fixed

[1.0.0rc2] - 2025-03-05

From this release on, we recommend using xugrid's regridding utilities for regridding individual grids instead of :class:`imod.prepare.Regridder`. Xugrid's regridders are tested to be about 10 times faster than :class:`imod.prepare.Regridder`. There is one small difference: xugrid's xugrid.BaryCentricInterpolator considers sample points of the destination grid that lie on the source grid's cell edges to be inside, whereas :class:`imod.prepare.Regridder` considers them to be outside. This difference is negligible for most applications, but might create slightly fewer np.nan values than before.

Removed

  • imod.flow module has been removed for generating iMODFLOW models. Use imod.mf6 instead to generate MODFLOW 6 models.

Added

Changed

Fixed

[1.0.0rc1] - 2024-12-20

Small post-release fix for installation instructions in documentation.

[1.0.0rc0] - 2024-12-20

Added

Fixed

Changed

[0.18.1] - 2024-11-20

Added

Fixed

  • Relaxed validation for imod.mf6.StructuredDiscretization to also support cells with zero thickness where IDOMAIN = 0. Before, only cells with a zero thickness and IDOMAIN = -1 were supported, else the software threw a not all values comply with criterion: > bottom.
  • Fix bug where no ValidationError was thrown if there is an active RCH, DRN, GHB, or RIV cell where idomain = -1.

Changed

[0.18.0] - 2024-11-11

Fixed

  • Multiple HorizontalFlowBarrier objects attached to :class:`imod.mf6.GroundwaterFlowModel` are merged into a single horizontal flow barrier for MODFLOW 6.
  • Bug where error would be thrown when barriers in a HorizontalFlowBarrier would be snapped to the same cell edge. These are now summed.
  • Improve performance validation upon Package initialization
  • Improve performance writing HorizontalFlowBarrier objects
  • :func:`imod.mf6.open_cbc` failing with flowja=False on budget output for DISV models if the model contained inactive cells.
  • :func:`imod.mf6.open_cbc` now works for 2D and 1D models.
  • :func:`imod.prepare.fill` previously assigned to the result of an xarray .sel operation. This might not work for dask backed data and has been addressed.
  • Added :func:`imod.mf6.open_dvs` to read dependent variable output files like the water content file of :class:`imod.mf6.UnsaturatedZoneFlow`.
  • imod.prj.open_projectfile_data is now able to also read IPF data for sprinkling wells in the CAP package.
  • Fix that caused iMOD Python to break upon import with numpy >=1.23, <2.0 .
  • ValidationError message now contains a suggestion to use the cleanup method, if available in the erroneous package.
  • Bug where error was thrown when :class:`imod.mf6.NodePropertyFlow` was assigned to :class:`imod.mf6.GroundwaterFlowModel` with key different from "npf" upon writing, along with well or horizontal flow barrier packages.

Changed

Added

Removed

[0.17.2] - 2024-09-17

Fixed

Added

Changed

Fixed

[0.17.1] - 2024-05-16

Added

Changed

Fixed

  • Fix missing API docs for dump and write methods.

[0.17.0] - 2024-05-13

Added

Fixed

  • No ValidationError thrown anymore in :class:`imod.mf6.River` when bottom_elevation equals bottom in the model discretization.
  • When wells outside of the domain are added, an exception is raised with an error message stating a well is outside of the domain.
  • When importing data from a .prj file, the multipliers and additions specified for ipf and idf files are now applied
  • Fix bug where y-coords were flipped in :class:`imod.msw.MeteoMapping`

Changed

  • Replaced csv_output by outer_csvfile and inner_csvfile in :class:`imod.mf6.Solution` to match newer MODFLOW 6 releases.
  • Changed no_ptc from a bool to an option string in :class:`imod.mf6.Solution`.
  • Removed constructor arguments source and target from imod.mf6.utilities.regrid.RegridderWeightsCache, as they were not used.
  • :func:`imod.mf6.open_cbc` now returns arrays which contain np.nan for cells where budget variables are not defined. Based on new budget output a disquisition between active cells but zero flow and inactive cells can be made.
  • :func:`imod.mf6.open_cbc` now returns package type in return budget names. New format is "package type"-"optional package variable"_"package name". E.g. a River package named primary-sys will get a budget name riv_primary-sys. An UZF package with name uzf-sys1 will get a budget name uzf-gwrch_uzf-sys1 for the groundwater recharge budget from the UZF-CBC.

[0.16.0] - 2024-03-29

Added

Changed

Fixed

[0.15.3] - 2024-02-22

Fixed

Added

  • Developer environment: Added pixi environment interactive to interactively run code. Can be useful to plot data.
  • :class:`imod.mf6.ApiPackage` was added. It can be added to both flow and transport models, and its presence allows users to interact with libMF6.dll through its API.
  • Developer environment: Empty python 3.10, 3.11, 3.12 environments where pip install and import imod can be tested.

[0.15.2] - 2024-02-16

Fixed

  • iMOD Python now supports versions of pandas >= 2
  • Fixed bugs with clipping :class:`imod.mf6.HorizontalFlowBarrier` for structured grids
  • Packages and boundary conditions in the imod.mf6 module will now throw an error upon initialization if coordinate labels are inconsistent amongst variables
  • Improved performance for merging structured multimodel MODFLOW 6 output
  • Bug where :func:`imod.formats.idf.open_subdomains` did not properly support custom patterns
  • Added missing validation for concentration for :class:`imod.mf6.Drainage` and :class:`imod.mf6.EvapoTranspiration` package
  • Added validation :class:`imod.mf6.Well` package, no np.nan values are allowed
  • Fix support for coupling a GroundwaterFlowModel and Transport Model i.c.w. the 6.4.3 release of MODFLOW. Using an older version of iMOD Python with this version of MODFLOW will result in an error.

Changed

  • We moved to using pixi to create development environments. This replaces the imod-environment.yml conda environment. We advice doing development installations with pixi from now on. See the documentation. This does not affect users who installed with pip install imod, mamba install imod or conda install imod.
  • Changed build system from setuptools to hatchling. Users who did a development install are adviced to run pip uninstall imod and pip install -e . again. This does not affect users who installed with pip install imod, mamba install imod or conda install imod.
  • Decreased lower limit of MetaSWAP validation for x and y limits in the IdfMapping from 0 to -9999999.0.

[0.15.1] - 2023-12-22

Fixed

Changed

  • All the references to GitLab have been replaced by GitHub references as part of the GitHub migration.

Added

  • Added comment in Modflow6 exchanges file (GWFGWF) denoting column header.
  • Added Python 3.11 support.
  • The GWF-GWF exchange options are derived from user created packages (NPF, OC) and set automatically.
  • Added the simulation_start_time and time_unit arguments. To the Modflow6Simulation.open_ methods, and imod.mf6.out.open_ functions. This converts the "time" coordinate to datetimes.
  • added :meth:`imod.mf6.Modflow6Simulation.mask_all_models` to apply a mask to all models under a simulation, provided the simulation is not split and the models use the same discretization.

Changed

[0.15.0] - 2023-11-25

Fixed

Changed

Added

Removed

  • Tox has been removed from the project.
  • Dropped support for writing .qgs files directly for QGIS, as this was hard to maintain and rarely used. To export your model to QGIS readable files, call the dump method :class:`imod.mf6.Modflow6Simulation` with mdal_compliant=True. This writes UGRID NetCDFs which can read as meshes in QGIS.
  • Removed declxml from repository.

[0.14.1] - 2023-09-07

Changed

  • TWRI MODFLOW 6 example uses the grid-agnostic :class:`imod.mf6.Well` package instead of the imod.mf6.WellDisStructured package.

Fixed

  • :class:`imod.mf6.HorizontalFlowBarrier` would write to a binary file by default. However, the current version of MODFLOW 6 does not support this. Therefore, this class now always writes to text file.

[0.14.0] - 2023-09-06

Changed

Added

  • :meth:`imod.mf6.Modflow6Simulation.regrid_like` to regrid a Modflow6 simulation to a new grid (structured or unstructured), using xugrid's regridding functionality. Variables are regridded with pre-selected methods. The regridding functionality is useful for a variety of applications, for example to test the effect of different grid sizes, to add detail to a simulation (by refining the grid) or to speed up a simulation (by coarsening the grid) to name a few
  • :meth:`imod.mf6.Package.regrid_like` to regrid packages. The user can specify their own custom regridder types and methods for variables.
  • :meth:`imod.mf6.Modflow6Simulation.clip_box` got an extra argument states_for_boundary, which takes a dictionary with modelname as key and griddata as value. This data is specified as fixed state on the model boundary. At present only imod.mf6.GroundwaterFlowModel is supported, grid data is specified as a :class:`imod.mf6.ConstantHead` at the model boundary.
  • :class:`imod.mf6.Well`, a grid-agnostic well package, where wells can be specified based on their x,y coordinates and filter top and bottom.

[0.13.2] - 2023-07-26

Changed

  • :func:`imod.formats.rasterio.save` will now write ESRII ASCII rasters, even if rasterio is not installed. A fallback function has been added specifically for ASCII rasters.

Fixed

Added

[0.13.1] - 2023-05-05

Added

Fixed

[0.13.0] - 2023-05-02

Added

Fixed

[0.12.0] - 2023-03-17

Added

Fixed

Changed

  • :func:`imod.formats.ipf.save` will error on duplicate IDs for associated files if a "layer" column is present. As a dataframe is automatically broken down into a single IPF per layer, associated files for the first layer would be overwritten by the second, and so forth.
  • :meth:`imod.wq.Well.save` will now write time varying data to associated files for extration rate and concentration.
  • Choosing method="geometric_mean" in the Regridder will now result in NaN values in the regridded result if a geometric mean is computed over negative values; in general, a geometric mean should only be computed over physical quantities with a "true zero" (e.g. conductivity, but not elevation).

[0.11.6] - 2023-02-01

Added

Fixed

[0.11.5] - 2022-12-15

Fixed

Changed

  • Removed meshzoo dependency.
  • Minor changes to :mod:`imod.gen.gen` backend, to support Shapely 2.0 , Shapely version above equal v1.8 is now required.

Added

  • imod.flow.ImodflowModel.write now supports writing a config_run.ini to convert the projectfile to a runfile or modflow 6 namfile with iMOD5.
  • Added validation of Modflow6 Flow and Transport models. Incorrect model input will now throw a ValidationError. To turn off the validation, set validate=False upon package initialization and/or when calling :meth:`imod.mf6.Modflow6Simulation.write`.

[0.11.4] - 2022-09-05

Fixed

Changed

Added

[0.11.1] - 2021-12-23

Fixed

  • contextily, geopandas, pyvista, rasterio, and shapely are now fully optional dependencies. Import errors are only raised when accessing functionality that requires their use.
  • Include declxml as imod.declxml (should be internal use only!): declxml is no longer maintained on the official repository: https://github.com/gatkin/declxml. Furthermore, it has no conda feedstock, which makes distribution via conda difficult.

[0.11.0] - 2021-12-21

Fixed

Added

Changed

  • Documentation overhaul: different theme, add sample data for examples, add Frequently Asked Questions (FAQ) section, restructure API Reference. Examples now ru
  • Datetime columns in IPF associated files (via :func:`imod.formats.ipf.write_assoc`) will not be placed within quotes, as this can break certain iMOD batch functions.
  • :class:`imod.mf6.Well` has been renamed into imod.mf6.WellDisStructured.
  • :meth:`imod.mf6.GroundwaterFlowModel.write` will now write package names into the simulation namefile.
  • :func:`imod.mf6.open_cbc` will now return a dictionary with keys flow-front-face, flow-lower-face, flow-right-face for the face flows, rather than front-face-flow for better consistency.
  • Switched to composition from inheritance for all model packages: all model packages now contain an internal (xarray) Dataset, rather than inheriting from the xarray Dataset.
  • :class:`imod.mf6.SpecificStorage` or :class:`imod.mf6.StorageCoefficient` is now mandatory for every MODFLOW 6 model to avoid accidental steady-state configuration.

Removed

  • Module imod.tec for reading Tecplot files has been removed.

[0.10.1] - 2020-10-19

Changed

  • :meth:`imod.wq.SeawatModel.write` now generates iMOD-WQ runfiles with more intelligent use of the "macro tokens". : is used exclusively for ranges; $ is used to signify all layers. (This makes runfiles shorter, speeding up parsing, which takes a significant amount of time in the runfile to namefile conversion of iMOD-WQ.)
  • Datetime formats are inferred based on length of the time string according to %Y%m%d%H%M%S; supported lengths 4 (year only) to 14 (full format string).

Added

Fixed

  • IO methods for IDF files will now correctly identify double precision IDFs. The correct record length identifier is 2295 rather than 2296 (2296 was a typo in the iMOD manual).
  • :meth:`imod.wq.SeawatModel.write` will now write the correct path for recharge package concentration given in IDF files. It did not prepend the name of the package correctly (resulting in paths like concentration_l1.idf instead of rch/concentration_l1.idf).
  • :meth:`imod.formats.idf.save` will simplify constant cellsize arrays to a scalar value -- this greatly speeds up drawing in the iMOD-GUI.

[0.10.0] - 2020-05-23

Changed

Added

  • :meth:`from_file` constructors have been added to all imod.wq.Package. This allows loading directly package from a netCDF file (or any file supported by xarray.open_dataset), or a path to a Zarr directory with suffix ".zarr" or ".zip".
  • This can be combined with the cache argument in :meth:`from_file` to enable caching of answers to avoid repeated computation during :meth:`imod.wq.SeawatModel.write`; it works by checking whether input and output files have changed.
  • The resultdir_is_workspace argument has been added to :meth:`imod.wq.SeawatModel.write`. iMOD-wq writes a number of files (e.g. list file) in the directory where the runfile is located. This results in mixing of input and output. By setting it True, all model output is written in the results directory.
  • :func:`imod.visualize.imshow_topview` has been added to visualize a complete DataArray with atleast dimensions x and y; it dumps PNGs into a specified directory.
  • Some support for 3D visualization has been added. :func:`imod.visualize.grid_3d` and :func:`imod.visualize.line_3d` have been added to produce pyvista meshes from xarray.DataArray's and shapely polygons, respectively. :class:`imod.visualize.GridAnimation3D` and :class:`imod.visualize.StaticGridAnimation3D` have been added to setup 3D animations of DataArrays with transient data.
  • Support for out of core computation by imod.prepare.Regridder if source is chunked.
  • :func:`imod.formats.ipf.read` now reports the problematic file if reading errors occur.
  • :func:`imod.prepare.polygonize` added to polygonize DataArrays to GeoDataFrames.
  • Added more support for multiple species imod-wq models, specifically: scalar concentration for boundary condition packages and well IPFs.

Fixed

[0.9.0] - 2020-01-19

Added

Changed

Fixed

[0.8.0] - 2019-10-14

Added

Changed

[0.7.1] - 2019-08-07

Added

  • "multilinear" has been added as a regridding option to imod.prepare.Regridder to do linear interpolation up to three dimensions.
  • Boundary condition packages in imod.wq support a method called add_timemap to do cyclical boundary conditions, such as summer and winter stages.

Fixed

  • imod.idf.save no longer fails on a single IDF when it is a voxel IDF (when it has top and bottom data).
  • imod.prepare.celltable now succesfully does parallel chunkwise operations, rather than raising an error.
  • imod.Regridder's regrid method now succesfully returns source if all dimensions already have the right cell sizes, rather than raising an error.
  • imod.idf.open_subdomains is much faster now at merging different subdomain IDFs of a parallel modflow simulation.
  • imod.idf.save no longer suffers from extremely slow execution when the DataArray to save is chunked (it got extremely slow in some cases).
  • Package checks in imod.wq.SeawatModel succesfully reduces over dimensions.
  • Fix last case in imod.prepare.reproject where it did not allocate a new array yet, but returned like instead of the reprojected result.

[0.7.0] - 2019-07-23

Added

Changed

  • Namespaces: lift many functions one level, such that you can use e.g. the function imod.prepare.reproject instead of imod.prepare.reproject.reproject

Removed

  • All that was deprecated in v0.6.0

Deprecated

[0.6.1] - 2019-04-17

Added

  • Support nonequidistant models in runfile

Fixed

  • Time conversion in runfile now also accepts cftime objects

[0.6.0] - 2019-03-15

The primary change is that a number of functions have been renamed to better communicate what they do.

The load function name was not appropriate for IDFs, since the IDFs are not loaded into memory. Rather, they are opened and the headers are read; the data is only loaded when needed, in accordance with xarray's design; compare for example xarray.open_dataset. The function has been renamed to open.

Similarly, load for IPFs has been deprecated. imod.ipf.read now reads both single and multiple IPF files into a single pandas.DataFrame.

Removed

  • imod.idf.setnodataheader

Deprecated

  • Opening IDFs with imod.idf.load, use imod.idf.open instead
  • Opening a set of IDFs with imod.idf.loadset, use imod.idf.open_dataset instead
  • Reading IPFs with imod.ipf.load, use imod.ipf.read
  • Reading IDF data into a dask array with imod.idf.dask, use imod.idf._dask instead
  • Reading an iMOD-seawat .tec file, use imod.tec.read instead.

Changed

  • Use np.datetime64 when dates are within time bounds, use cftime.DatetimeProlepticGregorian when they are not (matches xarray defaults)
  • assert is no longer used to catch faulty input arguments, appropriate exceptions are raised instead

Fixed

  • idf.open: sorts both paths and headers consistently so data does not end up mixed up in the DataArray
  • idf.open: Return an xarray.CFTimeIndex rather than an array of cftime.DatimeProlepticGregorian objects
  • idf.save properly forwards nodata argument to write
  • idf.write coerces coordinates to floats before writing
  • ipf.read: Significant performance increase for reading IPF timeseries by specifying the datetime format
  • ipf.write no longer writes ,, for missing data (which iMOD does not accept)

[0.5.0] - 2019-02-26

Removed

  • Reading IDFs with the chunks option

Deprecated

  • Reading IDFs with the memmap option
  • imod.idf.dataarray, use imod.idf.load instead

Changed

  • Reading IDFs gives delayed objects, which are only read on demand by dask
  • IDF: instead of res and transform attributes, use dx and dy coordinates (0D or 1D)
  • Use cftime.DatetimeProlepticGregorian to support time instead of np.datetime64, allowing longer timespans
  • Repository moved from https://gitlab.com/deltares/ to https://gitlab.com/deltares/imod/

Added

  • Notebook in examples folder for synthetic model example
  • Support for nonequidistant IDF files, by adding dx and dy coordinates

Fixed

  • IPF support implicit itype