Skip to content

Navigation Menu

Sign in
Sign up

feat: stream glacier directories - #1966

Open
gampnico wants to merge 66 commits into
OGGM:master from
gampnico:feat-ON-95-stream-glacier-directories
Open

feat: stream glacier directories #1966
gampnico wants to merge 66 commits into
OGGM:master from
gampnico:feat-ON-95-stream-glacier-directories

Conversation

@gampnico

@gampnico gampnico commented Jul 29, 2026
edited
Loading

Copy link
Copy Markdown
Contributor

CAUTION: This branches off from #1908, #1951 for zarr support and incremental glacier directory creation. Those should be merged first.
Closes #1896

For clarity, file formats are:
legacy: the cumulative tar system currently used by OGGM v1.6
v1: the incremental tar system introduced by #1951
v2: the streaming zip system introduced by this PR.

Each format is backwards-compatible with the previous ones.

For a full overview of v2 system and its capabilities I strongly recommend running the notebook here .

In concrete terms, users can now:

  • Stream glacier directories directly from a compatible base URL
  • Pick-and-mix the files they want and download only when used. For example, fetching the monthly temperature series uses 80% less data.
  • Peek at remote manifests to see exactly what's in a bundle before downloading it.
  • Convert between legacy, v1, and v2 file formats.

Technical Overview

  • Streaming-format glacier directories store array data (gridded, climate) and the former pickle objects (flowlines, geometries, etc) as zarr groups inside a single per-glacier data_store.zarr store, and vector data as GeoParquet.

  • The user-facing API is unchanged: workflow.init_glacier_directories(..., from_prepro_level=n, prepro_base_url=...). The client probes for .zip bundles first and falls back to the classic .tar bundles transparently, so old base URLs and old datasets keep working.

  • utils._downloads.peek_remote_manifest and utils._downloads.open_remote_group read a manifest or lazily open a zarr group out of a remote bundle via HTTP range requests so no downloading to disk.

  • Existing published datasets can be converted with two functions from oggm.utils.compat: convert_prepro_to_deltas(..., convert_to_zarr=True) (legacy to incremental v1, pickles to zarr) and convert_prepro_to_v2_artifacts (v1 to v2 streaming artifacts).

  • Tests added/passed

  • Fully documented

  • Entry in whats-new.rst

gampnico added 30 commits April 30, 2026 08:55
Adds:
 - `read_zarr` and `write_zarr` methods which fall back to pickle if no zarr store is available.
 - Warnings that read_pickle methods will be deprecated for future GlacierDirectories.
 - Zarr as a core dependency.
Refs: OGGM#1903 
Adds:
 - Validation for different zarr/pickle stores to maintain backwards
 compatibility.
 - Dedicated module for zarr-related operations.
 - Conversion between existing pickles and zarr.
 - Reconstruction of OGGM objects from minimum possible data.
Refactors:
 - Replaces all instances of `read_pickle` with `read_store`.
 Compatibility is maintained
Currently writes each data set to a separate file instead of a larger
data store
Falls back to pickle if zarr r/w fails
Refs: ON-60
gampnico added 25 commits June 28, 2026 09:31
In existing documentation the convention is to explicitly add a
separator.
WARNING: This branch includes ON-94 and ON-55.
Adds:
- New file format for storing glacier directories (v2).
- Framework to stream glacier directories from zip files. Backwards-compatible.
- Utilities for batch converting existing v1 gdirs to v2 and vice versa.
- Mock streaming utility until v2 gdirs are available on the cluster.
Refactors ffspec chain with a RemoteBundleStore for better cache
integration.
Adds support for reading gdirs remotely.
@gampnico gampnico changed the title (削除) Feat on 95 stream glacier directories (削除ここまで) (追記) feat: streamable glacier directories (追記ここまで) Jul 30, 2026
@gampnico gampnico changed the title (削除) feat: streamable glacier directories (削除ここまで) (追記) feat: stream glacier directories (追記ここまで) Aug 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

No reviews

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Develop gdir-compatible GeoZarr data store

1 participant

AltStyle によって変換されたページ (->オリジナル) /