Using xarray, there are many great operations to easly reduce, aggregate, and summarize your data for the purposes of simplifying your analyses or for doing climotological work. These dimension-based statistical operations can be referred to as aggregations, and will be demonstrated briefly in this notebook.
For a full treatment on xarray aggregations, see the relevant sections in xarray's documentation (basic aggregations; split-apply-combine).
import numpy as np
import xarray as xr
...
...
...
...
...
...
There's a lot more to xarray than just these aggregation operations! Be sure to take a look at the other xarray training notebooks linked below: