Код: Выделить всё
def obtain_chunk(da):
c = download_chunk()
c = process_stuff(c)
return c
# lazy dask array wrapped into xarray with many chunks
da = xr.DataArray(dask.array...)
# obtain each chunk with dask distributed
da.map_blocks(obtain_chunk)
# save as zarr file
da.to_zarr()
fwiw: сейчас пишу это: https://github.com/cmosig/sentle, где я сталкиваюсь этот вопрос.
Подробнее здесь: https://stackoverflow.com/questions/785 ... processing