# Approach for averaging an ensemble from nested Zarr archives?

**URL:** <https://discourse.pangeo.io/t/approach-for-averaging-an-ensemble-from-nested-zarr-archives/3533>\
**Category:** Data\
**Created:** [June 29, 2023, 1:57pm UTC](https://discourse.pangeo.io/t/approach-for-averaging-an-ensemble-from-nested-zarr-archives/3533 "2023-06-29T13:57:53Z")\
**Posts on this page:** 1\
**Showing post:** 3

<div class="post-metadata">

**Author:** ![dcherian](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.pangeo.io/dcherian/32/2235_2.png) [@dcherian](https://discourse.pangeo.io/u/dcherian)\
**Post date:** [July 3, 2023, 3:23pm UTC](https://discourse.pangeo.io/t/approach-for-averaging-an-ensemble-from-nested-zarr-archives/3533/3 "2023-07-03T15:23:48Z")

</div>

First we would need to see what the chunking of `ds` and `ds_mean` are before rechunking

```auto
ds_mean = ds_mean.chunk(dict(time=31411, lat=5, lon=5, scenario=-1))

```

Then, I would try [“p2p rechunking”](https://discourse.pangeo.io/t/rechunking-large-data-at-constant-memory-in-dask-experimental/3266) and report here: [Share your experiences with P2P shuffling · dask/distributed · Discussion #7509 · GitHub](https://github.com/dask/distributed/discussions/7509) or in that Discourse thread.

---

_[View the full topic](https://discourse.pangeo.io/t/approach-for-averaging-an-ensemble-from-nested-zarr-archives/3533)._
