Update sample README
Browse files- zarr_sample/README.md +58 -19
zarr_sample/README.md
CHANGED
|
@@ -1,37 +1,76 @@
|
|
| 1 |
# calvdb — Dataset Sample
|
| 2 |
|
| 3 |
-
This folder
|
|
|
|
|
|
|
|
|
|
| 4 |
|
| 5 |
-
|
|
|
|
| 6 |
|
| 7 |
-
|
|
|
|
|
|
|
| 8 |
|
| 9 |
-
##
|
| 10 |
|
| 11 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 12 |
|
| 13 |
## Zarr store structure
|
| 14 |
|
| 15 |
-
Each glacier is
|
|
|
|
| 16 |
|
| 17 |
| Array | Shape | Description |
|
| 18 |
|---|---|---|
|
| 19 |
-
| `sdt` | `(T, H, W)` | Signed distance transform of the calving front
|
| 20 |
| `imagery` | `(T, 5, H, W)` | Multispectral imagery: blue, green, red, NIR, SWIR-1 |
|
| 21 |
-
| `geophys` | `(T, 6, H, W)` |
|
| 22 |
-
| `climate` | `(T, 2)` |
|
| 23 |
-
| `trace` | `(T, H, W)` | Rasterised calving-front line (
|
| 24 |
-
| `dates` | `(T,)` | Observation dates
|
| 25 |
-
| `
|
| 26 |
-
| `
|
| 27 |
-
| `
|
| 28 |
-
| `
|
| 29 |
-
| `
|
| 30 |
|
| 31 |
-
All arrays share the same time axis `T`. Spatial dimensions `H × W` vary per
|
|
|
|
| 32 |
|
| 33 |
-
> **Note on `ice_fjord_mask` (geophys channel 5):**
|
|
|
|
|
|
|
|
|
|
| 34 |
|
| 35 |
## Further details
|
| 36 |
|
| 37 |
-
- **Full dataset, splits and
|
|
|
|
|
|
| 1 |
# calvdb — Dataset Sample
|
| 2 |
|
| 3 |
+
This folder holds one glacier from **calvdb**, left **unzipped** so you can inspect
|
| 4 |
+
the store layout in the file browser above without downloading the full dataset
|
| 5 |
+
(5.4 GB). Click into `RGI60-07.00025.zarr/` and open any `zarr.json` to see the
|
| 6 |
+
shape, dtype, chunking and dimension names of an array.
|
| 7 |
|
| 8 |
+
The sample is Braasvellbreen (RGI60-07.00025), 55 observations, from the **train**
|
| 9 |
+
split. Its arrays are identical to `zarr_zipped/RGI60-07.00025.zarr.zip`.
|
| 10 |
|
| 11 |
+
> **For actual use, download from [`zarr_zipped/`](../zarr_zipped) instead** — one
|
| 12 |
+
> file of 275 MB rather than the 617 loose files here, and readable without
|
| 13 |
+
> unzipping. This copy exists for browsing.
|
| 14 |
|
| 15 |
+
## Reading it
|
| 16 |
|
| 17 |
+
Requires **zarr >= 3.0** and **Python >= 3.11**. These are Zarr **format 3** stores;
|
| 18 |
+
zarr-python 2.x cannot read them and fails with
|
| 19 |
+
`GroupNotFoundError: group not found at path ''`. See the
|
| 20 |
+
[main README](../README.md#requirements) for the full requirements and
|
| 21 |
+
troubleshooting.
|
| 22 |
+
|
| 23 |
+
```python
|
| 24 |
+
import zarr
|
| 25 |
+
from huggingface_hub import snapshot_download
|
| 26 |
+
|
| 27 |
+
path = snapshot_download(
|
| 28 |
+
repo_id="enscg/calvdb",
|
| 29 |
+
repo_type="dataset",
|
| 30 |
+
allow_patterns="zarr_sample/RGI60-07.00025.zarr/*",
|
| 31 |
+
)
|
| 32 |
+
group = zarr.open_group(f"{path}/zarr_sample/RGI60-07.00025.zarr", mode="r")
|
| 33 |
+
print(group["sdt"].shape) # (55, 541, 1052)
|
| 34 |
+
```
|
| 35 |
+
|
| 36 |
+
The zipped archives are read the same way but without unzipping:
|
| 37 |
+
|
| 38 |
+
```python
|
| 39 |
+
store = zarr.storage.ZipStore("RGI60-07.00025.zarr.zip", mode="r")
|
| 40 |
+
group = zarr.open_group(store, mode="r")
|
| 41 |
+
```
|
| 42 |
+
|
| 43 |
+
A complete runnable example is in
|
| 44 |
+
[`example_loading.ipynb`](../example_loading.ipynb).
|
| 45 |
|
| 46 |
## Zarr store structure
|
| 47 |
|
| 48 |
+
Each glacier is a Zarr v3 group (zstd compression) with `T` observations on an
|
| 49 |
+
`H × W` grid:
|
| 50 |
|
| 51 |
| Array | Shape | Description |
|
| 52 |
|---|---|---|
|
| 53 |
+
| `sdt` | `(T, H, W)` | Signed distance transform of the calving front, metres, clipped ±2000; the front is the zero level set |
|
| 54 |
| `imagery` | `(T, 5, H, W)` | Multispectral imagery: blue, green, red, NIR, SWIR-1 |
|
| 55 |
+
| `geophys` | `(T, 6, H, W)` | Bed elevation, surface elevation, ice thickness, surface velocity, strain rate, ice–fjord mask |
|
| 56 |
+
| `climate` | `(T, 2)` | Surface runoff, ocean temperature |
|
| 57 |
+
| `trace` | `(T, H, W)` | Rasterised calving-front line (evaluation only, not a model input) |
|
| 58 |
+
| `dates` | `(T,)` | Observation dates, YYYY-MM-DD |
|
| 59 |
+
| `sensors` | `(T,)` | Sensor code: `0=S2, 1=LE07, 2=LC08, 3=LC09, 255=unknown` |
|
| 60 |
+
| `valid_sdt` | `(T,)` | True if the SDT observation is valid |
|
| 61 |
+
| `valid_img` | `(T,)` | True if the imagery observation is valid |
|
| 62 |
+
| `valid_clm` | `(T,)` | True if the climate observation is valid |
|
| 63 |
+
| `valid_trace` | `(T,)` | True if the trace observation is valid |
|
| 64 |
|
| 65 |
+
All arrays share the same time axis `T`. Spatial dimensions `H × W` vary per
|
| 66 |
+
glacier. Resolution is 30 m; CRS is EPSG:3995 (Arctic Polar Stereographic).
|
| 67 |
|
| 68 |
+
> **Note on `ice_fjord_mask` (geophys channel 5):** it is stored for completeness
|
| 69 |
+
> but excluded from the model input tensor in the baseline experiments, because
|
| 70 |
+
> the mask boundary is inaccurate for several glaciers. It is retained to support
|
| 71 |
+
> future work that may use or improve upon this variable.
|
| 72 |
|
| 73 |
## Further details
|
| 74 |
|
| 75 |
+
- **Full dataset, requirements, splits and normalisation:** see the main
|
| 76 |
+
[README](../README.md)
|