write
write(
self ,
spool ,
resource: UPath ,
encoding: dict | None[<class ’dict, None] = None,
**kwargs ,
)
Write a spool to a zarr store, replacing any store there.
One patch is written at the store root. Several are written one group each, named by get_patch_names with “/” replaced by “_” and repeats suffixed __1, __2, … as DASDAE does; one patch is held in memory at a time.
The store is built beside resource and moved into place once complete, so a failed write leaves the previous store intact.
Parameters
| Parameter | Description |
|---|---|
| encoding |
Passed to xarray’s Dataset.to_zarr, e.g.{"data": {"chunks": (100, 1000), "shards": (100, 10000)}};shards needs zarr format 3.
|