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.
- Added
ignore_time_purge_emptyargument to :meth:`imod.mf6.Modflow6Simulation.mask_all_models` and :meth:`imod.mf6.Modflow6Simulation.clip_box` to consider a package empty if its first times step is all nodata. This can save a lot of clipping or masking transient models with many timesteps. - Added :meth:`imod.msw.MetaSwapModel.split` to split MetaSWAP models.
- Added
submodel_label_to_mpi_rankargument to :meth:`imod.mf6.Modflow6Simulation.split` for specifing the MPI rank for each label in case of parallel simulation. - Added
write_hpc_fileargument to :meth:`imod.mf6.Modflow6Simulation.write for writing the HPC file with the model to MPI rank mappings in case of parallel simulation.
- Fixed bug where :class:`imod.mf6.Evapotranspiration` package would write files
to binary, which could not be parsed by MODFLOW 6 when
proportion_depthandproportion_ratewere provided without segments. - Fixed bug where :class:`imod.mf6.ConstantConcentration` package could not be written for multiple timesteps.
- Fixed bug where :meth:`imod.mf6.Modflow6Simulation.clip_box` where a ValidationError
was thrown when clipping a model with a :class:`imod.mf6.ConstantHead` or
:class:`imod.mf6.ConstantConcentration` package with a
timedimension and providingstates_for_boundary. - Fixed bug where :meth:`imod.mf6.Modflow6Simulation.clip_box` would drop layers if
states_for_boundarywere provided and the model already contained a :class:`imod.mf6.ConstantHead` or :class:`imod.mf6.ConstantConcentration` with less layers. - Fixed bug where :meth:`imod.mf6.Modflow6Simulation.clip_box` would not properly
align timesteps and forward fill data if
states_for_boundarywere provided and the model already contained a :class:`imod.mf6.ConstantHead` or :class:`imod.mf6.ConstantConcentration`, both with timesteps, which were unaligned. - Fixed bug where :class:`imod.mf6.Lake` package did not pass
budgetfile,budgetcsvfile,stagefileoptions to the written MODFLOW 6 package. - Fixed bug where :func:`imod.evaluate.convert_pointwaterhead_freshwaterhead` produced incorrect results when point water heads were below elevation levels for unstructured grids.
- Support pandas 3.0.
- :class:`imod.msw.IdfMapping` when model clipping is applied, the global row/column indices are converted to local indices, as writen in idf_svat.inp.
proportion_depthandproportion_ratein :class:`imod.mf6.Evapotranspiration` are now optional variables. If provided, now require"segment"dimension whenproportion_depthandproportion_rate.
- Improved performance of :meth:`imod.mf6.Modflow6Simulation.split` for large models loaded lazily into memory. Reduced a splitting operation of 2 hours to a few minutes for a test case.
- Issue where :meth:`imod.mf6.LayeredWell.from_imod5_data` would result in wells with a mismatch between coordinates and rates.
- Added :class:`imod.mf6.Viscosity` package to specify the viscosity of the groundwater flow model.
- Functionality to dump and load MODFLOW 6 simulations to/from zarr and zipstore formats. See :meth:`imod.mf6.Modflow6Simulation.dump` and :meth:`imod.mf6.Modflow6Simulation.from_file` for more information.
- :class:`imod.mf6.Well` and :func:`imod.prepare.assign_wells` now distribute the well rates over the screened cells using a correction factor based on the mismatch between the well screen center and the cell center, equal to iMOD5's correction factor.
- :meth:`imod.mf6.Modflow6Simulation.set_validation_settings` to set validation settings for a MODFLOW 6 simulation. See :class:`imod.mf6.ValidationSettings` for more information.
- No automatic validation upon calling :meth:`imod.mf6.Modflow6Simulation.regrid_like` anymore.
Use the
validateargument of :meth:`imod.mf6.Modflow6Simulation.write` to validate the regridded model upon writing instead. - :class:`imod.mf6.River` now ignore confined cells (
icelltype == 0) when validating whether the river bottom elevation is below the model bottom elevation. - Moved :func:`imod.select.get_upper_active_layer_number`, :func:`imod.select.get_upper_active_cells`, :func:`imod.select.get_lower_active_cells`, and :func:`imod.select.get_lower_active_layer_number` from :mod:`imod.prepare`. to :mod:`imod.select`.
- :class:`imod.mf6.Dispersion` now is not a required package for :class:`imod.mf6.GroundwaterTransportModel` anymore.
- No validation anymore for
icelltypeupon writing :class:`imod.mf6.SpecificStorage` and :class:`imod.mf6.StorageCoefficient`.
- Removed
imod.select.upper_active_layerfunction, use :func:`imod.select.get_upper_active_layer_number` instead.
- Fixed bug where :meth:`imod.mf6.Modflow6Simulation.split` could result in
empty exchanges being present in the
split_exchangespackage list, when two models were isolated by inactive cells from each other. These empty exchanges are now removed. - Fixed bug where :meth:`imod.mf6.Modflow6Simulation.split`, :meth:`imod.mf6.Modflow6Simulation.regrid_like`, and :meth:`imod.mf6.Modflow6Simulation.clip_box` would not copy :class:`imod.mf6.ValidationSettings`.
landuse,soil_physical_unit,activefor :class:`imod.msw.GridData` are now properly regridded with themodestatistic when using :meth:`imod.msw.GridData.regrid_like`.
Small post-release to fix rendering of documentation online.
- :meth:`imod.mf6.River.reallocate`, :meth:`imod.mf6.Drainage.reallocate`, :meth:`imod.mf6.GeneralHeadBoundary.reallocate`, :meth:`imod.mf6.Recharge.reallocate` to reallocate the package data to a new discretization or :class:`imod.mf6.NodePropertyFlow` package, or to use a different :class:`imod.prepare.ALLOCATION_OPTION` or :class:`imod.prepare.DISTRIBUTING_OPTION`.
- Added :meth:`imod.mf6.HorizontalFlowBarrierResistance.snap_to_grid` and :meth:`imod.mf6.SingleLayerHorizontalFlowBarrierResistance.snap_to_grid` to debug how horizontal flow barriers are snapped to a grid.
- Added :meth:`imod.mf6.Modflow6Simulation.create_partition_labels` to create partition labels for a MODFLOW 6 simulation from its idomain. This is useful for splitting a simulation into multiple submodels.
- :class:`imod.mf6.AdaptiveTimeStepping` to specify adaptive time stepping settings for MODFLOW 6 simulations.
- The
ats_percelargument to :class:`imod.mf6.AdvectionTVD`, :class:`imod.mf6.AdvectionUpstream`, :class:`imod.mf6.AdvectionCentral` to adapt the time step based on the maximum fraction of a cell that a solute parcel is allowed to travel.
- Reduce noisy warnings in models loaded with :meth:`imod.mf6.Modflow6Simulation.from_imod5_data` which have layers with cells with zero thicknesses.
- Issue where regridding lead to excessively large inactive areas.
- Issue where regridding would lead to very large negative integer values (like IDOMAIN) for inactive areas.
- Issue where :meth:`imod.mf6.Well.from_imod5_data` and :meth:`imod.mf6.LayeredWell.from_imod5_data` would throw a KeyError 0 upon trying to resample timeseries with a non-zero index.
- Fixed bug where :class:`imod.mf6.HorizontalFlowBarrierResistance`, :class:`imod.mf6.SingleLayerHorizontalFlowBarrierResistance` and other HFB packages would have resistances that were double the expected value with xugrid >= 0.14.2
- The
states_for_boundaryargument now also works for tranport models in :meth:`imod.mf6.Modflow6Simulation.clip_box`. - Fix bug where :meth:`imod.mf6.Modflow6Simulation.clip_box` and the
states_for_boundaryargument would place these bc at the incorrect places with unstructured grids. - Fixed bug where :meth:`imod.mf6.SourceSinkMixing.from_flow_model` would return
an error upon adding a package which cannot have a
concentration, such as :class:`imod.mf6.HorizontalFlowBarrierResistance`. - Broken names for
outer_csvfileandinner_csvfilein the :class:`imod.mf6.Solution` MODFLOW 6 template file.
- :meth:`imod.mf6.StructuredDiscretization.from_imod5_data` and :meth:`imod.mf6.NodePropertyFlow.from_imod5_data` now automatically load the dataset into memory. This improves performance when loading models with multiple topsystem packages.
- No upper limit anymore for
mod_idinmod2svat.inpfor :class:`imod.msw.CouplerMapping`. - :func:`imod.prepare.create_partition_labels` now takes an
idomaingrid instead of :class:`imod.mf6.Modflow6Simulation` as first argument. To generate partition labels from a :class:`imod.mf6.Modflow6Simulation` straightaway, use the newly added :meth:`imod.mf6.Modflow6Simulation.create_partition_labels` method instead.
- Removed
imod.mf6.WellDisStructuredandimod.mf6.WellDisVertices. Use :class:`imod.mf6.Well` and :class:`imod.mf6.LayeredWell` instead. The :class:`imod.mf6.Well` package can be used to specify wells with filters, :class:`imod.mf6.LayeredWell` directly to layers. - Removed
imod.mf6.multimodel.partition_generator.get_label_array, use :func:`imod.prepare.create_partition_labels` instead. - Removed
imod.formats.idf.readuse :func:`imod.formats.idf.open` instead. - Removed
imod.formats.rasterio.readuse :func:`imod.formats.rasterio.open` instead. - Removed
headargument for :class:`imod.mf6.InitialConditions`, usestartinstead. - Removed
cell_averagingargument for :class:`imod.mf6.NodePropertyFlow`, usealternative_cell_averaginginstead. - Removed
set_repeat_stressmethod from boundary condition packages like :class:`imod.mf6.River`. Userepeat_stressargument instead. - Removed
time_discretizationmethod from :class:`imod.mf6.Modflow6Simulation` and :class:`imod.wq.SeawatModel`. Use :meth:`imod.mf6.Modflow6Simulation.create_time_discretization` and :meth:`imod.wq.SeawatModel.create_time_discretization` instead. - Removed
imod.util.round_extent, use :func:`imod.prepare.round_extent` instead. - Removed :class:`imod.prepare.Regridder`. Use the xugrid regridder instead.
- Added
weightsargument to :func:`imod.prepare.create_partition_labels` to weigh how the simulation should be partioned. Areas with higher weights will result in smaller partions. - iMOD Python version is now written in a comment line to MODFLOW6 and
MetaSWAP's
para_sim.inpfiles. This is useful for debugging purposes. - Added option
ignore_time_purge_emptyto :meth:`imod.mf6.Modflow6Simulation.split` to consider a package empty if its first times step is all nodata. This can save a lot of time splitting transient models. - Add :class:`imod.mf6.ValidationSettings` to specify validation settings for MODFLOW 6 simulations. You can provide it to the :class:`imod.mf6.Modflow6Simulation` constructor.
- Upon providing an unexpected coordinate in the mask or regridding grid, :meth:`imod.mf6.Modflow6Simulation.regrid_like` and :meth:`imod.mf6.Modflow6Simulation.mask_all_models` now present the unexpected coordinates in the error message.
- :class:`imod.mf6.VerticesDiscretization` now correctly sets the
xoriginsandyoriginsoptions in the.disvfile. Incorrect origins cause issues when splitting models and computing with XT3D on the exchanges. - :func:`imod.mf6.open_cbc` and :func:`imod.mf6.open_hds` now account for xorigins and yorigins for models ran with :class:`imod.mf6.VerticesDiscretization`. WARNING: Given that these were set incorrectly in previous versions of iMOD Python (see previous item in this list), this means that reading MODFLOW6 DISV output of models generated with a previous version of iMOD Python will result in a grid with an erroneous offset. You can work around this by creating the model again with this version of iMOD Python or newer.
- :meth:`imod.mf6.Modflow6Simulation.split` supports label array with a
different name than
"idomain". - :func:`imod.msw.MetaSwapModel.from_imod5_data` now supports the usage of relative paths for the extra files block.
- Bug in :meth:`imod.msw.Sprinkling.write` where MetaSWAP svats with surface
water sprinkling and no groundwater sprinkling activated were not written to
scap_svat.inp. - :class:`imod.msw.IdfMapping` swapped order of y_grid and x_grid in dictionary for writing the correct order of coordinates in idf_svat.inp.
- Improved performance of :meth:`imod.mf6.Modflow6Simulation.split` and :meth:`imod.mf6.Modflow6Simulation.mask_all_models` when using dask.
- Fixed bug in :meth:`imod.mf6.Modflow6Simulation.mask_all_models` for unstructured grids
with a spatial dimension that differs from the default
"mesh2d_nFaces". - Fixed bug in :meth:`imod.mf6.Well.cleanup` and :meth:`imod.mf6.LayeredWell.cleanup` which caused an error when called with an unstructured discretization.
- Fixed bug in :func:`imod.formats.prj.open_projectfile_data` which caused an error when a periods keyword was used having an upper case.
- Poor performance of :meth:`imod.mf6.Well.from_imod5_data` and
:meth:`imod.mf6.LayeredWell.from_imod5_data` when the
imod5_datacontained a well system with a large number of wells (>10k). - :meth:`imod.mf6.River.from_imod5_data`, :meth:`imod.mf6.Drainage.from_imod5_data`, :meth:`imod.mf6.GeneralHeadBoundary.from_imod5_data` can now deal with constant values for variables. One variable per package still needs to be a grid.
- Fix bug where an error was thrown in
get_non_grid_datawhen calling the.cleanupandregrid_likemethods on a boundary condition package with a repeated stress. For example, :meth:`imod.mf6.River.cleanup` or :meth:`imod.mf6.River.regrid_like`. - Fix bug where an error was thrown in :class:`imod.mf6.Well` when an entry had
to be filtered and its
iddidn't match the index. - Improved performance of :class:`imod.mf6.Modflow6Simulation.split` for structured models, as unnecessary masking is avoided.
- Fixed warning thrown by type dispatcher about
~GeoDataFrameType - Fixed bug where variables in a package with only a
"layer"coordinate could not be regridded or masked.
- :meth:`imod.wq.SeawatModel.write` now throws an error if trying to write in a directory with a space in the path. (iMOD-WQ does not support this.)
- imod.mf6.multimodel.partition_generator.get_label_array moved to :func:`imod.prepare.create_partition_labels`.
- :func:`imod.prepare.create_partition_labels` structured grids are now partioned by METIS instead (just like already was the case for unstructured grids). This results in more balanced partitions for grids with non-square domains or lots of inactive cells. Downside is that the partitions are more often than not perfectly rectangular in shape.
- :func:`imod.prepare.create_partition_labels` now returns a griddata with the
name
"label"instead of"idomain". - Upon providing the wrong type to one of the options of
:class:`imod.mf6.GroundwaterFlowModel`,
:class:`imod.mf6.GroundwaterTransportModel`, this will throw a
ValidationErrorupon initialization and writing. - You can now also provide
repeat_stressas dictionary to imod.mf6 boundary conditions, such as :class:`imod.mf6.River`, :class:`imod.mf6.Drainage`, and :class:`imod.mf6.GeneralHeadBoundary`. - :meth:`imod.mf6.ConstantHead.from_imod5_data`, :meth:`imod.mf6.GeneralHeadBoundary.from_imod5_data`, :meth:`imod.mf6.River.from_imod5_data`, :meth:`imod.mf6.Recharge.from_imod5_data`, and :meth:`imod.mf6.Drainage.from_imod5_data` now forward fill data over time, instead of clipping, when selecting a start time that is inbetween two data records.
- :meth:`imod.mf6.ConstantHead.from_imod5_data` and
:meth:`imod.mf6.Recharge.from_imod5_data` got extra arguments for
period_data,time_minandtime_max. - :func:`imod.visualize.read_imod_legend` now also returns the labels as an extra
argument. Update your code by changing
colors, levels = read_imod_legend(...)tocolors, levels, labels = read_imod_legend(...).
- :meth:`imod.msw.MetaSwapModel.clip_box` to clip MetaSWAP models.
- Methods of class :class:`imod.mf6.Modflow6Simulation` can now be logged.
- :func:`imod.prepare.cleanup.cleanup_wel_layered` to clean up wells assigned to layers.
- Fixed bug where :meth:`imod.mf6.River.clip_box`,
:meth:`imod.mf6.Drainage.clip_box`, and
:meth:`imod.mf6.GeneralHeadBoundary.clip_box` threw an error when
time_startortime_endwere set toNoneand a"repeat_stress"was included in the dataset. - Fixed bug where :meth:`imod.mf6.package.copy` threw an error.
- Sorting issue in :func:`imod.prepare.assign_wells`. This could cause :class:`imod.mf6.Well` to assign wells to the wrong cells.
- Fixed crash upon calling :meth:`imod.mf6.Well.clip_box` when the top/bottom arguments are specified. This could cause :class:`imod.mf6.Well` to crash when wells are located outside the extent of the layer model.
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.
imod.flowmodule has been removed for generating iMODFLOW models. Useimod.mf6instead to generate MODFLOW 6 models.
- Support for Python 3.13.
- :meth:`imod.mf6.Recharge.from_imod5_data`, :meth:`imod.mf6.River.from_imod5_data`, :meth:`imod.mf6.Drainage.from_imod5_data`, and :meth:`imod.mf6.GeneralHeadBoundary.from_imod5_data` now assign negative layer numbers to the first active layer.
- :func:`imod.prepare.DISTRIBUTING_OPTION` got a new setting
by_corrected_thickness. This matches DISTRCOND=-1 in iMOD5. - :func:`imod.prepare.cleanup_hfb` to clean up HFB geometries.
- :meth:`imod.mf6.HorizontalFlowBarrierResistance.cleanup`, :meth:`imod.mf6.SingleLayerHorizontalFlowBarrierResistance.cleanup`, to clean up HFB geometries crossing inactive model cells.
- :class:`imod.util.RegridderWeightsCache` to store regridder weights for regridding multiple times.
- :class:`imod.util.RegridderType` to specify regridder types.
- :func:`imod.formats.prj.open_projectfile_data` now also assigns negative and zero layer numbers to grid coordinates.
- In :class:`imod.mf6.StructuredDiscretization`, IDOMAIN can now respectively be > 0 to indicate an active cell and <0 to indicate a vertical passthrough cell, consistent with MODFLOW 6. Previously this could only be indicated with 1 and -1.
- :meth:`imod.mf6.Well.from_imod5_data` and
:meth:`imod.mf6.LayeredWell.from_imod5_data` now also accept the argument
times = "steady-state", for the simulation is assumed to be "steady-state" and well timeseries are averaged. - The
drnattribute of :class:`imod.prepare.SimulationAllocationOptions` has theat_elevationof :func:`imod.prepare.ALLOCATION_OPTION` option now set as default. This means by default drainage cells are placed differently in :meth:`imod.mf6.Modflow6Simulation.from_imod5_data`. - :class:`imod.mf6.Well`, :class:`imod.mf6.LayeredWell`,
:func:`imod.prepare.assign_wells`, :meth:`imod.mf6.Well.from_imod5_data`
and :meth:`imod.mf6.LayeredWell.from_imod5_data` now have default values for
minimum_thicknessandminimum_kset to 0.0. - When intitating a MODFLOW 6 package with a
layercoordinate with values <= 0, iMOD Python will throw an error. - :class:`imod.mf6.HorizontalFlowBarrierResistance`, :class:`imod.mf6.SingleLayerHorizontalFlowBarrierResistance` and other HFB now validate whether proper type of geometry is provided, respectively Polygon for :class:`imod.mf6.HorizontalFlowBarrierResistance`, and LineString for :class:`imod.mf6.SingleLayerHorizontalFlowBarrierResistance`.
- Relaxed validation for :class:`imod.msw.MetaSwapModel` if
FileCopierpackage is present. - Change aterisk to dash and tabs to four spaces in
ValidationErrormessages. - :func:`imod.prepare.laplace_interpolate` has been simplified, using
scipy.sparse.linalg.cgas the backend. We've remove the support for theiboundargument, theiter1argument has been dropped,mxiterhas been renamed tomaxiter,closehas been renamed tortol. - Moved
imod.mf6.utilities.regrid.RegridderWeightsCacheto the :class:`imod.util.regrid.RegridderWeightsCache`.
- :meth:`imod.mf6.GroundwaterFlowModel.mask_all_packages` now preserves the
dxanddycoordinates - :meth:`imod.mf6.Well.from_imod5_data` and
:meth:`imod.mf6.LayeredWell.from_imod5_data` ignore well rates preceding first
element of
times. - :meth:`imod.mf6.Well.from_imod5_data` and :meth:`imod.mf6.LayeredWell.from_imod5_data` now sum the rates of well entries that are on the exact same location (same x, y, and depth) instead of taking the values of the first entry.
- :meth:`imod.mf6.River.from_imod5_data` now preserves the drainage cells
created with the
stage_to_riv_bot_drn_aboveoption of :func:`imod.prepare.ALLOCATION_OPTION`. - Bug in :func:`imod.prepare.distribute_riv_conductance` where conductances were
set to
np.nanfor cells wherestageequalsbottom_elevationwhen :func:`imod.prepare.DISTRIBUTING_OPTION` was set toby_crosscut_thickness,by_crosscut_transmissivity,by_corrected_transmissivity. - :meth:`imod.mf6.NodePropertyFlow.from_imod5_data` now defaults to 90 degrees
for missing layers
imod5_datainstead of 0 degrees. - Bug in :meth:`imod.mf6.Modflow6Simulation.from_imod5_data` where an error was
raised in case the
"cap"package was present in theimod5_data. - Bug where :meth:`imod.mf6.LayeredWell.from_imod5_cap_data` and
:meth:`imod.mf6.Recharge.from_imod5_cap_data` threw an error if the
"cap"in theimod5_datahad a"layer"dimension and coordinate. - :meth:`imod.mf6.LayeredWell.from_imod5_cap_data` will convert the
max_abstraction_groundwaterandmax_abstraction_surfacewatercapacity from mm/d to m3/d. - :class:`imod.msw.TimeOutputControl` now starts counting at 0.0 instead of 1.0, like MetaSWAP expects.
- Models imported with :meth:`imod.msw.MetaSwapModel.from_imod5_data` can be
written with
validateset to True. - :meth:`imod.mf6.Recharge.from_imod5_cap_data` now returns a 2D array with a
"layer"coordinate of1as otherwiseprimodthrows an error when trying to derive recharge-svat mappings. - Fixed part of the code that made Pandas, Geopandas, and xarray throw a lot of
FutureWarningandDeprecationWarning. - Fixed performance issue when converting very large wells (>10k) with :meth:`imod.mf6.Well.to_mf6_pkg` and :meth:`imod.mf6.LayeredWell.to_mf6_pkg`, such as those created with :meth:`imod.mf6.LayeredWell.from_imod5_cap_data` for a large grid.
- Fixed issue where an error was thrown when deriving couplings for
:class:`imod.msw.CouplerMapping` and computing svats in
:class:`imod.msw.GridData` with
dask>=2025.2.0. - Fixed a bug where :func:`imod.mf6.out.open_cbc` did not properly sum fluxes for a single boundary condition package when multiple entries were present in the same cell. This never happened with models generated by iMOD Python, as it cannot generate these boundary conditions, but could be a problem with models generated by iMOD5 and Flopy.
- Removed duplicate entries in
mod2svat.inpgenerated by :class:`imod.msw.CouplerMapping` as MetaSWAP cannot handle this.
Small post-release fix for installation instructions in documentation.
- :class:`imod.msw.MeteoGridCopy` to copy existing mete_grid.inp files, so ASCII grids in large existing meteo databases do not have to be read.
- :class:`imod.msw.FileCopier` to copy settings and lookup tables in existing
.inpfiles. - :meth:`imod.mf6.LayeredWell.from_imod5_cap_data` to construct a :class:`imod.mf6.LayeredWell` package from iMOD5 data in the CAP package (for MetaSWAP). Currently only griddata (IDF) is supported.
- :meth:`imod.mf6.Recharge.from_imod5_cap_data` to construct a recharge package for coupling a MODFLOW 6 model to MetaSWAP.
- :meth:`imod.msw.MetaSwapModel.from_imod5_data` to construct a MetaSWAP model from data in an iMOD5 projectfile.
- :meth:`imod.msw.MetaSwapModel.write` has a
validateargument, which can be used to turn off validation upon writing, use at your own risk! - :class:`imod.msw.MetaSwapModel` got
settingsargument to set simulation settings. - :func:`imod.data.tutorial_03` to load data for the iMOD Documentation tutorial.
- :meth:`imod.mf6.Modflow6Simulation.dump` now saves iMOD Python version number.
- Fixed bug where :class:`imod.mf6.HorizontalFlowBarrierResistance`, :class:`imod.mf6.SingleLayerHorizontalFlowBarrierResistance` and other HFB packages could not be allocated to cell edges when idomain in layer 1 was largely inactive.
- Fixed bug where :meth:`imod.mf6.HorizontalFlowBarrierResistance.clip_box`, :meth:`imod.mf6.SingleLayerHorizontalFlowBarrierResistance.clip_box` methods only returned deepcopy instead of actually clipping the line geometries.
- Fixed bug where :class:`imod.mf6.HorizontalFlowBarrierResistance`, :class:`imod.mf6.SingleLayerHorizontalFlowBarrierResistance` and other HFB packages could not be clipped or copied with xarray >= 2024.10.0.
- Fixed crash upon calling :meth:`imod.mf6.GroundwaterFlowModel.dump`, when a :class:`imod.mf6.HorizontalFlowBarrierResistance`, :class:`imod.mf6.SingleLayerHorizontalFlowBarrierResistance` or other HFB package was assigned to the model.
- :meth:`imod.mf6.Modflow6Simulation.regrid_like` can now regrid a structured model to an unstructured grid.
- :meth:`imod.mf6.Modflow6Simulation.regrid_like` throws a
NotImplementedErrorwhen attempting to regrid an unstructured model to a structured grid. - :class:`imod.msw.Sprinkling` now correctly writes source svats to scap_svat.inp file.
- :func:`imod.evaluate.calculate_gxg`, upon providing a head dataarray chunked
over time, will no longer error with
ValueError: Object has inconsistent chunks along dimension bimonth. This can be fixed by calling unify_chunks(). - Improved performance of regridding package data.
- :class:`imod.msw.Infiltration`'s variables
upward_resistanceanddownward_resistancenow require asubunitcoordinate. - Variables
max_abstraction_groundwaterandmax_abstraction_surfacewaterin :class:`imod.msw.Sprinkling` now needs to have a subunit coordinate. - If
"cap"package present inimod5_data, :meth:`imod.mf6.GroundwaterFlowModel.from_imod5_data` now automatically adds a well for metaswap sprinkling named"msw-sprinkling" - Less strict validation for :class:`imod.mf6.HorizontalFlowBarrierResistance`, :class:`imod.mf6.SingleLayerHorizontalFlowBarrierResistance` and other HFB packages for simulations which are imported with :meth:`imod.mf6.Modflow6Simulation.from_imod5_data`
- DeprecationWarning thrown upon initializing :class:`imod.prepare.Regridder`. We plan to remove this object in the final 1.0 release. Use the xugrid regridder to regrid individual grids instead. To regrid entire MODFLOW 6 packages or simulations, see the user guide here..
- :class:`imod.prepare.SimulationAllocationOptions`, :class:`imod.prepare.SimulationDistributingOptions`, which are used to store default allocation and distributing options respectively.
- 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
ValidationErrorwas thrown if there is an active RCH, DRN, GHB, or RIV cell where idomain = -1.
- In :meth:`imod.mf6.Modflow6Simulation.from_imod5_data`, and
:meth:`imod.mf6.GroundwaterFlowModel.from_imod5_data` the arguments
allocation_options,distributing_optionsare now optional. - The order of arguments of :meth:`imod.mf6.Modflow6Simulation.from_imod5_data`,
and :meth:`imod.mf6.GroundwaterFlowModel.from_imod5_data`. It now is
imod5_data, period_data, times, allocation_options, distributing_options, regridder_typesinstead of:imod5_data, period_data, allocation_options, distributing_options, times, regridder_types
- Multiple
HorizontalFlowBarrierobjects 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
HorizontalFlowBarrierwould be snapped to the same cell edge. These are now summed. - Improve performance validation upon Package initialization
- Improve performance writing
HorizontalFlowBarrierobjects - :func:`imod.mf6.open_cbc` failing with
flowja=Falseon 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
.seloperation. 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.
- :class:`imod.mf6.Well` now also validates that well filter top is above well filter bottom
- :func:`imod.formats.prj.open_projectfile_data` now also imports well filter top and bottom.
- :class:`imod.mf6.Well` now logs a warning if any wells are removed during writing.
- :class:`imod.mf6.HorizontalFlowBarrierResistance`,
:class:`imod.mf6.HorizontalFlowBarrierMultiplier`,
:class:`imod.mf6.HorizontalFlowBarrierHydraulicCharacteristic` now uses
vertical Polygons instead of Linestrings as geometry, and
"ztop"and"zbottom"variables are not used anymore. See :func:`imod.prepare.linestring_to_square_zpolygons` and :func:`imod.prepare.linestring_to_trapezoid_zpolygons` to generate these polygons. - :func:`imod.formats.prj.open_projectfile_data` now returns well data grouped by ipf name, instead of generic, separate number per entry.
- :class:`imod.mf6.Well` now supports wells which have a filter with zero
length, where
"screen_top"equals"screen_bottom". - :class:`imod.mf6.Well` shares the same default
minimum_thicknessas :func:`imod.prepare.assign_wells`, which is 0.05, before this was 1.0. - :func:`imod.prepare.allocate_drn_cells`, :func:`imod.prepare.allocate_ghb_cells`, :func:`imod.prepare.allocate_riv_cells`, now allocate to the first model layer when elevations are above or equal to model top for all methods in :func:`imod.prepare.ALLOCATION_OPTION`.
- :meth:`imod.mf6.Well.to_mf6_pkg` got a new argument:
strict_well_validation, which controls the behavior for when wells are removed entirely during their assignment to layers. This replaces theis_partitionedargument. - :func:`imod.prepare.fill` now takes a
dimsargument instead ofby, and will fill over N dimensions. Secondly, the function no longer takes aninvalidargument, but instead always treats NaNs as missing. - Reverted the need for providing WriteContext objects to MODFLOW 6 Model and
Package objects'
writemethod. These now use similar arguments to the :meth:`imod.mf6.Modflow6Simulation.write` method. - :class:`imod.msw.CouplingMapping`, :class:`imod.msw.Sprinkling`,
imod.msw.Sprinkling.MetaSwapModel, now take the
:class:`imod.mf6.mf6_wel_adapter.Mf6Wel` and the
:class:`imod.mf6.StructuredDiscretization` packages as arguments at their
respective
writemethod, instead of upon initializing these MetaSWAP objects. - :class:`imod.msw.CouplingMapping` and :class:`imod.msw.Sprinkling` now take
the :class:`imod.mf6.mf6_wel_adapter.Mf6Wel` as well argument instead of the
deprecated
imod.mf6.WellDisStructured.
- :meth:`imod.mf6.Modflow6Simulation.from_imod5_data` to import imod5 data loaded with :func:`imod.formats.prj.open_projectfile_data` as a MODFLOW 6 simulation.
- :func:`imod.prepare.linestring_to_square_zpolygons` and :func:`imod.prepare.linestring_to_trapezoid_zpolygons` to generate vertical polygons that can be used to specify horizontal flow barriers, specifically: :class:`imod.mf6.HorizontalFlowBarrierResistance`, :class:`imod.mf6.HorizontalFlowBarrierMultiplier`, :class:`imod.mf6.HorizontalFlowBarrierHydraulicCharacteristic`.
- :class:`imod.mf6.LayeredWell` to specify wells directly to layers instead assigning them with filter depths.
- :func:`imod.prepare.cleanup_drn`, :func:`imod.prepare.cleanup_ghb`, :func:`imod.prepare.cleanup_riv`, :func:`imod.prepare.cleanup_wel`. These are utility functions to clean up drainage, general head boundaries, and rivers, respectively.
- :meth:`imod.mf6.Drainage.cleanup`, :meth:`imod.mf6.GeneralHeadboundary.cleanup`, :meth:`imod.mf6.River.cleanup`, :meth:`imod.mf6.Well.cleanup` convenience methods to call the corresponding cleanup utility functions with the appropriate arguments.
- :meth:`imod.msw.MetaSwapModel.regrid_like` to regrid MetaSWAP models. This is still experimental functionality, regridding the :class:`imod.msw.Sprinkling` is not yet supported.
- The context :func:`imod.util.context.print_if_error` to print an error instead
of raising it in a
withstatement. This is useful for code snippets which definitely will fail. - :meth:`imod.msw.MetaSwapModel.regrid_like` to regrid MetaSWAP models.
- :meth:`imod.mf6.GroundwaterFlowModel.prepare_wel_for_mf6` to prepare wells for MODFLOW 6, for debugging purposes.
- :func:`imod.formats.prj.convert_to_disv` has been removed. This functionality has been replaced by :meth:`imod.mf6.Modflow6Simulation.from_imod5_data`. To convert a structured simulation to an unstructured simulation, call: :meth:`imod.mf6.Modflow6Simulation.regrid_like`
- :func:`imod.formats.prj.open_projectfile_data` now reports the path to a faulty IPF or IDF file in the error message.
- Support for Numpy 2.0
- Added objects with regrid settings. These can be used to provide custom settings: :class:`imod.mf6.regrid.ConstantHeadRegridMethod`, :class:`imod.mf6.regrid.DiscretizationRegridMethod`, :class:`imod.mf6.regrid.DispersionRegridMethod`, :class:`imod.mf6.regrid.DrainageRegridMethod`, :class:`imod.mf6.regrid.EmptyRegridMethod`, :class:`imod.mf6.regrid.EvapotranspirationRegridMethod`, :class:`imod.mf6.regrid.GeneralHeadBoundaryRegridMethod`, :class:`imod.mf6.regrid.InitialConditionsRegridMethod`, :class:`imod.mf6.regrid.MobileStorageTransferRegridMethod`, :class:`imod.mf6.regrid.NodePropertyFlowRegridMethod`, :class:`imod.mf6.regrid.RechargeRegridMethod`, :class:`imod.mf6.regrid.RiverRegridMethod`, :class:`imod.mf6.regrid.SpecificStorageRegridMethod`, :class:`imod.mf6.regrid.StorageCoefficientRegridMethod`.
- Instead of providing a dictionary with settings to
Package.regrid_like, provide one of the followingRegridMethodobjects: :class:`imod.mf6.regrid.ConstantHeadRegridMethod`, :class:`imod.mf6.regrid.DiscretizationRegridMethod`, :class:`imod.mf6.regrid.DispersionRegridMethod`, :class:`imod.mf6.regrid.DrainageRegridMethod`, :class:`imod.mf6.regrid.EmptyRegridMethod`, :class:`imod.mf6.regrid.EvapotranspirationRegridMethod`, :class:`imod.mf6.regrid.GeneralHeadBoundaryRegridMethod`, :class:`imod.mf6.regrid.InitialConditionsRegridMethod`, :class:`imod.mf6.regrid.MobileStorageTransferRegridMethod`, :class:`imod.mf6.regrid.NodePropertyFlowRegridMethod`, :class:`imod.mf6.regrid.RechargeRegridMethod`, :class:`imod.mf6.regrid.RiverRegridMethod`, :class:`imod.mf6.regrid.SpecificStorageRegridMethod`, :class:`imod.mf6.regrid.StorageCoefficientRegridMethod`. - Renamed
imod.mf6.LayeredHorizontalFlowBarrierclasses to :class:`imod.mf6.SingleLayerHorizontalFlowBarrierResistance`, :class:`imod.mf6.SingleLayerHorizontalFlowBarrierHydraulicCharacteristic`, :class:`imod.mf6.SingleLayerHorizontalFlowBarrierMultiplier`,
- :func:`imod.formats.prj.open_projectfile_data` now reports the path to a faulty IPF or IDF file in the error message.
- Added function :func:`imod.util.spatial.gdal_compliant_grid` to make spatial coordinates of a NetCDF interpretable for GDAL (and so QGIS).
- Added
crsargument to :func:`imod.util.spatial.mdal_compliant_ugrid2d`, :meth:`imod.mf6.Simulation.dump`, :meth:`imod.mf6.GroundwaterFlowModel.dump`, :meth:`imod.mf6.GroundwaterTransportModel.dump`, to add a coordinate reference system to dumped files, to ease loading them in QGIS.
- :meth:`imod.mf6.Simulation.dump`, :meth:`imod.mf6.GroundwaterFlowModel.dump`, :meth:`imod.mf6.GroundwaterTransportModel.dump` write with necessary attributes to NetCDF to make these files interpretable for GDAL (and so QGIS).
- Fix missing API docs for
dumpandwritemethods.
- Added functions to allocate planar grids over layers for the topsystem in :func:`imod.prepare.allocate_drn_cells`, :func:`imod.prepare.allocate_ghb_cells`, :func:`imod.prepare.allocate_rch_cells`, :func:`imod.prepare.allocate_riv_cells`, for this multiple options can be selected, available in :func:`imod.prepare.ALLOCATION_OPTION`.
- Added functions to distribute conductances of planar grids over layers for the topsystem in :func:`imod.prepare.distribute_riv_conductance`, :func:`imod.prepare.distribute_drn_conductance`, :func:`imod.prepare.distribute_ghb_conductance`, for this multiple options can be selected, available in :func:`imod.prepare.DISTRIBUTING_OPTION`.
- :func:`imod.prepare.celltable` supports an optional
dtypeargument. This can be used, for example, to create celltables of float values. - Added
fixed_celloption to :class:`imod.mf6.Recharge`. This option is relevant for phreatic models, not using the Newton formulation and model cells can become inactive. The prefered method for phreatic models is to use the Newton formulation, where cells remain active, and this option irrelevant. - Added support for
ats_outer_maximum_fractionin :class:`imod.mf6.Solution`. - Added validation for
linear_acceleration,rclose_option,scaling_method,reordering_method,print_optionandno_ptcentries in :class:`imod.mf6.Solution`.
- No
ValidationErrorthrown anymore in :class:`imod.mf6.River` whenbottom_elevationequalsbottomin 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`
- 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-syswill get a budget nameriv_primary-sys. An UZF package with nameuzf-sys1will get a budget nameuzf-gwrch_uzf-sys1for the groundwater recharge budget from the UZF-CBC.
- The :func:`imod.mf6.model.mask_all_packages` now also masks the idomain array of the model discretization, and can be used with a mask array without a layer dimension, to mask all layers the same way
- Validation for incompatible settings in the :class:`imod.mf6.NodePropertyFlow` and :class:`imod.mf6.Dispersion` packages.
- Checks that only one flow model is present in a simulation when calling :func:`imod.mf6.Modflow6Simulation.regrid_like`, :func:`imod.mf6.Modflow6Simulation.clip_box` or :func:`imod.mf6.Modflow6Simulation.split`
- Added 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.
- :meth:`imod.mf6.Modflow6Simulation.split` supports splitting transport models, including multi-species simulations.
- :meth:`imod.mf6.Modflow6Simulation.open_concentration` and :meth:`imod.mf6.Modflow6Simulation.open_transport_budget` support opening split multi-species simulations. :meth:`imod.mf6.Modflow6Simulation.regrid_like` can now regrid simulations that have 1 or more transport models.
- added logging to various initialization methods, write methods and dump methods. See the documentation how to activate logging.
- added :func:`imod.data.hondsrug_simulation` and :func:`imod.data.hondsrug_crosssection` data.
- simulations and models that include a lake package now raise an exception on clipping, partitioning or regridding.
- :meth:`imod.mf6.Modflow6Simulation.open_concentration` and
:meth:`imod.mf6.Modflow6Simulation.open_transport_budget` raise a
ValueErrorifspecies_lsis provided with incorrect length.
- Incorrect validation error
data values found at nodata values of idomainfor boundary condition packages with a scalar coordinate not set as dimension. - Fix issue where :func:`imod.formats.idf.open_subdomains` and
:func:`imod.mf6.Modflow6Simulation.open_head` (for split simulations) would
return arrays with incorrect
dxanddycoordinates for equidistant data. - Fix issue where :func:`imod.formats.idf.open_subdomains` returned a flipped
dycoordinate for nonequidistant data. - Made :func:`imod.util.round_extent` available again, as it was moved without notice. Function now throws a DeprecationWarning to use :func:`imod.prepare.spatial.round_extent` instead.
- :meth'imod.mf6.Modflow6Simulation.write failed after splitting the simulation. This has been fixed.
- modflow options like "print flow", "save flow", and "print input" can now be set on :class:`imod.mf6.Well`
- when regridding a :class:`imod.mf6.Modflow6Simulation`, :class:`imod.mf6.GroundwaterFlowModel`, :class:`imod.mf6.GroundwaterTransportModel` or a :class:`imod.mf6.package`, regridding weights are now cached and can be re-used over the different objects that are regridded. This improves performance considerably in most use cases: when regridding is applied over the same grid cells with the same regridder type, but with different values/methods, multiple times.
- Add missing required dependencies for installing with
pip: loguru and tomli. - Ensure geopandas and shapely are optional dependencies again when
installing with
pip, and no import errors are thrown. - Fixed bug where calling
copy.deepcopyon :class:`imod.mf6.Modflow6Simulation`, :class:`imod.mf6.GroundwaterFlowModel` and :class:`imod.mf6.GroundwaterTransportModel` objects threw an error.
- Developer environment: Added pixi environment
interactiveto 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.
- 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.mf6module 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
concentrationfor :class:`imod.mf6.Drainage` and :class:`imod.mf6.EvapoTranspiration` package - Added validation :class:`imod.mf6.Well` package, no
np.nanvalues 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.
- We moved to using pixi to create development
environments. This replaces the
imod-environment.ymlconda environment. We advice doing development installations with pixi from now on. See the documentation. This does not affect users who installed withpip install imod,mamba install imodorconda install imod. - Changed build system from
setuptoolstohatchling. Users who did a development install are adviced to runpip uninstall imodandpip install -e .again. This does not affect users who installed withpip install imod,mamba install imodorconda install imod. - Decreased lower limit of MetaSWAP validation for x and y limits in the
IdfMappingfrom 0 to -9999999.0.
- Made
specific_yieldoptional argument in :class:`imod.mf6.SpecificStorage`, :class:`imod.mf6.StorageCoefficient`. - Fixed bug where simulations with :class:`imod.mf6.Well` were not partitioned into multiple models.
- Fixed erroneous default value for the
out_of_boundsin :func:`imod.select.points.point_values` - Fixed bug where :class:`imod.mf6.Well` could not be assigned to the first cell of an unstructured grid.
- HorizontalFlowBarrier package now dropped if completely outside partition in a split model.
- HorizontalFlowBarrier package clipped with
clip_by_gridbased on active cells, consistent with how other packages are treated by this function. This affects the :meth:`imod.mf6.HorizontalFlowBarrier.regrid_like` and :meth:`imod.mf6.Modflow6Simulation.split` methods.
- All the references to GitLab have been replaced by GitHub references as part of the GitHub migration.
- 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_timeandtime_unitarguments. To theModflow6Simulation.open_methods, andimod.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.
- :meth:`imod.mf6.Well.mask` masks with a 2D grid instead of returning a deepcopy of the package.
- The Newton option for a :class:`imod.mf6.GroundwaterFlowModel` was being ignored. This has been corrected.
- The Contextily packages started throwing errors. This was caused because the default tile provider being used was Stamen. However Stamen is no longer free which caused Contextily to fail. The default tile provider has been changed to OpenStreetMap to resolve this issue.
- :func:`imod.mf6.open_cbc` now reads saved cell saturations and specific discharges.
- :func:`imod.mf6.open_cbc` failed to read unstructured budgets stored following IMETH1, most importantly the storage fluxes.
- Fixed support of Python 3.11 by dropping the obsolete
qgsmodule. - Bug in :class:`imod.mf6.SourceSinkMixing` where, in case of multiple active
boundary conditions with assigned concentrations, it would write a
.ssmfile with all sources/sinks on one single row. - Fixed bug where TypeError was thrown upond calling :meth:`imod.mf6.HorizontalFlowBarrier.regrid_like` and :meth:`imod.mf6.HorizontalFlowBarrier.mask`.
- Fixed bug where calling :meth:`imod.mf6.Well.clip_box` over only the time dimension would remove the index coordinate.
- Validation errors are rendered properly when writing a simulation object or regridding a model object.
- The imod-environment.yml file has been split in an imod-environment.yml (containing all packages required to run imod-python) and a imod-environment-dev.yml file (containing additional packages for developers).
- Changed the way :class:`imod.mf6.Modflow6Simulation`, :class:`imod.mf6.GroundwaterFlowModel`, :class:`imod.mf6.GroundwaterTransportModel`, and MODFLOW 6 packages are represented while printing.
- The grid-agnostic packages :meth:`imod.mf6.Well.regrid_like` and :meth:`imod.mf6.HorizontalFlowBarrier.regrid_like` now return a clip with the grid exterior of the target grid
- The unit tests results are now published on GitLab
- A
save_saturationoption to :class:`imod.mf6.NodePropertyFlow` which saves cell saturations for unconfined flow. - Functions :func:`imod.prepare.layer.get_upper_active_layer_number` and :func:`imod.prepare.layer.get_lower_active_layer_number` to return planar grids with numbers of the highest and lowest active cells respectively.
- Functions :func:`imod.prepare.layer.get_upper_active_grid_cells` and :func:`imod.prepare.layer.get_lower_active_grid_cells` to return boolean grids designating respectively the highest and lowest active cells in a grid.
- validation of
transientargument in :class:`imod.mf6.StorageCoefficient` and :class:`imod.mf6.SpecificStorage`. - :meth:`imod.mf6.Modflow6Simulation.open_concentration`, :meth:`imod.mf6.Modflow6Simulation.open_head`, :meth:`imod.mf6.Modflow6Simulation.open_transport_budget`, and :meth:`imod.mf6.Modflow6Simulation.open_flow_budget`, were added as convenience methods to open simulation output easier (without having to specify paths).
- The :meth:`imod.mf6.Modflow6Simulation.split` method has been added. This method makes
it possible for a user to create a Multi-Model simulation. A user needs to
provide a submodel label array in which they specify to which submodel a cell
belongs. The method will then create the submodels and split the nested
packages. The split method will create the gwfgwf exchanges required to
connect the submodels. At the moment auxiliary variables
cdistandangldegxare only computed for structured grids. - The label array can be generated through a convenience function :func:`imod.mf6.partition_generator.get_label_array`
- Once a split simulation has been executed by MF6, we find head and balance results in each of the partition models. These can now be merged into head and balance datasets for the original domain using :meth:`imod.mf6.Modflow6Simulation.open_concentration`, :meth:`imod.mf6.Modflow6Simulation.open_head`, :meth:`imod.mf6.Modflow6Simulation.open_transport_budget`, :meth:`imod.mf6.Modflow6Simulation.open_flow_budget`. In the case of balances, the exchanges through the partition boundary are not yet added to this merged balance.
- Settings such as
save_flowscan be passed through :meth:`imod.mf6.SourceSinkMixing.from_flow_model` - Added :class:`imod.mf6.LayeredHorizontalFlowBarrierHydraulicCharacteristic`, :class:`imod.mf6.LayeredHorizontalFlowBarrierMultiplier`, :class:`imod.mf6.LayeredHorizontalFlowBarrierResistance`, for horizontal flow barriers with a specified layer number.
- 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
dumpmethod :class:`imod.mf6.Modflow6Simulation` withmdal_compliant=True. This writes UGRID NetCDFs which can read as meshes in QGIS. - Removed
declxmlfrom repository.
- TWRI MODFLOW 6 example uses the grid-agnostic :class:`imod.mf6.Well`
package instead of the
imod.mf6.WellDisStructuredpackage.
- :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.
- :class:`imod.mf6.HorizontalFlowBarrier` is specified by providing a geopandas GeoDataFrame
- :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.
- :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.
- Geopandas and rasterio were imported at the top of a module in some places. This has been fixed so that both are not optional dependencies when installing via pip (installing via conda or mamba will always pull all dependencies and supports full functionality).
- :meth:`imod.mf6.Modflow6Simulation._validate` now print all validation errors for all models and packages in one message.
- The gen file reader can now handle feature id's that contain commas and spaces
- :class:`imod.mf6.EvapoTranspiration` now supports segments, by adding a
segmentdimension to theproportion_depthandproportion_ratevariables. - :class:`imod.mf6.EvapoTranspiration` template for
.evtfile now properly formatsnsegoption. - Fixed bug in :class:`imod.wq.Well` preventing saving wells without a time dimension, but with a layer dimension.
- :class:`imod.mf6.DiscretizationVertices._validate` threw
KeyErrorfor"bottom"when validating the package separately.
- :func:`imod.select.grid.active_grid_boundary_xy` & :func:`imod.select.grid.grid_boundary_xy` are added to find grid boundaries.
- :class:`imod.mf6.SpecificStorage` and :class:`imod.mf6.StorageCoefficient`
now have a
save_flowargument.
- :func:`imod.mf6.open_cbc` can now read storage fluxes without error.
- :class:`imod.mf6.OutputControl` now takes parameters
head_file,concentration_file, andbudget_fileto specify where to store MODFLOW 6 output files. - :func:`imod.util.spatial.from_mdal_compliant_ugrid2d` to "restack" the variables that have have been "unstacked" in :func:`imod.util.spatial.mdal_compliant_ugrid2d`.
- Added support for the Modflow6 Lake package
- :func:`imod.select.points_in_bounds`, :func:`imod.select.points_indices`, :func:`imod.select.points_values` now support unstructured grids.
- Added support for the MODFLOW 6 Lake package: :class:`imod.mf6.Lake`, :class:`imod.mf6.LakeData`, :class:`imod.mf6.OutletManning`, :class:`OutletSpecified`, :class:`OutletWeir`. See the examples for an application of the Lake package.
- :meth:`imod.mf6.simulation.Modflow6Simulation.dump` now supports dumping to MDAL compliant ugrids. These can be used to view and explore Modlfow 6 simulations in QGIS.
- :meth:`imod.wq.bas.BasicFlow.thickness` returns a DataArray with the correct dimension order again. This confusingly resulted in an error when writing the :class:`imod.wq.btn.BasicTransport` package.
- Fixed bug in :class:`imod.mf6.dis.StructuredDiscretization` and
:class:`imod.mf6.dis.VerticesDiscretization` where
inactive bottom above active cellwas incorrectly raised.
- :func:`imod.prj.read_projectfile` to read the contents of a project file into a Python dictionary.
- :func:`imod.prj.open_projectfile_data` to read/open the data that is pointed to in a project file.
- :func:`imod.gen.read_ascii` to read the geometry stored in ASCII text .gen files.
- :class:`imod.mf6.hfb.HorizontalFlowBarrier` to support Modflow6's HFB package, works well with xugrid.snap_to_grid function.
- :meth:`imod.mf6.simulation.Modflow6Simulation.dump` to dump a simulation to a toml file which acts as a definition file, pointing to packages written as netcdf files. This can be used to intermediately store Modflow6 simulations.
- :func:`imod.evaluate.budget.flow_velocity` now properly computes velocity by dividing by the porosity. Before, this function computed the Darcian velocity.
- :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).
- Added an extra optional argument in
:meth:`imod.couplers.metamod.MetaMod.write` named
modflow6_write_kwargs, which can be used to provide keyword arguments to the writing of the MODFLOW 6 Simulation.
- :func:`imod.mf6.out.disv.read_grb` Remove repeated construction of
UgridDataArrayfortop
- :meth:`imod.mf6.Modflow6Simulation.write` with
binary=Falseno longer results in invalid MODFLOW 6 input for 2D grid data, such as DIS top. imod.flow.ImodflowModel.writeno longer writes incorrect project files for non-grid values with a time and layer dimension.- :func:`imod.evaluate.interpolate_value_boundaries`: Fix edge case when successive values in z direction are exactly equal to the boundary value.
- Removed
meshzoodependency. - Minor changes to :mod:`imod.gen.gen` backend, to support Shapely 2.0 , Shapely version above equal v1.8 is now required.
imod.flow.ImodflowModel.writenow supports writing aconfig_run.inito 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, setvalidate=Falseupon package initialization and/or when calling :meth:`imod.mf6.Modflow6Simulation.write`.
- :meth:`imod.mf6.GroundwaterFlowModel.write` will no longer error when a 3D DataArray with a single layer is written. It will now accept both 2D and 3D arrays with a single layer coordinate.
- Hotfixes for :meth:`imod.wq.model.SeawatModel.clip`, until this merge request is fulfilled.
imod.flow.ImodflowModel.writewill set the timestring in the projectfile tosteady-stateforBoundaryConditionswithout a time dimension.- Added
imod.flow.OutputControlas this was still missing. - :func:`imod.formats.ipf.read` will no longer error when an associated files with 0 rows is read.
- :func:`imod.evaluate.calculate_gxg` now correctly uses (March 14, March 28, April 14) to calculate GVG rather than (March 28, April 14, April 28).
- :func:`imod.mf6.out.open_cbc` now correctly loads boundary fluxes.
- :meth:`imod.prepare.LayerRegridder.regrid` will now correctly skip values
if
top_sourceorbottom_sourceare NaN. - :func:`imod.gen.write` no longer errors on dataframes with empty columns.
imod.mf6.BoundaryCondition.set_repeat_stressreinstated. This is a temporary measure, it gives a deprecation warning.
- Deprecate the current documentation URL: https://imod.xyz. For the coming months, redirection is automatic to: https://deltares.gitlab.io/imod/imod-python/.
- :func:`imod.formats.ipf.save` will now store associated files in separate directories
named
layer1,layer2, etc. The ID in the main IPF file is updated accordingly. Previously, if IDs were shared between different layers, the associated files would be overwritten as the IDs would result in the same file name being used over and over. imod.flow.ImodflowModel.time_discretization, :meth:`imod.wq.SeawatModel.time_discretization`, :meth:`imod.mf6.Modflow6Simulation.time_discretization`, are renamed to:imod.flow.ImodflowModel.create_time_discretization, :meth:`imod.wq.SeawatModel.create_time_discretization`, :meth:`imod.mf6.Modflow6Simulation.create_time_discretization`,- Moved tests inside imod directory, added an entry point for pytest fixtures. Running the tests now requires an editable install, and also existing installations have to be reinstalled to run the tests.
- The
imod.mf6model packages now all run type checks on input. This is a breaking change for scripts which provide input with an incorrect dtype. - :class:`imod.mf6.Solution` now requires a model_names argument to specify which models should be solved in a single numerical solution. This is required to simulate groundwater flow and transport as they should be in separate solutions.
- When writing MODFLOW 6 input option blocks, a NaN value is now recognized as an alternative to None (and the entry will not be included in the options block).
- Added support to write MetaSWAP models, :class:`imod.msw.MetaSwapModel`.
- Addes support to write coupled MetaSWAP and Modflow6 simulations, :class:`imod.couplers.MetaMod`
- :func:`imod.util.replace` has been added to find and replace different values in a DataArray.
- :func:`imod.evaluate.calculate_gxg_points` has been added to compute GXG values for time varying point data (i.e. loaded from IPF and presented as a Pandas dataframe).
- :func:`imod.evaluate.calculate_gxg` will return the number of years used in the GxG calculation as separate variables in the output dataset.
- :func:`imod.visualize.spatial.plot_map` now accepts a fix and ax argument, to enable adding maps to existing axes.
imod.flow.ImodflowModel.create_time_discretization, :meth:`imod.wq.SeawatModel.create_time_discretization`, :meth:`imod.mf6.Modflow6Simulation.create_time_discretization`, now have a documentation section.- :class:`imod.mf6.GroundwaterTransportModel` has been added with associated simple classes to allow creation of solute transport models. Advanced boundary conditions such as LAK or UZF are not yet supported.
- :class:`imod.mf6.Buoyancy` has been added to simulate density dependent groundwater flow.
contextily,geopandas,pyvista,rasterio, andshapelyare 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.
- :func:`imod.formats.ipf.read` accepts list of file names.
- :func:`imod.mf6.open_hds` did not read the appropriate bytes from the heads file, apart for the first timestep. It will now read the right records.
- Use the appropriate array for modflow6 timestep duration: the :meth:`imod.mf6.GroundwaterFlowModel.write` would write the timesteps multiplier in place of the duration array.
- :meth:`imod.mf6.GroundwaterFlowModel.write` will now respect the layer coordinate of DataArrays that had multiple coordinates, but were discontinuous from 1; e.g. layers [1, 3, 5] would've been transformed to [1, 2, 3] incorrectly.
- :meth:`imod.mf6.Modflow6Simulation.write` will no longer change working directory while writing model input -- this could lead to errors when multiple processes are writing models in parallel.
- :func:`imod.prepare.laplace_interpolate` will no longer ZeroDivisionError
when given a value for
ibound.
- :func:`imod.formats.idf.open_subdomains` will now also accept iMOD-WQ output of multiple species runs.
- :meth:`imod.wq.SeawatModel.to_netcdf` has been added to write all model packages to netCDF files.
- :func:`imod.mf6.open_cbc` has been added to read the budget data of structured (DIS) MODFLOW 6 models. The data is read lazily into xarray DataArrays per timestep.
- :func:`imod.visualize.streamfunction` and :func:`imod.visualize.quiver` were added to plot a 2D representation of the groundwater flow field using either streamlines or quivers over a cross section plot (:func:`imod.visualize.cross_section`).
- :func:`imod.evaluate.streamfunction_line` and :func:`imod.evaluate.streamfunction_linestring` were added to extract the 2D projected streamfunction of the 3D flow field for a given cross section.
- :func:`imod.evaluate.quiver_line` and :func:`imod.evaluate.quiver_linestring` were added to extract the u and v components of the 3D flow field for a given cross section.
- Added :meth:`imod.mf6.GroundwaterFlowModel.write_qgis_project` to write a QGIS project for easier inspection of model input in QGIS.
- Added :meth:`imod.wq.SeawatModel.clip` to clip a model to a provided extent. Boundary conditions of clipped model can be automatically derived from parent model calculation results and are applied along the edges of the extent.
- Added :py:func:`imod.gen.read` and :py:func:`imod.gen.write` for reading and writing binary iMOD GEN files to and from geopandas GeoDataFrames.
- Added :py:func:`imod.prepare.zonal_aggregate_raster` and :py:func:`imod.prepare.zonal_aggregate_polygons` to efficiently compute zonal aggregates for many polygons (e.g. the properties every individual ditch in the Netherlands).
- Added
imod.flow.ImodflowModelto write to model iMODFLOW project file. - :meth:`imod.mf6.Modflow6Simulation.write` now has a
binarykeyword. When set toFalse, all MODFLOW 6 input is written to text rather than binary files. - Added :class:`imod.mf6.DiscretizationVertices` to write MODFLOW 6 DISV model input.
- Packages for :class:`imod.mf6.GroundwaterFlowModel` will now accept :class:`xugrid.UgridDataArray` objects for (DISV) unstructured grids, next to :class:`xarray.DataArray` objects for structured (DIS) grids.
- Transient wells are now supported in
imod.mf6.WellDisStructuredandimod.mf6.WellDisVertices. - :func:`imod.util.to_ugrid2d` has been added to convert a (structured) xarray DataArray or Dataset to a quadrilateral UGRID dataset.
- Functions created to create empty DataArrays with greater ease: :func:`imod.util.empty_2d`, :func:`imod.util.empty_2d_transient`, :func:`imod.util.empty_3d`, and :func:`imod.util.empty_3d_transient`.
- :func:`imod.util.where` has been added for easier if-then-else operations, especially for preserving NaN nodata values.
- :meth:`imod.mf6.Modflow6Simulation.run` has been added to more easily run a model, especially in examples and tests.
- :func:`imod.mf6.open_cbc` and :func:`imod.mf6.open_hds` will automatically
return a
xugrid.UgridDataArrayfor MODFLOW 6 DISV model output.
- 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-facefor the face flows, rather thanfront-face-flowfor 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.
- Module
imod.tecfor reading Tecplot files has been removed.
- :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).
- :class:`imod.wq.MassLoading` and :class:`imod.wq.TimeVaryingConstantConcentration` have been added to allow additional concentration boundary conditions.
- IPF writing methods support an
assoc_columnskeyword to allow greater flexibility in including and renaming columns of the associated files. - Optional basemap plotting has been added to :meth:`imod.visualize.plot_map`.
- 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.idfinstead ofrch/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.
- :meth:`imod.wq.SeawatModel.write` no longer automatically appends the model name to the directory where the input is written. Instead, it simply writes to the directory as specified.
- :func:`imod.select.points_set_values` returns a new DataArray rather than
mutating the input
da. - :func:`imod.select.points_values` returns a DataArray with an index taken
from the data of the first provided dimensions if it is a
pandas.Series. - :meth:`imod.wq.SeawatModel.write` now writes a runfile with
start_hourandstart_minute(this results in output IDFs with datetime format"%Y%m%d%H%M").
- :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_workspaceargument 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 itTrue, 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
xandy; 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
pyvistameshes fromxarray.DataArray's andshapelypolygons, 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.Regridderifsourceis 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.
- :meth:`imod.prepare.Regridder` detects if the
likeDataArray is a subset along a dimension, in which case the dimension is not regridded. - :meth:`imod.prepare.Regridder` now slices the
sourcearray accurately before regridding, taking cell boundaries into account rather than only cell midpoints. densityis no longer an optional argument in :class:`imod.wq.GeneralHeadboundary` and :class:`imod.wq.River`. The reason is that iMOD-WQ fully removes (!) these packages if density is not present.- :func:`imod.formats.idf.save` and :func:`imod.formats.rasterio.save` will now also save DataArrays in
which a coordinate other than
xoryis descending. - :func:`imod.visualize.plot_map` enforces decreasing
y, which ensures maps are not plotted upside down. - :func:`imod.util.spatial.coord_reference` now returns a scalar cellsize if coordinate is equidistant.
- :meth:`imod.prepare.Regridder.regrid` returns cellsizes as scalar when coordinates are equidistant.
- Raise proper ValueError in :meth:`imod.prepare.Regridder.regrid` consistenly when the number of dimensions to regrid does not match the regridder dimensions.
- When writing DataArrays that have size 1 in dimension
xory: raise error if cellsize (dxordy) is not specified; and actually usedyordxwhen size is 1.
- IDF files representing data of arbitrary dimensionality can be opened and saved. This enables reading and writing files with more dimensions than just x, y, layer, and time.
- Added multi-species support for (:mod:`imod.wq`)
- GDAL rasters representing N-dimensional data can be opened and saved similar to (:mod:`imod.idf`) in (:mod:`imod.rasterio`)
- Writing GDAL rasters using :meth:`imod.formats.rasterio.save` and (:meth:`imod.formats.rasterio.write`) auto-detects GDAL driver based on file extension
- 64-bit IDF files can be opened :meth:`imod.formats.idf.open`
- 64-bit IDF files can be written using :meth:`imod.formats.idf.save` and (:meth:`imod.formats.idf.write`) using keyword
dtype=np.float64 selandiselmethods toSeawatModelto support taking out a subdomain- Docstrings for the MODFLOW 6 classes in :mod:`imod.mf6`
- :meth:`imod.select.upper_active_layer` function to get the upper active layer from ibound
xr.DataArray
imod.formats.idf.readis deprecated, use :func:`imod.formats.idf.open` insteadimod.formats.rasterio.readis deprecated, use :func:`imod.formats.rasterio.open` instead
- :meth:`imod.prepare.reproject` working instead of silently failing when given a
"+init=ESPG:XXXXCRS string
- Laplace grid interpolation :meth:`imod.prepare.laplace_interpolate`
- Experimental MODFLOW 6 structured model write support :mod:`imod.mf6`
- More supported visualizations :mod:`imod.visualize`
- More extensive reading and writing of GDAL raster in :mod:`imod.rasterio`
- The documentation moved to a custom domain name: https://imod.xyz/
"multilinear"has been added as a regridding option toimod.prepare.Regridderto do linear interpolation up to three dimensions.- Boundary condition packages in
imod.wqsupport a method calledadd_timemapto do cyclical boundary conditions, such as summer and winter stages.
imod.idf.saveno longer fails on a single IDF when it is a voxel IDF (when it has top and bottom data).imod.prepare.celltablenow succesfully does parallel chunkwise operations, rather than raising an error.imod.Regridder'sregridmethod now succesfully returnssourceif all dimensions already have the right cell sizes, rather than raising an error.imod.idf.open_subdomainsis much faster now at merging different subdomain IDFs of a parallel modflow simulation.imod.idf.saveno 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.SeawatModelsuccesfully reduces over dimensions. - Fix last case in
imod.prepare.reprojectwhere it did not allocate a new array yet, but returnedlikeinstead of the reprojected result.
- :mod:`imod.wq` module to create iMODFLOW Water Quality models
- conda-forge recipe to install imod (https://github.com/conda-forge/imod-feedstock/)
- significantly extended documentation and examples
- :mod:`imod.prepare` module with many data mangling functions
- :mod:`imod.select` module for extracting data along cross sections or at points
- :mod:`imod.visualize` module added to visualize results
- :func:`imod.idf.open_subdomains` function to open and merge the IDF results of a parallelized run
- :func:`imod.formats.ipf.read` now infers delimeters for the headers and the body
- :func:`imod.formats.ipf.read` can now deal with heterogeneous delimiters between multiple IPF files, and between the headers and body in a single file
- Namespaces: lift many functions one level, such that you can use e.g. the function
imod.prepare.reprojectinstead ofimod.prepare.reproject.reproject
- All that was deprecated in v0.6.0
- :func:`imod.seawat_write` is deprecated, use the write method of :class:`imod.wq.SeawatModel` instead
- :func:`imod.run.seawat_get_runfile` is deprecated, use :mod:`imod.wq` instead
- :func:`imod.run.seawat_write_runfile` is deprecated, use :mod:`imod.wq` instead
- Support nonequidistant models in runfile
- Time conversion in runfile now also accepts cftime objects
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.
imod.idf.setnodataheader
- Opening IDFs with
imod.idf.load, useimod.idf.openinstead - Opening a set of IDFs with
imod.idf.loadset, useimod.idf.open_datasetinstead - Reading IPFs with
imod.ipf.load, useimod.ipf.read - Reading IDF data into a dask array with
imod.idf.dask, useimod.idf._daskinstead - Reading an iMOD-seawat .tec file, use
imod.tec.readinstead.
- Use
np.datetime64when dates are within time bounds, usecftime.DatetimeProlepticGregorianwhen they are not (matchesxarraydefaults) assertis no longer used to catch faulty input arguments, appropriate exceptions are raised instead
idf.open: sorts both paths and headers consistently so data does not end up mixed up in the DataArrayidf.open: Return anxarray.CFTimeIndexrather than an array ofcftime.DatimeProlepticGregorianobjectsidf.saveproperly forwardsnodataargument towriteidf.writecoerces coordinates to floats before writingipf.read: Significant performance increase for reading IPF timeseries by specifying the datetime formatipf.writeno longer writes,,for missing data (which iMOD does not accept)
- Reading IDFs with the
chunksoption
- Reading IDFs with the
memmapoption imod.idf.dataarray, useimod.idf.loadinstead
- Reading IDFs gives delayed objects, which are only read on demand by dask
- IDF: instead of
resandtransformattributes, usedxanddycoordinates (0D or 1D) - Use
cftime.DatetimeProlepticGregorianto support time instead ofnp.datetime64, allowing longer timespans - Repository moved from
https://gitlab.com/deltares/tohttps://gitlab.com/deltares/imod/
- Notebook in
examplesfolder for synthetic model example - Support for nonequidistant IDF files, by adding
dxanddycoordinates
- IPF support implicit
itype