Spaces:
Sleeping
Sleeping
Downgrade to zarr v2 for compatibility
Browse files- Use zarr<3.0.0 to match dynamical.org format
- Use xarray<2025.1.0 for zarr v2 support
- Simplify loading code to use consolidated=True
- Remove zarr v3 specific parameters
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
- app.py +4 -19
- requirements.txt +2 -2
app.py
CHANGED
|
@@ -61,25 +61,10 @@ def load_dataset(dataset_name, use_cache=True):
|
|
| 61 |
url = CATALOG[dataset_name]["url"]
|
| 62 |
logger.info(f"Opening zarr store at: {url}")
|
| 63 |
|
| 64 |
-
#
|
| 65 |
-
|
| 66 |
-
|
| 67 |
-
|
| 68 |
-
ds = xr.open_zarr(url, zarr_version=2, consolidated=True)
|
| 69 |
-
logger.info(f"Successfully opened zarr store with consolidated metadata")
|
| 70 |
-
except Exception as e1:
|
| 71 |
-
logger.warning(f"Failed with consolidated=True: {e1}")
|
| 72 |
-
try:
|
| 73 |
-
# Second try: zarr v2 without consolidated metadata
|
| 74 |
-
logger.info("Trying zarr_version=2 with consolidated=False")
|
| 75 |
-
ds = xr.open_zarr(url, zarr_version=2, consolidated=False)
|
| 76 |
-
logger.info(f"Successfully opened zarr store without consolidated metadata")
|
| 77 |
-
except Exception as e2:
|
| 78 |
-
logger.warning(f"Failed with consolidated=False: {e2}")
|
| 79 |
-
# Third try: default xarray behavior
|
| 80 |
-
logger.info("Trying default xarray open_zarr")
|
| 81 |
-
ds = xr.open_zarr(url)
|
| 82 |
-
logger.info(f"Successfully opened zarr store with default settings")
|
| 83 |
logger.info(f"Dataset dimensions: {dict(ds.dims)}")
|
| 84 |
logger.info(f"Dataset variables: {list(ds.data_vars)}")
|
| 85 |
logger.info(f"Dataset coordinates: {list(ds.coords)}")
|
|
|
|
| 61 |
url = CATALOG[dataset_name]["url"]
|
| 62 |
logger.info(f"Opening zarr store at: {url}")
|
| 63 |
|
| 64 |
+
# Open zarr store (using zarr v2)
|
| 65 |
+
logger.info("Opening with consolidated=True")
|
| 66 |
+
ds = xr.open_zarr(url, consolidated=True)
|
| 67 |
+
logger.info(f"Successfully opened zarr store")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 68 |
logger.info(f"Dataset dimensions: {dict(ds.dims)}")
|
| 69 |
logger.info(f"Dataset variables: {list(ds.data_vars)}")
|
| 70 |
logger.info(f"Dataset coordinates: {list(ds.coords)}")
|
requirements.txt
CHANGED
|
@@ -1,6 +1,6 @@
|
|
| 1 |
gradio==5.47.2
|
| 2 |
-
xarray
|
| 3 |
-
zarr
|
| 4 |
fsspec
|
| 5 |
aiohttp
|
| 6 |
s3fs
|
|
|
|
| 1 |
gradio==5.47.2
|
| 2 |
+
xarray<2025.1.0
|
| 3 |
+
zarr<3.0.0
|
| 4 |
fsspec
|
| 5 |
aiohttp
|
| 6 |
s3fs
|