Using xarray, you can perform many of the same calculations as you would with a basic NumPy array, but with the added benefit of name-based rather than position-based dimensions/axes as well as label-based lookups. In this notebook, we'll be demonstrating several of these types of calculations (except for a specific subset of calculations, called aggregations, which combine data together using some summary statistic...these get their own training notebook).
For a full overview of xarray calculations, see the relevant page in xarray's documentation.
import numpy as np
import xarray as xr
...
...
...
...
...
...
There's a lot more to xarray than just calculations! Be sure to take a look at the other xarray training notebooks linked below: