iMOD5 backwards compatibility#

iMOD Python tries to be as backwards compatible with iMOD5 as our resources allow. Below you can find some known issues, notes, and more detailed tables with the status of support for important iMOD5 features. If you miss an important feature or run into any issues, feel free to open an issue on our issueboard.

Known issues#

  • Constants are only supported for the CAP package. For other packages, the constants will cause an error.

  • ISG files cannot be read directly. The workaround is to rasterize the ISG files to IDF files using the iMOD5 BATCH function ISGGRID.

  • MetaSWAP sprinkling wells defined as IPF files are not supported.

  • MetaSWAP’s “flexible drainage” (“Peilgestuurde drainage” in Dutch) is not supported.

  • IPEST is not supported.

Notes#

  • if STO package in projectfile is absent, an error is thrown when trying to write the imod.mf6.Modflow6Simulation object to disk. This is due to the fact that the STO package is mandatory in iMOD Python. A workaround is to add a imod.mf6.StorageCoefficient package to the projectfile before calling imod.mf6.Modflow6Simulation.write().

  • When importing models with the ANI package, make sure to activate the “XT3D” in the NodePropertyFlow package of the model.

  • Solver settings (PCG) are NOT imported from iMOD5, instead a solver settings preset from MODFLOW6 (“Moderate”) is set. This is because the solvers between iMODLFOW and MODFLOW6 are different. You are advised to test settings yourself.

  • The imported iMOD5 discretization for the model is created by taking the smallest grid and finest resolution amongst the TOP, BOT, and BND grids. This differs from iMOD5, where the first BND grid is used as target grid. All input grids are regridded towards this target grid. Therefore, be careful when you have a very fine resolution in one of these packages.

Files#

Here an overview of iMOD5 files supported:

iMOD5 file

iMOD Python function

Workaround

Open projectfile data (.prj)

imod.formats.prj.open_projectfile_data(), imod.formats.prj.read_projectfile()

Open runfile data (.run)

Convert to .prj file with iMOD5 BATCH function RUNFILE

Open point data (.ipf)

imod.formats.ipf.read()

Save point data (.ipf)

imod.formats.ipf.save()

Open raster data (.idf)

imod.formats.idf.open()

Save raster data (.idf)

imod.formats.idf.save()

Open vector data: 2D & 3D (.gen)

imod.formats.gen.read()

Save vector data (.gen)

imod.formats.gen.write()

Open 1D network data (.isg)

Rasterize to .idf files with iMOD5 BATCH function ISGGRID

Open raster data (.asc)

imod.formats.rasterio.open()

Open legend file (.leg)

imod.visualize.read_imod_legend()

MODFLOW6#

Here an overview of iMOD5 MODFLOW6 features:

iMOD5 pkg

functionality

iMOD Python function/method

Model

From iMOD5 data

imod.mf6.Modflow6Simulation.from_imod5_data()

Model

Regrid

imod.mf6.Modflow6Simulation.regrid_like()

Model

Clip

imod.mf6.Modflow6Simulation.clip_box()

Model

Validate

imod.mf6.Modflow6Simulation.write()

BND

IBOUND to IDOMAIN

imod.mf6.StructuredDiscretization.from_imod5_data()

BND, TOP, BOT

Import from grid (IDF)

imod.mf6.StructuredDiscretization.from_imod5_data()

BND, TOP, BOT

Align iMOD5 input grids

imod.mf6.StructuredDiscretization.from_imod5_data()

BND, TOP, BOT

Regrid

imod.mf6.StructuredDiscretization.regrid_like()

BND, TOP, BOT

Clip

imod.mf6.StructuredDiscretization.clip_box()

BND, SHD

set constant heads starting head (IBOUND = -1)

imod.mf6.ConstantHead.from_imod5_shd_data()

BND, CHD

set constant heads (IBOUND = -1)

imod.mf6.ConstantHead.from_imod5_data()

KDW, VCW, KVV, THK

Quasi-3D permeability from grid (IDF)

Quasi-3D is only supported by MODFLOW2005. MODFLOW6 requires fully 3D.

KHV, KVA

3D permeability from grid (IDF)

imod.mf6.NodePropertyFlow.from_imod5_data()

ANI

Set horizontal anistropy

imod.mf6.NodePropertyFlow.from_imod5_data()

KHV, KVA, ANI

Align iMOD5 input grids

imod.mf6.NodePropertyFlow.from_imod5_data()

KHV, KVA, ANI

Regrid

imod.mf6.NodePropertyFlow.regrid_like()

KHV, KVA, ANI

Clip

imod.mf6.NodePropertyFlow.clip_box()

STO, SPY

From grid (IDF)

imod.mf6.StorageCoefficient.from_imod5_data()

STO, SPY

Regrid

imod.mf6.StorageCoefficient.regrid_like()

STO, SPY

Clip

imod.mf6.StorageCoefficient.clip_box()

RCH

From grid (IDF)

imod.mf6.Recharge.from_imod5_data()

RCH

Regrid

imod.mf6.Recharge.regrid_like()

RCH

Clip

imod.mf6.Recharge.clip_box()

CHD

From grid (IDF)

imod.mf6.ConstantHead.from_imod5_data()

CHD

Regrid

imod.mf6.ConstantHead.regrid_like()

CHD

Clip

imod.mf6.ConstantHead.clip_box()

GHB

Auto placement (IDEFLAYER)

imod.mf6.GeneralHeadBoundary.from_imod5_data(), imod.prepare.allocate_ghb_cells()

GHB

Distribute conductances (DISTRCOND)

imod.mf6.GeneralHeadBoundary.from_imod5_data(), imod.prepare.distribute_ghb_conductance()

GHB

Cleanup

