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
With the introduction of model validation, users now have some good feedback of what is wrong to their model, for example a model that I recently imported:
E imod.schemata.ValidationError:
E Simulation validation status:
E * imported_model model:
E * riv-2riv package:
E * stage:
E * not all values comply with criterion: >= bottom_elevation
E * riv-3riv package:
E * stage:
E * not all values comply with criterion: >= bottom_elevation
E * riv-5riv package:
E * stage:
E * not all values comply with criterion: >= bottom_elevation
E * conductance:
E * nodata is not aligned with stage
E * bottom_elevation:
E * nodata is not aligned with stage
E not all values comply with criterion: >= bottom
E * riv-5drn package:
E * conductance:
E * nodata is not aligned with elevation
However there is not so much guidance on how to fix things. To help them, I think we could create some cleanup utilities, which need to be very well documented on how they clean up data. Users then still need to make the calls to the functions themselves, so that they are aware what they are doing.
Requirements
Create a namespace, like imod.cleanup for these utilities, becomes part of public API
Extend ValidationError messages with hints to the appropriate functions to call
Well documented cleanup utilities
Add utilities for:
Masking all cells in inactive model domain. mask_all_models basically does this.
BC: Aligning nodata for a boundary condition
RIV: Setting stage above bottom_elevation
RIV/DRN: Setting stage/elevation equal to model bottom
Fixes#1164
# Description
This implements the following cleanup utilities for the robin boundary
conditions, namely the DRN, GHB, and RIV.
- Cleanup helper functions, which are part of the public API (so that
people could also use them outside MODFLOW 6)
- Cleanup methods to the River, GeneralHeadBoundary, Drain package for
convenience. These call the corresponding helper function. Save the user
the hassle of manually finding the right arguments to clean up grids.
- Add a utility method: Call function on grids, which separates grid
variables from settings, calls a function on them, and then merges these
dicts again.
- Converted the fixtures in ``test_mf6_riv`` to regular functions, as
they were used as such anyway. Without this, RivDisCases could not be
used outside the ``test_mf6_riv`` module, now it can be imported.
# Checklist
<!---
Before requesting review, please go through this 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
- [ ] **If feature added**: Added/extended example
The first steps are introduced in #1172, wells and other cleanup utilities (NPF?) are still to be added. As for the validation messages and the examples.
With the introduction of model validation, users now have some good feedback of what is wrong to their model, for example a model that I recently imported:
However there is not so much guidance on how to fix things. To help them, I think we could create some cleanup utilities, which need to be very well documented on how they clean up data. Users then still need to make the calls to the functions themselves, so that they are aware what they are doing.
Requirements
imod.cleanup
for these utilities, becomes part of public APImask_all_models
basically does this.The text was updated successfully, but these errors were encountered: