Deltares / Deltares/imod-python
[FEATURE] - Replace Voxelizer and LayerRegridder logic with xugrid's Regridder logic
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 41
- Forks
- 12
- Avg merge
- 21h 8m
- Merged PRs (30d)
- 1
Description
Currently the Regridder for 2D grids can already be replaced with xugrid's. Right now we still throw a DeprecationWarning, but we will eventually remove these classes. The LayerRegridder and Voxelizer, however, still have no full replacement in xugrid.
As mentioned earlier, there is backend logic to eventually replace the Voxelizer and LayerRegridder, but it hasn't been exposed (and probably not well tested):
The most important thing is that the xugrid one is missing the Voxelizer and LayerRegridder, essentially.
This requires top and bottom data, or bounds on a z coordinate. I've implemented the logic for computing the weights: https://github.com/Deltares/xugrid/blob/fc0bdcb0eaeff62887f1e62fadd61957629dff61/xugrid/regrid/overlap_1d.py#L158
But it's not exposed yet here (class exists: https://github.com/Deltares/xugrid/blob/fc0bdcb0eaeff62887f1e62fadd61957629dff61/xugrid/regrid/structured.py#L736)
Originally posted by @Huite in #1372
Tasks are:
- Expose
StructuredGrid3dandExplicitStructuredGrid3dclasses in xugrid and finish any TODOs there - Test whether these new classes produce similar results as the original
LayerRegridderandVoxelizer - Forward calls from Voxelizer to StructuredGrid3d and from
LayerRegriddertoExplicitStructuredGrid3d
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with xugrid/regrid/overlap_1d.py and xugrid/regrid/structured.py, focusing on the existing StructuredGrid3d and ExplicitStructuredGrid3d classes and their TODOs. Expose those classes in xugrid, compare their results with the existing LayerRegridder and Voxelizer, then forward each existing class to its corresponding xugrid implementation.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- data
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 30/100