Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Writing MetaSwapModel imported from imod5 model requires to turn off writing validation #1341

Open
JoerivanEngelen opened this issue Dec 16, 2024 · 0 comments

Comments

@JoerivanEngelen
Copy link
Contributor

Calling:

model = MetaSwapModel.from_imod5_data(...)
model.write(...)

Will throw an error, as all kinds of irrelevant package checks are being done for the options. In its current state, settings files will be copied (just like iMOD5) instead of parsed. We can therefore not check things like whether all the unique values in the landuse grid for GridData are present in the LanduseOptions. So these checks need to be turned off. Right now a user needs to manually turn off validation:

model = MetaSwapModel.from_imod5_data(...)
model.write(..., validate = False)

Modflow6Simulation has a state to turn off certain validation steps, using a ValidationContext.
We can introduce something like in the metaswap module as well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: 📯 New
Development

No branches or pull requests

1 participant