From 4cdd62e1b1a70afa5316fa495490b936acf4f5c8 Mon Sep 17 00:00:00 2001 From: Pascal Bourgault Date: Thu, 4 Jul 2024 16:16:17 -0400 Subject: [PATCH] Zarr can be .zip --- CHANGELOG.rst | 1 + src/xscen/io.py | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.rst b/CHANGELOG.rst index 2b727677..dcce3204 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -16,6 +16,7 @@ Internal changes ^^^^^^^^^^^^^^^^ * Include domain in `weight_location` in ``regrid_dataset``. (:pull:`414`). * Added pins to `xarray`, `xclim`, `h5py`, and `netcdf4`. (:pull:`414`). +* Add ``.zip`` and ``.zarr.zip`` as possible file extensions for Zarr datasets. (:pull: `426`). v0.9.1 (2024-06-04) ------------------- diff --git a/src/xscen/io.py b/src/xscen/io.py index 11357cc8..37b02734 100644 --- a/src/xscen/io.py +++ b/src/xscen/io.py @@ -60,7 +60,7 @@ def get_engine(file: Union[str, os.PathLike]) -> str: Engine to use with xarray """ # find the ideal engine for xr.open_mfdataset - if Path(file).suffix == ".zarr": + if Path(file).suffix in [".zarr", ".zip", ".zarr.zip"]: engine = "zarr" elif h5py.is_hdf5(file): engine = "h5netcdf"