See image for demonstration.  `np.nanmean` is called by xarray's `.mean()` method when `skipna=True`, which is the default.