|
| 1 | +--- |
| 2 | +title: "UXarray: Xarray extensions for unstructured grids" |
| 3 | +authors: |
| 4 | + - name: Rajeev Jain |
| 5 | + orcid: "0000-0000-0000-0000" |
| 6 | + affiliation: 1 |
| 7 | + - name: Aaron Zedwick |
| 8 | + affiliation: 2 |
| 9 | + - name: David Ahijevych |
| 10 | + affiliation: 3 |
| 11 | + - name: Anissa Zacharias |
| 12 | + affiliation: 3 |
| 13 | + - name: David Galicia |
| 14 | + affiliation: 4 |
| 15 | + - name: Orhan Eroglu |
| 16 | + affiliation: 4 |
| 17 | + - name: Paul Ullrich |
| 18 | + affiliation: 5 |
| 19 | + - name: Philip Chmielowiec |
| 20 | + affiliation: 4 |
| 21 | + - name: Hongyu Chen |
| 22 | + affiliation: 5 |
| 23 | + - name: Kristen Thyng |
| 24 | + affiliation: 6 |
| 25 | + - name: Mario A. Rodriguez |
| 26 | + affiliation: 3 |
| 27 | + - name: Maxime Liquet |
| 28 | + affiliation: 7 |
| 29 | + - name: Michaela Sizemore |
| 30 | + affiliation: 4 |
| 31 | + - name: Katelyn FitzGerald |
| 32 | + affiliation: 6 |
| 33 | +affiliations: |
| 34 | + - name: Affiliation TBD (Lead) |
| 35 | + index: 1 |
| 36 | + - name: Affiliation TBD |
| 37 | + index: 2 |
| 38 | + - name: NCAR/UCAR (TBD) |
| 39 | + index: 3 |
| 40 | + - name: Affiliation TBD |
| 41 | + index: 4 |
| 42 | + - name: University of California, Davis (TBD) |
| 43 | + index: 5 |
| 44 | + - name: Affiliation TBD |
| 45 | + index: 6 |
| 46 | + - name: Affiliation TBD |
| 47 | + index: 7 |
| 48 | +date: 2025-08-18 |
| 49 | +bibliography: paper.bib |
| 50 | +--- |
| 51 | + |
| 52 | +# Summary |
| 53 | + |
| 54 | +UXarray provides an Xarray-compatible interface for loading, analyzing, and visualizing data on unstructured grids. It standardizes access to common grid representations (UGRID, MPAS, Exodus, ICON, SCRIP, ESMF, FESOM, HEALPix), pairing arrays with a Grid object that encodes topology, geometry, and conventions. Grid-aware accessors expose familiar workflows for subset, remap, cross-section extraction, and zonal statistics. |
| 55 | + |
| 56 | + |
| 57 | + |
| 58 | +# Statement of need |
| 59 | + |
| 60 | +Modern climate and weather models increasingly use unstructured meshes. While Xarray offers labeled arrays and rich I/O, it does not natively understand unstructured grid topology. UXarray bridges this gap by enforcing a minimal UGRID-consistent contract and adding accessors that operate with mesh-aware semantics, enabling reproducible and scalable analysis pipelines. |
| 61 | + |
| 62 | +# State of the field |
| 63 | + |
| 64 | +We compare UXarray to adjacent tools and libraries (e.g., generic mesh readers, plotting stacks, and interpolation toolkits) and highlight its focus on tight Xarray integration, standardized I/O across formats, and accessor-based APIs that minimize glue code. |
| 65 | + |
| 66 | +# Implementation |
| 67 | + |
| 68 | +- Core abstractions: Grid and UxDataArray, with UncachedAccessor-based extensions. |
| 69 | +- I/O across multiple formats with normalization to a common topology representation. |
| 70 | +- Cross-sections via geodesic and constant-lat/lon sampling with nearest-neighbor face selection. |
| 71 | +- Remapping, subsetting, and plotting integrations. |
| 72 | + |
| 73 | +```python |
| 74 | +import uxarray as ux |
| 75 | +uxgrid = ux.open_grid("grid.ug") |
| 76 | +uxds = ux.open_dataset("grid.ug", "psi.nc") |
| 77 | + |
| 78 | +# Cross-section along a geodesic |
| 79 | +cs = uxds["psi"].cross_section(start=(-45, -45), end=(45, 45), steps=200) |
| 80 | +``` |
| 81 | + |
| 82 | + |
| 83 | + |
| 84 | +# Use cases |
| 85 | + |
| 86 | +- Cross-section analysis along great-circle arcs and along constant parallels/meridians. |
| 87 | +- Zonal statistics for climate diagnostics. |
| 88 | +- Format-agnostic ingestion and analysis across UGRID/MPAS/Exodus/ICON/SCRIP/ESMF/FESOM/HEALPix. |
| 89 | +- Integration with visualization stacks (Cartopy, HoloViz) for interactive exploration. |
| 90 | +- Project Pythia examples of UXarray usage (to be summarized and cited here). |
| 91 | + |
| 92 | +# Quality control |
| 93 | + |
| 94 | +Continuous integration, unit tests, style and linting (pre-commit, ruff), and multi-platform testing. Target Python 3.10+. |
| 95 | + |
| 96 | +# Acknowledgements |
| 97 | + |
| 98 | +Funding and institutional support to be added. We thank all contributors and users for feedback and testing. |
| 99 | + |
| 100 | +# References |
| 101 | + |
| 102 | +References will be added via paper.bib in subsequent commits (UGRID, Xarray, model format specs, Project Pythia resources). |
0 commit comments