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
Fixes#960 and #1000
# Description
Adds regrid schemes which replaces the dictionaries under
``_regrid_method`` with pydantic dataclasses.
Pydantic comes with input validation base on type annotation, so
requires no extra code.
[See documentation
here](https://docs.pydantic.dev/latest/concepts/dataclasses/)
This requires pydantic as extra dependency, so is added as dependency.
I kept ``_regrid_method`` as a class variable, as it gave problems as an
attribute with ``imod.mf6.Package.from_file`` classmethod, where
attributes are not forwarded.
I created a new namespace: ``imod.mf6.regrid`` where we can store all
Regridding related stuff. Probably good to move other public API there
as well later on, namely the
``imod.mf6.utilities.regridder_types.RegridderType`` and
``imod.mf6.utilities.regrid.RegridderWeightsCache``. As these are more
than just utilities: They are essential objects for users to do their
regridding at the moment.
# Checklist
- [x] Links to correct issue
- [x] Update changelog, if changes affect users
- [x] PR title starts with ``Issue #nr``, e.g. ``Issue #737``
- [x] Unit tests were added
- [x] **If feature added**: Added/extended example
0 commit comments