Feat: incremental glacier directory creation - #1951
Open
gampnico wants to merge 69 commits into
Open
Conversation
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
ON-60 write data to zarr
Falls back to pickle if zarr r/w fails Refs: ON-60
… into ON-60-write-data-to-zarr
also removes hardcoded pickles
Merge fix pickle on 60 on 63
ON-60 write data to zarr
fix(workflow): replacement zarr groups
It's finally here :)
In existing documentation the convention is to explicitly add a separator.
hilljessica8787-dot
approved these changes
Jul 21, 2026
3 tasks
Remove multiple if statements and replace with dedicated method
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
It's finally here!
For an easier-to-read demonstration of the new system, download and try the notebook:
Features
utils/compat.py, with support for multiple base URLs and checks to make sure datasets are compatible. You can convert any region, number or combination of RGI IDs.Overview
This changes the default glacier directory system from cumulative levels to incremental ones. Most levels on the cluster are now deltas, which contain only the files that are different or added relative to the previous levels. Clients layer levels they need into a single glacier directory, which now contain manifests to track changes and identify datasets.
L3 and L5 datasets are standalone. L3 because there are differences in certain files between L1 and L3 e.g. inversion_flowlines, and L5 because it's a "minimal" preset.
I'm calling a combination of levels a "materialisation"
plus a per-level manifest, and has clients layer the levels they need into one glacier directory. Legacy (manifest-less) datasets keep working via a fallback that treats them as cumulative materialisations.
Points for Discussion
fsspecandxarrayto pick and mix the data we want without downloading it first!TODO:
Closes #1900
Refs: #1896
whats-new.rst