Datasets:
Upload README.md with huggingface_hub
Browse files
README.md
CHANGED
|
@@ -101,6 +101,7 @@ print(f"Range: {catalog['datetime'].min()} to {catalog['datetime'].max()}")
|
|
| 101 |
```python
|
| 102 |
import json
|
| 103 |
import fsspec
|
|
|
|
| 104 |
import xarray as xr
|
| 105 |
import pyarrow.parquet as pq
|
| 106 |
|
|
@@ -115,9 +116,10 @@ with fsspec.open(HF_PARQUET, "rb") as f:
|
|
| 115 |
refs = json.loads(row["kerchunk_refs"][0])
|
| 116 |
break
|
| 117 |
|
| 118 |
-
# Open via fsspec reference filesystem
|
| 119 |
-
|
| 120 |
-
|
|
|
|
| 121 |
print(ds)
|
| 122 |
```
|
| 123 |
|
|
|
|
| 101 |
```python
|
| 102 |
import json
|
| 103 |
import fsspec
|
| 104 |
+
import zarr
|
| 105 |
import xarray as xr
|
| 106 |
import pyarrow.parquet as pq
|
| 107 |
|
|
|
|
| 116 |
refs = json.loads(row["kerchunk_refs"][0])
|
| 117 |
break
|
| 118 |
|
| 119 |
+
# Open via fsspec reference filesystem → zarr.storage.FsspecStore (Zarr v3 compatible)
|
| 120 |
+
fs = fsspec.filesystem("reference", fo=refs, remote_protocol="s3", remote_options={"anon": True})
|
| 121 |
+
store = zarr.storage.FsspecStore(fs, read_only=True)
|
| 122 |
+
ds = xr.open_dataset(store, engine="zarr", consolidated=False, zarr_format=2)
|
| 123 |
print(ds)
|
| 124 |
```
|
| 125 |
|