Python and xarray
Encode
import chronozarr
chronozarr.encode(da, "my_store", crs="EPSG:32631")da has dimensions (time, band, y, x), supported stored dtype, and projected
pixel-centre coordinates. The output must be new or empty. Encoding defaults to
auto; sharding defaults off. Use encoding="none" for direct ordinary Zarr reads.
Read stored values
store = chronozarr.open_store("my_store") # local path or HTTP URL
frame = store.read(t=0, lod=0) # band × y × x
cell = store.read_cell(t=0, row=0, col=0, lod=0)
mask = store.read_mask(t=0, lod=0) # None when absent
coverage = store.read_coverage(t=0, lod=0)
da = store.to_xarray(lod=0, times=[0], physical=False)Reads reconstruct temporal encoding. to_xarray() returns an in-memory DataArray;
physical=True applies band scale and offset and represents invalid pixels as NaN.
Lazy xarray backend
import xarray as xr
ds = xr.open_dataset("my_store", engine="chronozarr")
raw = xr.open_dataset("my_store", engine="chronozarr", physical=False)The backend returns physical values by default. Install chronozarr[dask] to use
chunks=. An ordinary xr.open_zarr reads stored arrays directly and does not
reconstruct residual timesteps.
View
chronozarr.view("my_store")Install chronozarr[notebook] for the notebook viewer. The local server supports
byte ranges, including sharded stores. Leafmap and geemap integrations have separate
extras; their examples provide the complete notebook setup.
See the Python source for the full signatures and optional arguments.