imod.mf6.GeneralHeadBoundary.cleanup(), imod.prepare.cleanup_ghb()

GHB

From grid (IDF)

imod.mf6.GeneralHeadBoundary.from_imod5_data()

GHB

Align iMOD5 input grids

imod.mf6.GeneralHeadBoundary.from_imod5_data()

GHB

Regrid

imod.mf6.GeneralHeadBoundary.regrid_like()

GHB

Clip

imod.mf6.GeneralHeadBoundary.clip_box()

DRN

Auto placement (IDEFLAYER)

imod.mf6.Drainage.from_imod5_data(), imod.prepare.allocate_drn_cells()

DRN

Distribute conductances (DISTRCOND)

imod.mf6.Drainage.from_imod5_data(), imod.prepare.distribute_drn_conductance()

DRN

Cleanup

imod.mf6.Drainage.cleanup(), imod.prepare.cleanup_drn()

DRN

From grid (IDF)

imod.mf6.Drainage.from_imod5_data()

DRN

Align iMOD5 input grids

imod.mf6.Drainage.from_imod5_data()

DRN

Regrid

imod.mf6.Drainage.regrid_like()

DRN

Clip

imod.mf6.Drainage.clip_box()

RIV

Infiltration factors (IFF)

imod.mf6.River.from_imod5_data(), imod.mf6.River.split_conductance()

RIV

Auto placement (IDEFLAYER)

imod.mf6.River.from_imod5_data(), imod.prepare.allocate_riv_cells()

RIV

Distribute conductances (DISTRCOND)

imod.mf6.River.from_imod5_data(), imod.prepare.distribute_riv_conductance()

RIV

Cleanup

imod.mf6.River.cleanup(), imod.prepare.cleanup_riv()

RIV

From grid (IDF)

imod.mf6.River.from_imod5_data()

RIV

Align iMOD5 input grids

imod.mf6.River.from_imod5_data()

RIV

Regrid

imod.mf6.River.regrid_like()

RIV

Clip

imod.mf6.River.clip_box()

ISG, SFT

From 1D network (ISG)

SFR

From 1D network (ISG)

HFB

From 2D vector (GEN)

imod.mf6.SingleLayerHorizontalFlowBarrierResistance.from_imod5_data()

HFB

From 3D vector (GEN)

imod.mf6.HorizontalFlowBarrierResistance.from_imod5_data()

HFB

Snap vector to grid edges

imod.mf6.SingleLayerHorizontalFlowBarrierResistance.to_mf6_pkg(), imod.mf6.HorizontalFlowBarrierResistance.to_mf6_pkg()

HFB

Auto placement, account for not fully penetrating barriers

imod.mf6.HorizontalFlowBarrierResistance.to_mf6_pkg()

HFB

Clip

imod.mf6.SingleLayerHorizontalFlowBarrierResistance.clip_box(), imod.mf6.HorizontalFlowBarrierResistance.clip_box()

HFB

Cleanup

WEL

From point data with timeseries (IPF)

imod.mf6.LayeredWell.from_imod5_data(), imod.mf6.Well.from_imod5_data()

WEL

Auto placement

imod.mf6.LayeredWell.to_mf6_pkg(), imod.mf6.Well.to_mf6_pkg()

WEL

Cleanup

imod.mf6.Well.cleanup(), imod.prepare.cleanup_wel()

WEL

Clip

imod.mf6.LayeredWell.clip_box(), imod.mf6.Well.clip_box()

MetaSWAP#

An overview of the support for iMOD5’s MetaSWAP features:

iMOD5 pkg

MetaSWAP file

functionality

iMOD Python function/method

Model

para_sim.inp

From grids (IDF)

imod.msw.MetaSwapModel.from_imod5_data()

Model

Regrid

imod.msw.MetaSwapModel.regrid_like()

Model

Clip

Model

mod2svat.inp

Coupling

imod.msw.MetaSwapModel.from_imod5_data(), imod.msw.CouplerMapping

Model

idf_svat.ipn

IDF output

imod.msw.MetaSwapModel.from_imod5_data(), imod.msw.IdfMapping

CAP

area_svat.inp

Grid Data

imod.msw.GridData.from_imod5_data()

CAP

svat2swnr_roff.inp

Ponding

imod.msw.Ponding.from_imod5_data()

CAP

infi_svat.inp

Infiltration

imod.msw.Infiltration.from_imod5_data()

CAP

uscl_svat.inp

Perched Water Table

imod.msw.ScalingFactors.from_imod5_data()

CAP

uscl_svat.inp

Scaling factors

imod.msw.ScalingFactors.from_imod5_data()

CAP

Stage-steered drainage

CAP

mete_grid.inp

Meteogrids

imod.msw.MeteoGridCopy.from_imod5_data(), imod.msw.PrecipitationMapping.from_imod5_data(), imod.msw.EvapotranspirationMapping.from_imod5_data()

CAP

mete_stat.inp

Meteostations

CAP

scap_svat.inp

Sprinkling

imod.msw.Sprinkling.from_imod5_data()

CAP

Sprinkling wells grid (IDF)

imod.mf6.LayeredWell.from_imod5_cap_data()

CAP

Sprinkling wells points (IPF)

CAP

Align iMOD5 input grids

Postprocessing#

The following post-processing features are supported:

Visualization#

The following visualization features are supported. For interactively viewing your data, see our iMOD Viewer.

iMOD5 functionality

iMOD Python function/method

Plot cross-section

imod.visualize.cross_section()

Plot map

imod.visualize.plot_map()

Quiverplot

imod.visualize.quiver()

Streamplot

imod.visualize.streamfunction()

Water balance

imod.visualize.waterbalance_barchart()

3D plot

imod.visualize.GridAnimation3D