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]¶
Fixed¶
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
imod.mf6.Model.write()
would write the timesteps multiplier in place of of the duration array.imod.util.to_ugrid2d()
has been added to convert a (structured) xarray DataArray or Dataset to a quadrilateral UGRID dataset.
Added¶
imod.tec.read()
can read labelled coordinatestime
,z
,y
, andx
if present in the.tec
file.imod.idf.open_subdomains()
will now also accept iMOD-WQ output of multiple species runs.imod.wq.SeawatModel.to_netcdf()
has been added to write all model packages to netCDF files.imod.mf6.open_cbc()
has been added to read the budget data of structured (DIS) MODFLOW6 models. The data is read lazily into xarray DataArrays per timestep.imod.visualize.streamfunction()
andimod.visualize.quiver()
were added to plot a 2D representation of the groundwater flow field using either streamlines or quivers over a cross section plot (imod.visualize.cross_section()
).imod.evaluate.streamfunction_line()
andimod.evaluate.streamfunction_linestring()
were added to extract the 2D projected streamfunction of the 3D flow field for a given cross section.imod.evaluate.quiver_line()
andimod.evaluate.quiver_linestring()
were added to extract the u and v components of the 3D flow field for a given cross section.Added
imod.mf6.Model.write_qgis_project()
to write a QGIS project for easier inspection of model input in QGIS.Added
imod.wq.Model.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.
Changed¶
Datetime columns in IPF associated files (via
imod.ipf.write_assoc()
) will not be placed within quotes, as this can break certain iMOD batch functions.
[0.10.1] - 2020-10-19¶
Changed¶
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¶
imod.wq.MassLoading
andimod.wq.TimeVaryingConstantConcentration
have been added to allow additional concentration boundary conditions.IPF writing methods support an
assoc_columns
keyword to allow greater flexibility in including and renaming columns of the associated files.Optional basemap plotting has been added to
imod.visualize.plot_map()
.
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).
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 likeconcentration_l1.idf
instead ofrch/concentration_l1.idf
).imod.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¶
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.imod.select.points_set_values()
returns a new DataArray rather than mutating the inputda
.imod.select.points_values()
returns a DataArray with an index taken from the data of the first provided dimensions if it is apandas.Series
.imod.wq.SeawatModel.write()
now writes a runfile withstart_hour
andstart_minute
(this results in output IDFs with datetime format"%Y%m%d%H%M"
).
Added¶
from_file()
constructors have been added to all imod.wq.Package. This allows loading directly package from a netCDF file (or any file supported byxarray.open_dataset
), or a path to a Zarr directory with suffix “.zarr” or “.zip”.This can be combined with the cache argument in
from_file()
to enable caching of answers to avoid repeated computation duringimod.wq.SeawatModel.write()
; it works by checking whether input and output files have changed.The
resultdir_is_workspace
argument has been added toimod.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.imod.visualize.imshow_topview()
has been added to visualize a complete DataArray with atleast dimensionsx
andy
; it dumps PNGs into a specified directory.Some support for 3D visualization has been added.
imod.visualize.grid_3d()
andimod.visualize.line_3d()
have been added to producepyvista
meshes fromxarray.DataArray
’s andshapely
polygons, respectively.imod.visualize.GridAnimation3D
andimod.visualize.StaticGridAnimation3D
have been added to setup 3D animations of DataArrays with transient data.Support for out of core computation by
imod.prepare.Regridder
ifsource
is chunked.imod.ipf.read()
now reports the problematic file if reading errors occur.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¶
imod.prepare.Regridder()
detects if thelike
DataArray is a subset along a dimension, in which case the dimension is not regridded.imod.prepare.Regridder()
now slices thesource
array accurately before regridding, taking cell boundaries into account rather than only cell midpoints.density
is no longer an optional argument inimod.wq.GeneralHeadboundary
andimod.wq.River
. The reason is that iMOD-WQ fully removes (!) these packages if density is not present.imod.idf.save()
andimod.rasterio.save()
will now also save DataArrays in which a coordinate other thanx
ory
is descending.imod.visualize.plot_map()
enforces decreasingy
, which ensures maps are not plotted upside down.imod.util.coord_reference()
now returns a scalar cellsize if coordinate is equidistant.imod.prepare.Regridder.regrid()
returns cellsizes as scalar when coordinates are equidistant.Raise proper ValueError in
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
x
ory
: raise error if cellsize (dx
ordy
) is not specified; and actually usedy
ordx
when size is 1.
[0.9.0] - 2020-01-19¶
Added¶
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 (
imod.wq
)GDAL rasters representing N-dimensional data can be opened and saved similar to (
imod.idf
) in (imod.rasterio
)Writing GDAL rasters using
imod.rasterio.save()
and (imod.rasterio.write()
) auto-detects GDAL driver based on file extension64-bit IDF files can be opened
imod.idf.open()
64-bit IDF files can be written using
imod.idf.save()
and (imod.idf.write()
) using keyworddtype=np.float64
sel
andisel
methods toSeawatModel
to support taking out a subdomainDocstrings for the Modflow 6 classes in
imod.mf6
imod.select.upper_active_layer()
function to get the upper active layer from iboundxr.DataArray
Changed¶
imod.idf.read()
is deprecated, useimod.idf.open
insteadimod.rasterio.read()
is deprecated, useimod.rasterio.open
instead
Fixed¶
imod.prepare.reproject()
working instead of silently failing when given a"+init=ESPG:XXXX
CRS string
[0.8.0] - 2019-10-14¶
Added¶
Laplace grid interpolation
imod.prepare.laplace_interpolate()
Experimental Modflow 6 structured model write support
imod.mf6
More supported visualizations
imod.visualize
More extensive reading and writing of GDAL raster in
imod.rasterio
Changed¶
The documentation moved to a custom domain name: https://imod.xyz/
[0.7.1] - 2019-08-07¶
Added¶
"multilinear"
has been added as a regridding option toimod.prepare.Regridder
to do linear interpolation up to three dimensions.Boundary condition packages in
imod.wq
support a method calledadd_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
’sregrid
method now succesfully returnssource
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 returnedlike
instead of the reprojected result.
[0.7.0] - 2019-07-23¶
Added¶
imod.wq
module to create iMODFLOW Water Quality modelsconda-forge recipe to install imod (https://github.com/conda-forge/imod-feedstock/)
significantly extended documentation and examples
imod.prepare
module with many data mangling functionsimod.select
module for extracting data along cross sections or at pointsimod.visualize
module added to visualize resultsimod.idf.open_subdomains()
function to open and merge the IDF results of a parallelized runimod.ipf.read()
now infers delimeters for the headers and the bodyimod.ipf.read()
can now deal with heterogeneous delimiters between multiple IPF files, and between the headers and body in a single file
Changed¶
Namespaces: lift many functions one level, such that you can use e.g. the function
imod.prepare.reproject
instead ofimod.prepare.reproject.reproject
Removed¶
All that was deprecated in v0.6.0
Deprecated¶
imod.seawat_write()
is deprecated, use the write method ofimod.wq.SeawatModel
insteadimod.run.seawat_get_runfile()
is deprecated, useimod.wq
insteadimod.run.seawat_write_runfile()
is deprecated, useimod.wq
instead
[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
, useimod.idf.open
insteadOpening a set of IDFs with
imod.idf.loadset
, useimod.idf.open_dataset
insteadReading IPFs with
imod.ipf.load
, useimod.ipf.read
Reading IDF data into a dask array with
imod.idf.dask
, useimod.idf._dask
insteadReading an iMOD-seawat .tec file, use
imod.tec.read
instead.
Changed¶
Use
np.datetime64
when dates are within time bounds, usecftime.DatetimeProlepticGregorian
when they are not (matchesxarray
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 DataArrayidf.open
: Return anxarray.CFTimeIndex
rather than an array ofcftime.DatimeProlepticGregorian
objectsidf.save
properly forwardsnodata
argument towrite
idf.write
coerces coordinates to floats before writingipf.read
: Significant performance increase for reading IPF timeseries by specifying the datetime formatipf.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
optionimod.idf.dataarray
, useimod.idf.load
instead
Changed¶
Reading IDFs gives delayed objects, which are only read on demand by dask
IDF: instead of
res
andtransform
attributes, usedx
anddy
coordinates (0D or 1D)Use
cftime.DatetimeProlepticGregorian
to support time instead ofnp.datetime64
, allowing longer timespansRepository moved from
https://gitlab.com/deltares/
tohttps://gitlab.com/deltares/imod/
Added¶
Notebook in
examples
folder for synthetic model exampleSupport for nonequidistant IDF files, by adding
dx
anddy
coordinates
Fixed¶
IPF support implicit
itype