-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Description
From pydata/xarray#6709
This example calculates ds.u.mean(), ds.v.mean(), and (ds.u * ds.v).mean() all at the same time
ms = MemorySampler()
ds = xr.Dataset(
dict(
anom_u=(["time", "face", "j", "i"], da.random.random((5000, 1, 987, 1920), chunks=(10, 1, -1, -1))),
anom_v=(["time", "face", "j", "i"], da.random.random((5000, 1, 987, 1920), chunks=(10, 1, -1, -1))),
)
)
quad = ds**2
quad["uv"] = ds.anom_u * ds.anom_v
mean = quad.mean("time")
with ms.sample():
mean.compute()With dask, we get not-so-great memory use. (Colors are for different values of "worker saturation")
Metadata
Metadata
Assignees
Labels
No labels
