| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
…ng, and throw TypeError when format not supported by class
…groundwater = 0, and properly order the columns of the dataframe
…. Not all of them succeed yet.
There was a problem hiding this comment.
Adds experimental MetaSWAP “sprinkling from IPF” support by introducing a point-based sprinkling package, while keeping the legacy Sprinkling API stable via deprecation and a new SprinklingGrid implementation. This also extends MF6 well conversion from iMOD5 CAP point data and threads stable well IDs through Mf6Wel to support coupling.
Changes:
Copilot reviewed 16 out of 16 changed files in this pull request and generated 7 comments.
Show a summary per file| File | Description |
|---|---|
| imod/tests/test_msw/test_sprinkling.py | Refactors/expands sprinkling tests to cover grid + new point-based sprinkling and updated API names. |
| imod/tests/test_msw/test_coupler_mapping.py | Updates helper to construct Mf6Wel with the new id argument. |
| imod/tests/test_mf6/test_mf6_wel.py | Updates CAP point-data test to validate LayeredWell.from_imod5_cap_data() now supports IPF. |
| imod/tests/test_mf6/test_mf6_wel_lowlvl.py | Updates low-level Mf6Wel tests to pass id. |
| imod/tests/fixtures/msw_model_fixture.py | Switches fixture sprinkling package to SprinklingGrid and passes well IDs to Mf6Wel. |
| imod/tests/fixtures/imod5_cap_data.py | Adjusts CAP sprinkling point fixture contents/column ordering. |
| imod/msw/utilities/imod5_converter.py | Adds typed helpers and conversion logic for sprinkling-from-points vs sprinkling-from-grids. |
| imod/msw/sprinkling.py | Introduces SprinklingBase, implements SprinklingGrid + new SprinklingPoints, and deprecates Sprinkling. |
| imod/msw/regrid/regrid_schemes.py | Adds SprinklingPointsRegridMethod for regridding the points-based sprinkling mapping grid. |
| imod/msw/model.py | Dispatches sprinkling import based on grid vs points and adjusts package-key resolution to remain compatible with legacy Sprinkling type usage. |
| imod/msw/init.py | Exposes SprinklingGrid/SprinklingPoints and keeps deprecated Sprinkling in the public API. |
| imod/mf6/wel.py | Replaces some .values usages, enforces scalar settings safely, and makes from_imod5_cap_data target discretization optional for point inputs. |
| imod/mf6/utilities/imod5_converter.py | Implements CAP point-data well extraction and makes target_dis optional (required only for grid inputs). |
| imod/mf6/mf6_wel_adapter.py | Adds id as optional/extra dataset data for Mf6Wel to support downstream well-to-sprinkling mapping. |
| docs/api/msw.rst | Updates MSW API docs to list SprinklingGrid and SprinklingPoints. |
| docs/api/changelog.rst | Adds changelog entries for new sprinkling-from-points support and sprinkling deprecation/rename. |
imod/msw/sprinkling.py:506
Unsupported format for artificial_recharge_layer: expected a
DataFrame for point data (IPF), got a grid (IDF). Call
imod.msw.Sprinkling.from_imod5_data() instead.
"""
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Sorry, something went wrong.
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
Nice work, that's quite a significant added functionality! Just a few comments for now, mainly for clarity (for me).
Sorry, something went wrong.
| # fmt: on | ||
| case_data.x_p = [2.0, 2.0, 2.0] | ||
| case_data.y_p = [3.0, 2.0, 1.0] | ||
| case_data.layer_p = [1, 2, 3] |
There was a problem hiding this comment.
Does the case were the layer is equal to zero need to be tested? (I think that's a possibility?)
Sorry, something went wrong.
There was a problem hiding this comment.
Very good point! I added some test cases for this, it turned out this required some fixes, and while I was at it, I realized that I could reduce the lengthy _render method a lot, as I was basically conducting the same logic twice in different ways for points outside the svat grid and when layer = 0
Sorry, something went wrong.
There was a problem hiding this comment.
I enjoyed looking at how you set up the tests, some docstrings for the grid cases (like for the point cases) would be nice to make it easier to follow what the cases are.
Sorry, something went wrong.
There was a problem hiding this comment.
Fair point, I've added docstrings to these cases
Sorry, something went wrong.
There was a problem hiding this comment.
LGTM, glad the review was helpful!
Sorry, something went wrong.
…rds to points falling outside the svat grid being checked on a per subunit basis
|
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
Fixes #1835
Description
Adds experimental support for SprinklingPoints class
Changes the following things:
This still has to be tested whether it works with the Peelvenen model, I'll do that in follow-up issue #1908 , where I'll also add a larger regression/user_acceptance test for our Weekly tests.
Checklist