Skip to main content

moczarr

Docs Binder

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 or s3://bucket/prefix) to a lazy xarray.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 morton coordinate is fabricated on demand (sel/isel/alignment as interval arithmetic; index_kind="pandas" materializes instead).
  • Exact NESTED fabrication — HEALPix NESTED cell_ids derived exactly from the packed morton words ("NESTED is fabricated, never stored").
  • Cross-resolution joins — morton truncation makes coarse↔fine work a vectorized lookup: parent_cells for fine→coarse groupby aggregation, join_coarse for the coarse→fine broadcast, no I/O.
  • xdggs integration (moczarr[xdggs]) — a registered "morton" grid, so ds.dggs.sel_latlon, cell_boundaries, zoom_to work on any open_hive result.

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

moczarr-0.6.0.tar.gz (369.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

moczarr-0.6.0-py3-none-any.whl (153.3 kB view details)

Uploaded Python 3

File details

Details for the file moczarr-0.6.0.tar.gz.

File metadata

  • Download URL: moczarr-0.6.0.tar.gz
  • Upload date:
  • Size: 369.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for moczarr-0.6.0.tar.gz
Algorithm Hash digest
SHA256 df818522046cfc5bc4109a52ac6e8b5ab526c4f45b49ee7a7a05c2e6c27909a6
MD5 acc5b1637d171e2a07762a87e6c37b97
BLAKE2b-256 b712460fd6ae2325a84b52b02c06ba8a7fa9e063a35dc95c8e520f379e584334

See more details on using hashes here.

Provenance

The following attestation bundles were made for moczarr-0.6.0.tar.gz:

Publisher: publish.yml on espg/moczarr

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file moczarr-0.6.0-py3-none-any.whl.

File metadata

  • Download URL: moczarr-0.6.0-py3-none-any.whl
  • Upload date:
  • Size: 153.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for moczarr-0.6.0-py3-none-any.whl
Algorithm Hash digest
SHA256 9fda38d1f7246df71f84888721fbccb78514a110b7df02b9dfc37c817023682b
MD5 581510e9b7d900b174684c54d740ed06
BLAKE2b-256 f3360a27fd5e90294957ca95d7f080c5e05add6742cc9ace8ed05ac368d7431b

See more details on using hashes here.

Provenance

The following attestation bundles were made for moczarr-0.6.0-py3-none-any.whl:

Publisher: publish.yml on espg/moczarr

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Release history Release notifications | RSS feed

This release

0.6.0 This release

2 files

0.5.0

2 files

0.4.0

2 files

0.3.0

2 files

0.2.0

2 files

0.1.0

2 files

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page