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
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file moczarr-0.3.0.tar.gz.
File metadata
- Download URL: moczarr-0.3.0.tar.gz
- Upload date:
- Size: 273.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2d8abfe0062851bb5378668e50b22eaf60435c1da776df3e8881c884ae26acdb
|
|
| MD5 |
a59ce84a2c9fca8ad0a49496812ceb5a
|
|
| BLAKE2b-256 |
d88774efc1c6c67c0f070bbe2f6869d769cabd78ebd1afe53e22cb117dad3033
|
Provenance
The following attestation bundles were made for moczarr-0.3.0.tar.gz:
Publisher:
publish.yml on espg/moczarr
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
moczarr-0.3.0.tar.gz -
Subject digest:
2d8abfe0062851bb5378668e50b22eaf60435c1da776df3e8881c884ae26acdb - Sigstore transparency entry: 2337885725
- Sigstore integration time:
-
Permalink:
espg/moczarr@476c362e5bcc768ae65675ed2aac4bb7879eb637 -
Branch / Tag:
refs/tags/0.3.0 - Owner: https://github.com/espg
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@476c362e5bcc768ae65675ed2aac4bb7879eb637 -
Trigger Event:
push
-
Statement type:
File details
Details for the file moczarr-0.3.0-py3-none-any.whl.
File metadata
- Download URL: moczarr-0.3.0-py3-none-any.whl
- Upload date:
- Size: 117.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
162e95f8e03c373acb1304ab6e68eedd2419252f9c338a28995a76491aaaf34e
|
|
| MD5 |
9d3801110f5c388b3a4f70091a84f639
|
|
| BLAKE2b-256 |
b11651a028fc5faae59a46796db6fe6b276fca051298d2cb12ef0a2fdeea6913
|
Provenance
The following attestation bundles were made for moczarr-0.3.0-py3-none-any.whl:
Publisher:
publish.yml on espg/moczarr
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
moczarr-0.3.0-py3-none-any.whl -
Subject digest:
162e95f8e03c373acb1304ab6e68eedd2419252f9c338a28995a76491aaaf34e - Sigstore transparency entry: 2337885749
- Sigstore integration time:
-
Permalink:
espg/moczarr@476c362e5bcc768ae65675ed2aac4bb7879eb637 -
Branch / Tag:
refs/tags/0.3.0 - Owner: https://github.com/espg
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@476c362e5bcc768ae65675ed2aac4bb7879eb637 -
Trigger Event:
push
-
Statement type: