iris.fileformats.zarr#

Native Zarr support, built on zarr-python.

API reference

Tags: topic_load_save

Reads Zarr version 2 and version 3 stores, local or remote, and writes version 3 ones. Not NCZarr: that is netCDF-c’s own Zarr driver, reached through a URL fragment such as file:///path/store.zarr#mode=nczarr,file, and it stays where it is in iris.fileformats.netcdf.

zarr is an optional dependency. Nothing in iris.fileformats imports this package until a Zarr target is actually loaded, so Iris installs and imports without it.

iris.fileformats.zarr.__getattr__(name)[source]#

Forward the public names to the modules that define them.

PEP 562, not a plain from .loader import load_cubes: loader and saver both import ._dataset, which imports zarr at module level, so an eager import here would make the dependency load with the package rather than with a Zarr load or save - breaking the promise this module’s own docstring makes, that nothing imports zarr until a Zarr target is actually used. Resist “simplifying” this back to a plain import.

Parameters:

name (str) – The attribute being looked up. Python calls this only for names that are not already module attributes.

Returns:

The object of that name, from the module _FORWARDED names.

Return type:

Any

Raises:

Submodules#