Deltares / imod-python

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

Improve TWRI Regridding example #596

Closed Manangka closed 8 months ago

Manangka commented 12 months ago

In GitLab by @JoerivanEngelen on Oct 19, 2023, 11:18

There are some flaws/mistakes in the TWRI Regridding example which we can improve:

luitjansl commented 8 months ago

"Furthermore the dx dy in the title of the plot stay 5000 (perhaps a fix for the Regridder?), making for a very confusing plot (I first thought the example was bugged)."

The issue here was that for some arrays the regridder is not called. For example a K-array with only a layer dimension. Such arrays carry the dx-dy coordinates. Adding them to the dataset will update the dx/dy coordinates of the dataset. This can be fixed by removing dx/dy from layer -based arrays when regridding.