You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
contains logic to map the SVAT to the coarse meteo grid files. This logic is the same as the one that can be found in the xugrid CentroidLocatorRegridder:
The latter one has the advantage of working on unstructured grids as well, and should have more unit tests and the like as well. I recommend replacing the grid_mapping logic by roughly the following:
This function:
imod-python/imod/msw/meteo_mapping.py
Line 38 in 86bf0ca
contains logic to map the SVAT to the coarse meteo grid files. This logic is the same as the one that can be found in the xugrid CentroidLocatorRegridder:
https://deltares.github.io/xugrid/api/xugrid.CentroidLocatorRegridder.html
The latter one has the advantage of working on unstructured grids as well, and should have more unit tests and the like as well. I recommend replacing the
grid_mapping
logic by roughly the following:Note that index is an a 1D array for indexing along the faces. You can generate 2D arrays relatively easily, using numpy unravel_index: https://numpy.org/doc/stable/reference/generated/numpy.unravel_index.html
Then, repeat for the number of subunits, etc.
The text was updated successfully, but these errors were encountered: