-
Notifications
You must be signed in to change notification settings - Fork 45
MPAS Reader Updates #1310
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
MPAS Reader Updates #1310
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR enhances the MPAS reader by adding support for node-edge connectivity and refactoring mesh parsing functions for clarity.
- Adds parsing and assignment of
node_edge_connectivityandface_face_connectivityfor the primal mesh. - Refactors several
_parse_*functions to unify padding, zero-replacement, and zero-indexing logic. - Introduces a new test
test_read_primalto verify connectivity variables.
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| uxarray/io/_mpas.py | Refactored connectivity parsers to generic routines; added node‐edge & face‐face parsing |
| test/test_mpas.py | Added test_read_primal; test_read_dual currently lacks assertions |
Comments suppressed due to low confidence (2)
test/test_mpas.py:34
- The
test_read_dualfunction has no assertions. Add checks for expected connectivity variables in the dual mesh (e.g.,face_node_connectivity,node_edge_connectivity, etc.) to ensure the dual path is validated.
def test_read_dual():
uxarray/io/_mpas.py:366
- [nitpick] The docstring specifies primal-only behavior but the signature implies general mesh support. Update the docstring to clearly state that this parser only handles the primal mesh or adjust behavior accordingly.
"""Parses face face connectivity for the primal mesh."""
| ).rename(dict(zip(edge_faces.dims, ugrid.EDGE_FACE_CONNECTIVITY_DIMS))) | ||
|
|
||
|
|
||
| def _parse_face_faces(in_ds, out_ds, mesh_type): |
Copilot
AI
Jul 14, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The mesh_type parameter is not used inside this function. Consider removing it from the signature or extending the implementation to handle both primal and dual meshes.
erogluorhan
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks good to me except the single thing CoPilot has found.
Overview
node_edge_connectivity