Skip to content

Commit

Permalink
fix download
Browse files Browse the repository at this point in the history
  • Loading branch information
Theophile-Varnier committed Feb 18, 2025
1 parent 2ef180e commit e63feb3
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion copernicusmarine/download_functions/download_arco_series.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,12 @@
import pandas as pd
import xarray
import zarr

if zarr.__version__.startswith("2"):
from zarr.storage import DirectoryStore
else:
from zarr.storage import LocalStore as DirectoryStore

from tqdm.dask import TqdmCallback

from copernicusmarine.catalogue_parser.models import (
Expand Down Expand Up @@ -508,7 +514,7 @@ def _download_dataset_as_zarr(
dataset: xarray.Dataset, output_path: pathlib.Path
):
logger.debug("Writing dataset to Zarr")
store = zarr.DirectoryStore(output_path)
store = DirectoryStore(output_path)
return dataset.to_zarr(store=store, mode="w")


Expand Down

0 comments on commit e63feb3

Please sign in to comment.