MCPcopy
hub / github.com/pydata/xarray / to_zarr

Function to_zarr

xarray/backends/writers.py:687–706  ·  view source on GitHub ↗
(
    dataset: Dataset,
    store: ZarrStoreLike | None = None,
    chunk_store: MutableMapping | str | os.PathLike | None = None,
    mode: ZarrWriteModes | None = None,
    synchronizer=None,
    group: str | None = None,
    encoding: Mapping | None = None,
    *,
    compute: Literal[True] = True,
    consolidated: bool | None = None,
    append_dim: Hashable | None = None,
    region: Mapping[str, slice | Literal["auto"]] | Literal["auto"] | None = None,
    safe_chunks: bool = True,
    align_chunks: bool = False,
    storage_options: dict[str, str] | None = None,
    zarr_version: int | None = None,
    write_empty_chunks: bool | None = None,
    chunkmanager_store_kwargs: dict[str, Any] | None = None,
)

Source from the content-addressed store, hash-verified

685# compute=True returns ZarrStore
686@overload
687def to_zarr(
688 dataset: Dataset,
689 store: ZarrStoreLike | None = None,
690 chunk_store: MutableMapping | str | os.PathLike | None = None,
691 mode: ZarrWriteModes | None = None,
692 synchronizer=None,
693 group: str | None = None,
694 encoding: Mapping | None = None,
695 *,
696 compute: Literal[True] = True,
697 consolidated: bool | None = None,
698 append_dim: Hashable | None = None,
699 region: Mapping[str, slice | Literal["auto"]] | Literal["auto"] | None = None,
700 safe_chunks: bool = True,
701 align_chunks: bool = False,
702 storage_options: dict[str, str] | None = None,
703 zarr_version: int | None = None,
704 write_empty_chunks: bool | None = None,
705 chunkmanager_store_kwargs: dict[str, Any] | None = None,
706) -> backends.ZarrStore: ...
707
708
709# compute=False returns dask.Delayed

Callers 2

to_zarrMethod · 0.90
to_zarrMethod · 0.90

Calls 11

syncMethod · 0.95
ArrayWriterClass · 0.90
_validate_dataset_namesFunction · 0.85
get_writable_zarr_storeFunction · 0.85
dump_to_storeFunction · 0.85
_validate_encodingMethod · 0.80
valuesMethod · 0.45
loadMethod · 0.45
closeMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…