ClimoDataArrayAccessor.integral

ClimoDataArrayAccessor.integral(dim=None, **kwargs)[source]

Return the mass-weighted integral.

Parameters
  • dim (dim-spec or {‘area’, ‘volume’}, optional) – The integration dimension(s). Weights are applied automatically using cell measure variables stored in the coodinates and referenced by the cell_measures attribute (see add_cell_measures). If not specified, the entire 3-dimensional domain is used.

  • weight (xr.DataArray, optional) – Optional additional weighting.

  • skipna (bool, optional) – Whether to skip NaN values.

  • **kwargs – Passed to truncate. Used to limit the bounds of the integration.

Notes

This was added as a dedicated accessor function rather than creating a custom Weighted object because the selection of mass weights depends on the dimension(s) passed by the user.