Deltares / imod-python

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

Sprinkling from first model layer leads to wrong id's in mod2svat.inp #1057

Open HendrikKok opened 1 month ago

HendrikKok commented 1 month ago

The file mod2svat.inp should only contains unique sets of id's (mod_id, svat, layer). Sprinkling from the first model layer however, results in a doubled set of id's. This leads to unwanted behavior in MetaSWAP.

The _create_well_id method should exclude all id's associated with the first model layer.

Huite commented 1 month 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)

JoerivanEngelen commented 1 month 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)

Though mod2svat.inp is a coupling file, it is part of the MetaSWAP model, as it is a MetaSWAP file. MetaSWAP always requires this file to start a run, also using the old driver.exe. This therefore belongs to the iMOD Python repo in my opinion.

The .dxc files, on the other hand, are the new coupling files used by the iMOD Coupler, these are part of primod. In short: .inp files should be in iMOD Python, the .dxc files in primod.

@luitjansl and I were still a bit on the fence whether or not to move the MetaSWAP part of iMOD Python to primod entirely or not. On one hand: moving it to primod allows us to utilize its quite complex CI to test coupled runs, to see if the .inp files still result in a working model. On the other hand: We want to include regridding, clipping etc. also to the MetaSWAP objects, for which unittests are required, to see if any changes made to iMOD Python's regridding functionality break MetaSWAP objects. I think for now we resorted to keeping it to iMOD Python, and to keep it to testing if files are rendered correctly.