uxarray
uxarray copied to clipboard
Option to Keep Only Hexagonal Faces in Dual Grid Construction
Proposed new feature or change:
Hi UXarray developers,
Really appreciate UXarray — it's been super helpful in working with SWOT data!
When building a dual grid from a partial spherical grid, the current construct_faces() function allows faces with as few as 3 edges (dual.py line 104). This results in a mix of triangles, pentagons, and hexagons. For my use case, I need a dual grid made only of hexagons.
Feature request:
-
Add an option to require exactly 6 edges per face when constructing the dual grid.
-
Drop or mask nodes that do not satisfy the hexagon requirement.
-
Expose this option as a new argument (e.g., required_edges=6) in
construct_faces()orget_dual().
This would allow users working with partial spherical grids to create clean, regular hexagonal meshes.
Let me know if this sounds reasonable. I’d be happy to help test or contribute if helpful.
Thanks!