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 = [
5656 " pyyaml" ,
5757 " semantic-version" ,
5858 " 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-patching needs zarr 2 for patching
62+ # - anemoi-registry needs zarr 2
63+ " zarr<3" ,
6064]
6165
6266optional-dependencies.all = [
Original file line number Diff line number Diff line change @@ -172,6 +172,13 @@ def __init__(self, path: str):
172172 """
173173 self .path = path
174174
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+
175182 _ , ext = os .path .splitext (self .path )
176183 if ext != ".zarr" :
177184 raise ValueError (f"Unsupported extension={ ext } for path={ self .path } " )
You can’t perform that action at this time.
0 commit comments