File tree Expand file tree Collapse file tree 2 files changed +12
-1
lines changed
src/anemoi/datasets/create Expand file tree Collapse file tree 2 files changed +12
-1
lines changed Original file line number Diff line number Diff line change @@ -56,7 +56,11 @@ dependencies = [
56
56
" pyyaml" ,
57
57
" semantic-version" ,
58
58
" tqdm" ,
59
- " zarr<=2.17" ,
59
+ # anemoi-datasets supports zarr 2 and zarr 3, but we still use only zarr 2:
60
+ # - we don't want to create zarr 3 datasets yet, as they will no be readable by zarr 2
61
+ # - anemoi-inference needs zarr 2 for patching
62
+ # - anemoi-registry needs zarr 2
63
+ " zarr<3" ,
60
64
]
61
65
62
66
optional-dependencies.all = [
Original file line number Diff line number Diff line change @@ -172,6 +172,13 @@ def __init__(self, path: str):
172
172
"""
173
173
self .path = path
174
174
175
+ if Zarr2AndZarr3 .version == "3" and not os .environ .get ("ANEMOI_DATASETS_ALLOW_BUILDING_ZARR3_DATASETS" ):
176
+ raise ValueError (
177
+ "zarr 3 is installed. anemoi-datasets supports zarr 3, but the datasets build with zarr 3 will "
178
+ "not be readable by zarr 2. It is likely that you do not want to create a dataset with zarr 3. "
179
+ "Please uninstall zarr 3 and install zarr 2."
180
+ )
181
+
175
182
_ , ext = os .path .splitext (self .path )
176
183
if ext != ".zarr" :
177
184
raise ValueError (f"Unsupported extension={ ext } for path={ self .path } " )
You can’t perform that action at this time.
0 commit comments