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
storeMutableMapping 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.

synchronizerobject, optional

Array synchronizer provided to zarr

groupstr, obtional

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

auto_chunkbool, 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_cfbool, optional

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

mask_and_scalebool, 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_timesbool, optional

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

concat_charactersbool, 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_coordsbool, optional

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

drop_variablesstring 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.

consolidatedbool, optional

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

Returns
datasetDataset

The newly created dataset.

See also

open_dataset

References

http://zarr.readthedocs.io/