Deltares / imod-python

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

msw.CouplerMapping should evaluate the well package only if msw.Sprinkling class is present #1056

Open HendrikKok opened 4 months ago

HendrikKok commented 4 months ago

When generating the coupled id's, the well package is evaluated to look for groundwater extraction nodes. If after generating the MetaSWAP model, the msw.Sprinkling package is popped from the model, the coupling still includes the sprinkling nodes. Since the corresponding sprinkling input is not generated, this results in MetaSWAP errors.

A more robust method would be to evaluate the well package only when Sprinkling package is present in model.

Huite commented 4 months ago

Doesn't this belong in primod, in the imod-coupler repo instead? (The code is currently duplicated and share between here and there, I think)