Deltares / Deltares/imod-python

[FEATURE] - Validation settings additional support

Open
#1,352 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement
Dominant language
Python
Stars
41
Forks
12
Avg merge
21h 8m
Merged PRs (30d)
1

Description

There is a ValidationContext which stores validation settings. Currently constructing a simulation with Modflow6Simulation.from_imod5_data turns off the strict checks for the well and hfb packages.

As noticed before in this PR https://github.com/Deltares/imod-python/pull/1351, this becomes problematic when doing the following:

  • Import iMOD5 Simulation
  • Dump to netcdfs + toml
  • Load dumped simulation

Users can workaround this by doing the following, but this requires setting semi-private attributes:

simulation = imod.mf6.Modflow6Simulation("my_simulation")
simulation._validation_context.strict_hfb_validation = False

The following would enhance configurability:

  • Make sure they are dumped to file as well and loaded again.
  • Allow turning off this specific validation with a setter method.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with ValidationContext and Modflow6Simulation.from_imod5_data to trace how validation settings are created and changed during iMOD5 import. Then inspect the netCDF and TOML dump/load path. Done means the relevant settings survive a dump/load round trip and a public setter can disable the specific validation without using semi-private attributes.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
backend
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.