moczarr
Sparse-DGGS xarray reader for morton-hive zarr stores: MOC-declared domains, arithmetic shard paths, lazy dense views.
moczarr opens stores written by zagg
under the morton-hive layout convention: a digit tree of self-describing
zarr v3 leaves keyed by morton decimal ids, with a static manifest and
hierarchical coverage MOCs declaring where data exists — so a reader
intersects an area of interest arithmetically instead of listing objects
or materializing a global grid.
import moczarr
ds = moczarr.open_hive("s3://bucket/prefix", aoi=["433142"], anonymous=True)
Features
open_hive()— one call from store root (local path ors3://bucket/prefix) to a lazyxarray.Dataset; AOI covers (packed morton words or decimal strings, mixed orders) and time-window scoping resolve through coverage metadata, not object listings. An AOI over no coverage is a data answer: a schema-correct empty dataset, not an error.- A MOC-backed lazy index (the default) — the row domain held as a
rank-space interval set built from the same coverage arithmetic that
selected the leaves; the on-disk cell arrays are never read, and the
mortoncoordinate is fabricated on demand (sel/isel/alignment as interval arithmetic;index_kind="pandas"materializes instead). - Exact NESTED fabrication — HEALPix NESTED
cell_idsderived exactly from the packed morton words ("NESTED is fabricated, never stored"). - Cross-resolution joins — morton truncation makes coarse↔fine work a
vectorized lookup:
parent_cellsfor fine→coarse groupby aggregation,join_coarsefor the coarse→fine broadcast, no I/O. - xdggs integration (
moczarr[xdggs]) — a registered"morton"grid, sods.dggs.sel_latlon,cell_boundaries,zoom_towork on anyopen_hiveresult.
Docs: espg.github.io/moczarr — quickstart, concepts, API reference, and the example notebook (runnable on binder via the badge above).
Install
pip install moczarr # core reader
pip install 'moczarr[xdggs]' # + the ds.dggs accessor integration
Until the first PyPI release lands, install from git:
pip install 'moczarr[xdggs] @ git+https://github.com/espg/moczarr'
Development (uses uv):
uv sync --extra test --extra xdggs
uv run pytest -v
The convention
moczarr is the read side of a convention owned elsewhere: the morton-hive
layout and morton decimal ids are specified in the
mortie specification,
and the coverage tiers, commit-stamp semantics, and reader architecture in
zagg's sparse_coverage.md
(§4 coverage, §5 reader, §6 xarray extension). Plan and progress:
espg/moczarr#1.
License
MIT
Metadata
Release files for moczarr 0.8.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| moczarr-0.8.0.tar.gz | 425.1 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| moczarr-0.8.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 607.3 kB
Release files / moczarr-0.8.0.tar.gz
| Download URL | moczarr-0.8.0.tar.gz |
|---|---|
| Size | 425.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
e4700d66aed15260fd261fb3e0ee006436f64ba59e40647f3993801963bd4d71
|
|
BLAKE2b-256 checksum How to use checksums |
8e74a38e06057ce1d6684507df63bb96c4e471491d8986de30d271a23a5603d1
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 11, 2026.
Transparency logRelease files / moczarr-0.8.0-py3-none-any.whl
| Download URL | moczarr-0.8.0-py3-none-any.whl |
|---|---|
| Size | 182.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
8151b52ea6e624ceec4f38e24356700dd0e68137c2d482c4b5dd519dcd76cce7
|
|
BLAKE2b-256 checksum How to use checksums |
b7fc5a1256aff97b7df469ce42683ee3914e098d9fe38d93cef381016cd78a10
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 11, 2026.
Transparency log