easysnowdata.processing.contract.chunks_policy#

easysnowdata.processing.contract.chunks_policy(lazy_default: Any) → Callable[[Callable[[...], Any]], Callable[[...], Any]][source]#

Give a loader’s chunks= the one meaning every loader shares.

  • left at DEFAULT: lazy and Dask-backed, with the source’s native chunking. The loader receives lazy_default, the value its own lazy path already expects (None for odc-stac, True for rioxarray, DEFAULT for loaders that decide per source).

  • None: no Dask. The same lazy result is built, then read into memory before it is returned, so chunks=None means the same thing it means in rioxarray, xarray, and odc-stac, whichever library is underneath.

  • anything else ({}, True, "auto", a dict of sizes): passed through unchanged.

Before this, chunks=None was the lazy default of the STAC, Zarr, and NetCDF loaders and an eager read on the raster-file ones.