Update ConservativeRegridding compat to v0.2#166
Open
ctessum-claude wants to merge 2 commits intoEarthSciML:mainfrom
Open
Update ConservativeRegridding compat to v0.2#166ctessum-claude wants to merge 2 commits intoEarthSciML:mainfrom
ctessum-claude wants to merge 2 commits intoEarthSciML:mainfrom
Conversation
ConservativeRegridding v0.2 changed the Regridder constructor to require GeoInterface-compatible polygon objects and an explicit manifold argument, instead of accepting raw tuple-based polygon vectors directly. - Add GeoInterface and GeometryOpsCore as dependencies - Convert polygon vertex vectors to GI.Polygon objects before passing to ConservativeRegridding.Regridder - Pass GeometryOpsCore.Planar() manifold explicitly to Regridder - Update ConservativeRegridding compat from 0.1 to 0.2 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Work around three bugs in ConservativeRegridding v0.2.0 for Planar grids:
1. cell_range_extent has swapped mapreduce arguments for ExplicitPolygonGrid{Planar}
(fixed via runtime method override in __init__)
2. _area_criterion not implemented for 2D planar extents
(bypassed via threaded=false)
3. regrid! only accepts vectors, not reshaped matrices
(fixed by handling 2D and 3D cases separately in regrid_horizontal!)
Also converts polygon vertex vectors to GeoInterface.Polygon objects and
reshapes them into matrices as required by CR v0.2's treeify/ExplicitPolygonGrid.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #166 +/- ##
==========================================
- Coverage 89.73% 89.55% -0.18%
==========================================
Files 12 12
Lines 1188 1206 +18
==========================================
+ Hits 1066 1080 +14
- Misses 122 126 +4
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
cell_range_extenthas swappedmapreducearguments forExplicitPolygonGrid{Planar}— fixed via runtime method override in__init___area_criterionnot implemented for 2D planar extents — bypassed viathreaded=falseregrid!only accepts vectors, not reshaped matrices — fixed by handling 2D/3D cases separatelytreeify/ExplicitPolygonGridContext
PR #161 (from CompatHelper) bumped ConservativeRegridding compat to include v0.2, but tests failed because v0.2 changed the
Regridderconstructor API and introduced several bugs for Planar grids.Test plan
🤖 Generated with Claude Code