xarray.Dataset.climepi.plot_variance_decomposition#

Dataset.climepi.plot_variance_decomposition(data_var=None, fraction=False, internal_variability_method=None, deg=3, lam=None, **kwargs)[source]#

Plot decomposition of variance from different climate uncertainty sources.

Partitions the variance of a data variable at each time point into contributions from internal variability, model uncertainty and scenario uncertainty, and creates an area plot showing these contributions over time.

Wraps hvplot.hvPlot.area().

Parameters:
  • data_var (Hashable, optional) – Name of the data variable to plot. Should be provided unless there is a single non-bounds data variable.

  • fraction (bool, optional) – Whether to plot the variance contributions as fractions of the total variance at each time, rather than the raw variances. Default is False.

  • internal_variability_method (str, optional) – Whether to characterize internal variability by computing ensemble statistics directly at each time point (‘direct’) or by estimating them using a polynomial (‘polyfit’) or spline (‘splinefit’) fit to the time series, assuming the variance is constant in time. By default, the ‘direct’ method is used if multiple realizations are available (i.e., the dataset has a non-singleton ‘realization’ dimension), and the ‘polyfit’ method is used if only a single realization is available.

  • deg (int, optional) – Degree of the polynomial to fit to the time series if using the ‘polyfit’ method (ignored if using other methods). Default is 3.

  • lam (float, optional) – Smoothing parameter passed to scipy.interpolate.make_smoothing_spline() if using the ‘splinefit’ method (ignored if using other methods). Default is None.

  • **kwargs (dict, optional) – Additional keyword arguments to pass to hvplot.hvPlot.area().

Returns:

holoviews object – The resulting plot object.