Deltares / imod-python

🐍🧰 Make massive MODFLOW models
https://deltares.github.io/imod-python/
MIT License
18 stars 3 forks source link

Add test for MetaSWAP that runs a model #971

Open JoerivanEngelen opened 6 months ago

JoerivanEngelen commented 6 months ago

Previously, we had tests that run coupled simulations with MetaSWAP, these are now migrated to primod. However, this has the disadvantage that we cannot test if changes in our codebase affect coupled simulations. This is essential for the work coming to us.

Refinement

To start off and get familiar:

In the end, we need something like:

luitjansl commented 1 month ago

another approach would be to migrate the metaswap classes to primod.

Huite commented 1 month ago

another approach would be to migrate the metaswap classes to primod.

This doesn't feel ideal, because ideally primod only does coupling, not any setup.

The problem is that we don't have a "metaswap-python", which does the work properly (like imod does for mf6.exe and ribasim does for ribasim.exe).

Are we sure there isn't a way to run MetaSWAP standalone?

An alternative option is to run MetaSWAP with a ModflowMockup, i.e. just a receiver for the recharge and the storage coefficient. You'd need xmipy, but the Modflow substitute can be quite simple. It can still be a model of sorts; e.g. rectangular with a 1:1 mapping to the MetaSWAP SVATs, one layer, confined, with fixed heads on the boundaries (such that MetaSWAP doesn't get a head back that's fully a dud). Such a model can be setup in probably around 50 lines (using scipy to solve).