Skip to content

Rumi backend entrypoint - #95

Draft
weiji14 wants to merge 7 commits into
xarray-contrib:mainfrom
weiji14:rumi-backend
Draft

weiji14 wants to merge 7 commits into
xarray-contrib:mainfrom
weiji14:rumi-backend

Conversation

@weiji14

@weiji14 weiji14 commented Nov 25, 2026 •

Copy link
Copy Markdown
Member

Read rumi data into xarray via rumi's DLPack framework/backend.

(Yes, as if 2 existing backend entrypoint PRs stuck for months isn't enough)

Preview: TODO

TODO:

  • Initial implementation
  • Properly add band attributes/metadata (did as best as I can, but could be better maybe)
  • Properly handle time_kind instant/interval
  • Check other frame_unit layouts besides CHW.
  • Add test with xr.open_mfdataset()
  • Switch from pip install rumi-eo to conda-forge installation once/if packaged
  • Create tutorial showing example usage
  • etc

@weiji14 weiji14 added the enhancement New feature or request label Nov 25, 2026
@weiji14 weiji14 self-assigned this Nov 25, 2026
Read rumi data into xarray via rumi's DLPack framework/backend. Use cupy.from_dlpack to read the DLPack tensor, and setting the coordinates via rasterix. Added some API docs and basic unit tests.
Extra attention to ensuring the .dt accessor works too. May need to decide whether to allow custom `pattern` later.
So that the band description and center wavelength metadata can be preserved properly. Following STAC EO extension spec for the band attrs, and try to follow STAC CF extension spec's field names for the ERA5 dataset.
Fixes `TypeError: type 'memoryview' is not subscriptable`, because `memoryview` only became a generic type in Python 3.14, see https://docs.python.org/3.14/builtins/stdtypes.html#memoryview
Can't reliably deduce whether to use STAC EO, CF or SAR extension, so just lump it all into a 'description' key and let someone postprocess that metadata as needed.
Using `raster:sampling` field name from https://github.com/stac-extensions/raster/tree/v2.0.0, to store the GTRasterTypeGeoKey attribute value of PixelIsArea (1) or PixelIsPoint (2)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant