Skip to content

Zarr — Dataset#

Backs Dataset.to_zarr(), Dataset.from_zarr() and the GeoZarr routing read_file uses to recognise a Zarr store.

Backend methods write_dataset_to_zarr, read_dataset_from_zarr, classify_zarr_store
Module pyramids_lazy._zarr
Returns a Dataset on read; None on write, or a dask.delayed.Delayed when compute=False
from pyramids.dataset import Dataset

ds = Dataset.read_file("dem.tif")
ds.to_zarr("dem.zarr")
back = Dataset.from_zarr("dem.zarr")

The only fully-parallel raster write#

Zarr is the one raster output format where pyramids can write in parallel: each dask chunk lands in an independent Zarr chunk file, so there is no single writer serialising the output and no GDAL dataset handle to share. The geobox travels as a standard crs_wkt / GeoTransform attribute convention, so the result round-trips through other Zarr raster readers rather than needing bespoke glue.

Overview levels are written as their own arrays, with the geotransform scaled per level.

No-data sentinel agreement#

A Dataset carries one no-data value per band, while a Zarr array carries a single fill_value. Writing therefore has to decide whether the bands agree. The logic here treats NaN as equal to itself, checks that the candidate sentinel is representable in the array's dtype, and only then commits it as the store's fill_value; disagreeing bands leave it unset rather than silently adopting the first band's value.

API#

pyramids_lazy._zarr.write_dataset_to_zarr(ds, store, *, compute=True, mode='w', chunks='auto', storage_options=None, compressor='auto', overview_factors=None, overview_resampling='average') #

Serialise ds to a Zarr store.

Writes the (bands, rows, cols) dask array to <store>/data and persists the pyramids geobox metadata as attributes on both the root group and the array. On compute=False the data write and the attribute write are bundled into a single :class:dask.delayed.Delayed so calling .compute() finalizes everything atomically.

The data array is read with ds.read_array(chunks=...), so it holds physical values: a CF-packed band is unpacked. The store has no channel for scale_factor / add_offset, so such a source is written materialised -- float64 values, and a no-data (no_data_value, _FillValue and the array's fill_value) in the same physical units; see :func:_metadata_dict.

Parameters:

Name Type Description Default
ds Dataset

Source :class:~pyramids.dataset.Dataset.

required
store str | Path | Any

Target store — a path, a fsspec URL (s3://...), or any :class:zarr.storage.Store instance.

required
compute bool

True (default) triggers the write immediately and returns None. False returns a :class:dask.delayed.Delayed.

True
mode str

Zarr open mode. "w" (default) writes fresh; "a" appends/updates.

'w'
chunks Any

Chunk specification forwarded to :meth:Dataset.read_array. "auto" (default) respects the on-disk block shape.

'auto'
storage_options dict[str, Any] | None

fsspec options for cloud stores.

None
compressor Any

Zarr codec(s) for the data array. "auto" (default) keeps zarr's default codec; pass a zarr-v3 codec / list to override, or None for an uncompressed array.

'auto'
overview_factors list[int] | None

Downsample factors (e.g. [2, 4, 8]) written as extra data_<factor> arrays plus a multiscales attribute. Built through Dataset.create_overviews, so they need compute=True and a dataset that can hold overviews.

None
overview_resampling str

GDAL resampling for those levels, "average" by default.

'average'

Returns:

Type Description
Any

None on compute=True; a :class:dask.delayed.Delayed

Any

on compute=False.

Raises:

Type Description
OverviewTargetError

overview_factors was given and ds cannot hold overviews — a plain VRT whose description is not a path. Taken pre-flight, so nothing is written, and ahead of the compute check, so the target the caller cannot fix is reported before the argument they can.

ValueError

overview_factors was given with compute=False.

Examples:

  • Round-trip a small Dataset through Zarr (requires zarr + dask, pyramids-lazy dependencies):
    >>> import tempfile  # doctest: +SKIP
    >>> from pathlib import Path  # doctest: +SKIP
    >>> import numpy as np  # doctest: +SKIP
    >>> from pyramids.dataset import Dataset, GeoReference  # doctest: +SKIP
    >>> from pyramids_lazy._zarr import write_dataset_to_zarr  # doctest: +SKIP
    >>> arr = np.arange(16, dtype=np.float32).reshape(4, 4)  # doctest: +SKIP
    >>> ds = Dataset.from_array(
    ...     arr,
    ...     geo_ref=GeoReference(
    ...         top_left_corner=(0.0, 4.0), cell_size=1.0, epsg=4326
    ...     ),
    ... )  # doctest: +SKIP
    >>> store = Path(tempfile.mkdtemp()) / "ds.zarr"  # doctest: +SKIP
    >>> write_dataset_to_zarr(ds, str(store)) is None  # doctest: +SKIP
    True
    
Source code in src/pyramids_lazy/_zarr.py
def write_dataset_to_zarr(
    ds: Dataset,
    store: str | Path | Any,
    *,
    compute: bool = True,
    mode: str = "w",
    chunks: Any = "auto",
    storage_options: dict[str, Any] | None = None,
    compressor: Any = "auto",
    overview_factors: list[int] | None = None,
    overview_resampling: str = "average",
) -> Any:
    """Serialise `ds` to a Zarr store.

    Writes the `(bands, rows, cols)` dask array to `<store>/data`
    and persists the pyramids geobox metadata as attributes on both
    the root group and the array. On `compute=False` the data write
    and the attribute write are bundled into a single
    :class:`dask.delayed.Delayed` so calling `.compute()` finalizes
    everything atomically.

    The `data` array is read with `ds.read_array(chunks=...)`, so it holds
    physical values: a CF-packed band is unpacked. The store has no channel for
    `scale_factor` / `add_offset`, so such a source is written materialised --
    `float64` values, and a no-data (`no_data_value`, `_FillValue` and the
    array's `fill_value`) in the same physical units; see :func:`_metadata_dict`.

    Args:
        ds: Source :class:`~pyramids.dataset.Dataset`.
        store: Target store — a path, a fsspec URL (`s3://...`), or
            any :class:`zarr.storage.Store` instance.
        compute: `True` (default) triggers the write immediately and
            returns `None`. `False` returns a
            :class:`dask.delayed.Delayed`.
        mode: Zarr open mode. `"w"` (default) writes fresh;
            `"a"` appends/updates.
        chunks: Chunk specification forwarded to
            :meth:`Dataset.read_array`. `"auto"` (default) respects
            the on-disk block shape.
        storage_options: fsspec options for cloud stores.
        compressor: Zarr codec(s) for the `data` array. `"auto"` (default) keeps
            zarr's default codec; pass a zarr-v3 codec / list to override, or
            `None` for an uncompressed array.
        overview_factors: Downsample factors (e.g. `[2, 4, 8]`) written as extra
            `data_<factor>` arrays plus a `multiscales` attribute. Built through
            `Dataset.create_overviews`, so they need `compute=True` and a dataset
            that can hold overviews.
        overview_resampling: GDAL resampling for those levels, `"average"` by
            default.

    Returns:
        `None` on `compute=True`; a :class:`dask.delayed.Delayed`
        on `compute=False`.

    Raises:
        OverviewTargetError: `overview_factors` was given and `ds` cannot hold
            overviews — a plain VRT whose description is not a path. Taken pre-flight,
            so nothing is written, and ahead of the `compute` check, so the target the
            caller cannot fix is reported before the argument they can.
        ValueError: `overview_factors` was given with `compute=False`.

    Examples:
        - Round-trip a small Dataset through Zarr (requires zarr + dask,
          pyramids-lazy dependencies):
            ```python
            >>> import tempfile  # doctest: +SKIP
            >>> from pathlib import Path  # doctest: +SKIP
            >>> import numpy as np  # doctest: +SKIP
            >>> from pyramids.dataset import Dataset, GeoReference  # doctest: +SKIP
            >>> from pyramids_lazy._zarr import write_dataset_to_zarr  # doctest: +SKIP
            >>> arr = np.arange(16, dtype=np.float32).reshape(4, 4)  # doctest: +SKIP
            >>> ds = Dataset.from_array(
            ...     arr,
            ...     geo_ref=GeoReference(
            ...         top_left_corner=(0.0, 4.0), cell_size=1.0, epsg=4326
            ...     ),
            ... )  # doctest: +SKIP
            >>> store = Path(tempfile.mkdtemp()) / "ds.zarr"  # doctest: +SKIP
            >>> write_dataset_to_zarr(ds, str(store)) is None  # doctest: +SKIP
            True

            ```
    """
    _require_zarr()
    if overview_factors and ds.io._has_nowhere_for_an_overview_sidecar():
        # Refuse before writing anything. The pyramid is built after the base array and
        # the metadata are committed, so letting this surface from `_write_overview_levels`
        # would leave a store that looks written but carries no `multiscales`.
        #
        # Ahead of the `compute` check for the same reason `recreate_overviews` puts its
        # target check ahead of the argument validation: passing `compute=True` still
        # leaves this dataset refused, so reporting the fixable argument first would send
        # the caller round a loop that cannot end in a written pyramid.
        raise OverviewTargetError(ds.io._no_sidecar_message())
    if overview_factors and not compute:
        raise ValueError("overview_factors requires compute=True")
    arr = _build_dask_array(ds, chunks)
    metadata = _metadata_dict(ds)
    resolved_store = _resolve_store(store, storage_options)

    codec_kwargs = normalize_compressors(compressor)
    # The sentinel goes in the array metadata's own `fill_value`, not only in
    # the attributes. Zarr defaults it to 0, and 0 is an ordinary value of every
    # numeric type -- GDAL's Zarr driver reads that field, so
    # `Dataset.read_file(store.zarr)` reported a no-data of 0.0 and masking such
    # a read blanked every genuinely-zero cell. `no_data_value` in the
    # attributes is pyramids' own spelling and only `from_zarr` reads it.
    fill_kwargs = (
        {"fill_value": metadata["_FillValue"]} if "_FillValue" in metadata else {}
    )
    write_result = arr.to_zarr(
        resolved_store,
        component="data",
        overwrite=(mode == "w"),
        compute=compute,
        **codec_kwargs,
        **fill_kwargs,
    )
    if compute:
        _finalize_metadata(resolved_store, metadata)
        if overview_factors:
            _write_overview_levels(
                ds,
                resolved_store,
                sorted(overview_factors),
                overview_resampling,
                metadata,
            )
        result: Any = None
    else:
        import_dask(_DASK_MISSING)
        import dask

        result = dask.delayed(_finalize_after_write)(
            write_result, resolved_store, metadata
        )
    return result

pyramids_lazy._zarr.read_dataset_from_zarr(store, *, chunks=None, storage_options=None, level=1, data_name=None) #

Open a pyramids-written Zarr store and materialise a :class:Dataset.

Parameters:

Name Type Description Default
store str | Path | Any

Input store — path / fsspec URL / :class:zarr.storage.Store.

required
level int

Pyramid downsample factor to read (FR-7). 1 (default) reads the full-resolution data array; pass a factor written via to_zarr(overview_factors=...) (e.g. 2, 4) to read that decimated overview level instead, with its cell size scaled by the factor.

1
data_name str | None

Explicit name of the data array in the group. None (default) auto-detects (prefers "data" then a grid_mapping attr then the highest-dim non-coord array); pass a name when reading a foreign GeoZarr store that has multiple candidate arrays and the auto-detect picks the wrong one.

None
chunks Any

When given (a 3-tuple (bands, rows, cols) or "auto"), the data array is read through :func:dask.array.from_zarr so a (possibly remote) store is fetched in parallel chunks rather than one synchronous read. None (default) reads eagerly. The returned Dataset is GDAL-backed either way; for lazy block processing call :meth:Dataset.read_array(chunks=...) on it.

None
storage_options dict[str, Any] | None

fsspec storage options.

None

Returns:

Name Type Description
Dataset Dataset

The reconstructed dataset.

Examples:

  • Read a store that was written with :func:write_dataset_to_zarr and check the recovered shape (requires zarr + dask, pyramids-lazy dependencies):
    >>> import tempfile  # doctest: +SKIP
    >>> from pathlib import Path  # doctest: +SKIP
    >>> import numpy as np  # doctest: +SKIP
    >>> from pyramids.dataset import Dataset, GeoReference  # doctest: +SKIP
    >>> from pyramids_lazy._zarr import (
    ...     read_dataset_from_zarr, write_dataset_to_zarr,
    ... )  # doctest: +SKIP
    >>> arr = np.arange(16, dtype=np.float32).reshape(4, 4)  # doctest: +SKIP
    >>> src = Dataset.from_array(
    ...     arr,
    ...     geo_ref=GeoReference(
    ...         top_left_corner=(0.0, 4.0), cell_size=1.0, epsg=4326
    ...     ),
    ... )  # doctest: +SKIP
    >>> store = Path(tempfile.mkdtemp()) / "ds.zarr"  # doctest: +SKIP
    >>> write_dataset_to_zarr(src, str(store))  # doctest: +SKIP
    >>> recovered = read_dataset_from_zarr(str(store))  # doctest: +SKIP
    >>> (recovered.rows, recovered.columns)  # doctest: +SKIP
    (4, 4)
    
Source code in src/pyramids_lazy/_zarr.py
def read_dataset_from_zarr(
    store: str | Path | Any,
    *,
    chunks: Any = None,
    storage_options: dict[str, Any] | None = None,
    level: int = 1,
    data_name: str | None = None,
) -> Dataset:
    """Open a pyramids-written Zarr store and materialise a :class:`Dataset`.

    Args:
        store: Input store — path / fsspec URL / :class:`zarr.storage.Store`.
        level: Pyramid downsample factor to read (FR-7). ``1`` (default) reads
            the full-resolution ``data`` array; pass a factor written via
            ``to_zarr(overview_factors=...)`` (e.g. ``2``, ``4``) to read that
            decimated overview level instead, with its cell size scaled by the
            factor.
        data_name: Explicit name of the data array in the group. ``None``
            (default) auto-detects (prefers ``"data"`` then a ``grid_mapping``
            attr then the highest-dim non-coord array); pass a name when reading
            a foreign GeoZarr store that has multiple candidate arrays and the
            auto-detect picks the wrong one.
        chunks: When given (a 3-tuple ``(bands, rows, cols)`` or ``"auto"``),
            the ``data`` array is read through :func:`dask.array.from_zarr` so a
            (possibly remote) store is fetched in **parallel chunks** rather than
            one synchronous read. ``None`` (default) reads eagerly. The returned
            Dataset is GDAL-backed either way; for lazy block processing call
            :meth:`Dataset.read_array(chunks=...)` on it.
        storage_options: fsspec storage options.

    Returns:
        Dataset: The reconstructed dataset.

    Examples:
        - Read a store that was written with :func:`write_dataset_to_zarr`
          and check the recovered shape (requires zarr + dask,
          pyramids-lazy dependencies):
            ```python
            >>> import tempfile  # doctest: +SKIP
            >>> from pathlib import Path  # doctest: +SKIP
            >>> import numpy as np  # doctest: +SKIP
            >>> from pyramids.dataset import Dataset, GeoReference  # doctest: +SKIP
            >>> from pyramids_lazy._zarr import (
            ...     read_dataset_from_zarr, write_dataset_to_zarr,
            ... )  # doctest: +SKIP
            >>> arr = np.arange(16, dtype=np.float32).reshape(4, 4)  # doctest: +SKIP
            >>> src = Dataset.from_array(
            ...     arr,
            ...     geo_ref=GeoReference(
            ...         top_left_corner=(0.0, 4.0), cell_size=1.0, epsg=4326
            ...     ),
            ... )  # doctest: +SKIP
            >>> store = Path(tempfile.mkdtemp()) / "ds.zarr"  # doctest: +SKIP
            >>> write_dataset_to_zarr(src, str(store))  # doctest: +SKIP
            >>> recovered = read_dataset_from_zarr(str(store))  # doctest: +SKIP
            >>> (recovered.rows, recovered.columns)  # doctest: +SKIP
            (4, 4)

            ```
    """
    # Local import to avoid a circular dependency at package import time.
    from pyramids.dataset import Dataset

    zarr = _require_zarr()
    resolved_store = _resolve_store(store, storage_options)
    root = zarr.open_group(resolved_store, mode="r")
    data_name = _resolve_data_array_name(root, level, data_name)
    zarr_array = root[data_name]
    arr = _read_data_array(resolved_store, zarr_array, chunks, component=data_name)
    attrs = dict(zarr_array.attrs)
    # CRS / transform come from the GeoZarr grid mapping (default `spatial_ref`);
    # read_geobox derives the transform from x/y when absent and falls back to
    # legacy flat attrs (with a warning). Cell size scales by the pyramid level.
    geobox = read_geobox(root, data_name="data" if "data" in root else data_name)
    geotransform = _scale_geotransform(geobox["geotransform"], level)
    # Dataset.from_array expects 2-D for single-band, 3-D for multi-band;
    # our on-disk layout is always 3-D so squeeze when band_count == 1.
    arr_for_create = arr[0] if (arr.ndim == 3 and arr.shape[0] == 1) else arr
    dataset = Dataset.from_array(
        arr_for_create,
        no_data_value=_normalize_no_data(attrs),
        # The full six-element affine, not a top-left/cell-size pair: that pair
        # cannot express rotation terms or a positive pixel height, so a rotated
        # or south-up store came back silently re-gridded as north-up square.
        geo_ref=GeoReference(
            geo=tuple(float(value) for value in geotransform),
            epsg=geobox_crs(geobox),
        ),
    )
    # Prefer the stored WKT (handles CRSes without an EPSG authority code);
    # the epsg above is only a fallback when no WKT was written (Z-3).
    if geobox["crs_wkt"]:
        dataset.crs = geobox["crs_wkt"]
    dataset.bands.apply_names(attrs.get("band_names"), source="Zarr store")
    return dataset

pyramids_lazy._zarr.classify_zarr_store(store, storage_options=None) #

Classify a .zarr store for :meth:~pyramids.dataset.Dataset.read_file routing.

Returns one of:

  • "single" -- a pyramids-written single-raster GeoZarr store (a 3-D data array beside a spatial_ref node); route it to :meth:~pyramids.dataset.Dataset.from_zarr.
  • "cube" -- a pyramids-written temporal cube (a 4-D data array beside a spatial_ref node); it is not a single raster.
  • "other" -- anything else: a foreign / xarray-written store, a plain file that merely ends in .zarr, a store that cannot be opened here (e.g. a remote store needing credentials this call was not given), or an install without the optional zarr package. The caller should let GDAL handle it.

This is the backend side of core's read_file Zarr routing: Dataset.read_file first applies its own cheap, backend-free suffix check and, only for a .zarr, asks the installed compute backend to classify it here. Only pyramids-written stores are claimed, so a foreign .zarr GDAL can already read is left to GDAL rather than mis-routed. The store is opened read-only for metadata only; any failure to open and confirm it -- including the optional zarr package being absent -- is reported as "other" so the caller falls back to GDAL rather than surfacing an opaque error. This never raises for a missing zarr: a zarr-less install reads a .zarr through GDAL exactly as before this routing existed.

Parameters:

Name Type Description Default
store Any

A .zarr store -- path / fsspec URL / :class:zarr.storage.Store.

required
storage_options dict[str, Any] | None

fsspec options forwarded to :func:_resolve_store for a cloud URL.

None

Returns:

Type Description
str

"single", "cube", or "other".

Examples:

A pyramids single-raster store classifies as "single" and a cube as "cube"; a foreign or unreadable store as "other" (all need a real store, so illustrative):

>>> classify_zarr_store("elevation.zarr")
'single'
>>> classify_zarr_store("timeseries_cube.zarr")
'cube'
>>> classify_zarr_store("xarray_export.zarr")
'other'
Source code in src/pyramids_lazy/_zarr.py
def classify_zarr_store(
    store: Any, storage_options: dict[str, Any] | None = None
) -> str:
    """Classify a ``.zarr`` store for :meth:`~pyramids.dataset.Dataset.read_file` routing.

    Returns one of:

    - ``"single"`` -- a pyramids-written single-raster GeoZarr store (a 3-D ``data`` array
      beside a ``spatial_ref`` node); route it to
      :meth:`~pyramids.dataset.Dataset.from_zarr`.
    - ``"cube"`` -- a pyramids-written temporal cube (a 4-D ``data`` array beside a
      ``spatial_ref`` node); it is not a single raster.
    - ``"other"`` -- anything else: a foreign / xarray-written store, a plain file that
      merely ends in ``.zarr``, a store that cannot be opened here (e.g. a remote store
      needing credentials this call was not given), or an install without the optional
      ``zarr`` package. The caller should let GDAL handle it.

    This is the backend side of core's ``read_file`` Zarr routing: ``Dataset.read_file`` first
    applies its own cheap, backend-free suffix check and, only for a ``.zarr``, asks the installed
    compute backend to classify it here. Only
    pyramids-written stores are claimed, so a foreign ``.zarr`` GDAL can already read is left to
    GDAL rather than mis-routed. The store is opened read-only for metadata only; any failure to
    open and confirm it -- including the optional ``zarr`` package being absent -- is reported as
    ``"other"`` so the caller falls back to GDAL rather than surfacing an opaque error. This never
    raises for a missing ``zarr``: a zarr-less install reads a ``.zarr`` through GDAL exactly as
    before this routing existed.

    Args:
        store: A ``.zarr`` store -- path / fsspec URL / :class:`zarr.storage.Store`.
        storage_options: fsspec options forwarded to :func:`_resolve_store` for a cloud URL.

    Returns:
        ``"single"``, ``"cube"``, or ``"other"``.

    Examples:
        A pyramids single-raster store classifies as ``"single"`` and a cube as ``"cube"``;
        a foreign or unreadable store as ``"other"`` (all need a real store, so illustrative):

        >>> classify_zarr_store("elevation.zarr")         # doctest: +SKIP
        'single'
        >>> classify_zarr_store("timeseries_cube.zarr")   # doctest: +SKIP
        'cube'
        >>> classify_zarr_store("xarray_export.zarr")      # doctest: +SKIP
        'other'
    """
    try:
        zarr = _require_zarr()
        root = zarr.open_group(_resolve_store(store, storage_options), mode="r")
        # Read the confirming metadata inside the guard too: `.get` / `in` / `.ndim` lazily load
        # child metadata, so a store whose root opens but whose `data` / `spatial_ref` nodes are
        # corrupt or unreadable must also fall back rather than surface an opaque error.
        data = root.get("data", None)
        has_spatial_ref = "spatial_ref" in root
        ndim = getattr(data, "ndim", None)
    except Exception as exc:  # noqa: BLE001
        # Report "other" for any reason the store cannot be opened and confirmed here -- the
        # optional `zarr` package being absent, a plain file, a missing group, credentials this
        # call was not given, or child metadata that raises on access -- so read_file falls back to
        # GDAL (a zarr-less install reads a `.zarr` through GDAL exactly as before this routing
        # existed) rather than surfacing an opaque error. A genuinely corrupted pyramids store also
        # lands here and is handed to GDAL, which raises its own read error; logged for triage.
        logger.debug("classify_zarr_store: %r -> 'other' (%s)", store, exc)
        return "other"
    # A pyramids GeoZarr store always writes the `data` array beside a `spatial_ref` node; a
    # foreign store (other variable names, no spatial_ref) is left for GDAL to read.
    if data is None or not has_spatial_ref:
        return "other"
    if ndim == 4:
        return "cube"
    if ndim == 3:
        return "single"
    return "other"

pyramids_lazy._zarr.is_cube_store(store, storage_options=None) #

Whether a pyramids Zarr store holds a temporal cube rather than a single raster.

Thin predicate over :func:classify_zarr_store: True only for a pyramids-written 4-D (time, band, y, x) cube (as :meth:pyramids.dataset.DatasetCollection.to_zarr writes). A single raster, a foreign store, or an unreadable path is False.

Parameters:

Name Type Description Default
store Any

A .zarr store -- path / fsspec URL / :class:zarr.storage.Store.

required
storage_options dict[str, Any] | None

fsspec options forwarded to :func:_resolve_store for a cloud URL.

None

Returns:

Type Description
bool

True for a pyramids cube store; False otherwise (including a zarr-less install,

bool

which cannot open the store and so cannot call it a cube).

Examples:

A single-raster store is not a cube, while a cube store is (both need a real on-disk store, so these are illustrative):

>>> is_cube_store("single_raster.zarr")
False
>>> is_cube_store("time_series_cube.zarr")
True
See Also

classify_zarr_store: the three-way classification used for routing.

Source code in src/pyramids_lazy/_zarr.py
def is_cube_store(store: Any, storage_options: dict[str, Any] | None = None) -> bool:
    """Whether a pyramids Zarr ``store`` holds a temporal cube rather than a single raster.

    Thin predicate over :func:`classify_zarr_store`: ``True`` only for a pyramids-written 4-D
    ``(time, band, y, x)`` cube (as :meth:`pyramids.dataset.DatasetCollection.to_zarr` writes).
    A single raster, a foreign store, or an unreadable path is ``False``.

    Args:
        store: A ``.zarr`` store -- path / fsspec URL / :class:`zarr.storage.Store`.
        storage_options: fsspec options forwarded to :func:`_resolve_store` for a cloud URL.

    Returns:
        ``True`` for a pyramids cube store; ``False`` otherwise (including a zarr-less install,
        which cannot open the store and so cannot call it a cube).

    Examples:
        A single-raster store is not a cube, while a cube store is (both need a real on-disk
        store, so these are illustrative):

        >>> is_cube_store("single_raster.zarr")      # doctest: +SKIP
        False
        >>> is_cube_store("time_series_cube.zarr")   # doctest: +SKIP
        True

    See Also:
        classify_zarr_store: the three-way classification used for routing.
    """
    return classify_zarr_store(store, storage_options) == "cube"