xarray.open_zarr

xarray.open_zarr(store, group=None, synchronizer=None, auto_chunk=True, decode_cf=True, mask_and_scale=True, decode_times=True, concat_characters=True, decode_coords=True, drop_variables=None, consolidated=False)

Load and decode a dataset from a Zarr store.

Note

Experimental The Zarr backend is new and experimental. Please report any unexpected behavior via github issues.

The store object should be a valid store for a Zarr group. store variables must contain dimension metadata encoded in the _ARRAY_DIMENSIONS attribute.

Parameters:
store : MutableMapping or str

A MutableMapping where a Zarr Group has been stored or a path to a directory in file system where a Zarr DirectoryStore has been stored.

synchronizer : object, optional

Array synchronizer provided to zarr

group : str, obtional

Group path. (a.k.a. path in zarr terminology.)

auto_chunk : bool, optional

Whether to automatically create dask chunks corresponding to each variable’s zarr chunks. If False, zarr array data will lazily convert to numpy arrays upon access.

decode_cf : bool, optional

Whether to decode these variables, assuming they were saved according to CF conventions.

mask_and_scale : bool, optional

If True, replace array values equal to _FillValue with NA and scale values according to the formula original_values * scale_factor + add_offset, where _FillValue, scale_factor and add_offset are taken from variable attributes (if they exist). If the _FillValue or missing_value attribute contains multiple values a warning will be issued and all array values matching one of the multiple values will be replaced by NA.

decode_times : bool, optional

If True, decode times encoded in the standard NetCDF datetime format into datetime objects. Otherwise, leave them encoded as numbers.

concat_characters : bool, optional

If True, concatenate along the last dimension of character arrays to form string arrays. Dimensions will only be concatenated over (and removed) if they have no corresponding variable and if they are only used as the last dimension of character arrays.

decode_coords : bool, optional

If True, decode the ‘coordinates’ attribute to identify coordinates in the resulting dataset.

drop_variables : string or iterable, optional

A variable or list of variables to exclude from being parsed from the dataset. This may be useful to drop variables with problems or inconsistent values.

consolidated : bool, optional

Whether to open the store using zarr’s consolidated metadata capability. Only works for stores that have already been consolidated.

Returns:
dataset : Dataset

The newly created dataset.

See also

open_dataset

References

http://zarr.readthedocs.io/