xarray.Dataset.climepi.uncertainty_interval_decomposition#
- Dataset.climepi.uncertainty_interval_decomposition(data_var=None, uncertainty_level=90, internal_variability_method=None, deg=3, lam=None)[source]#
Decompose uncertainty interval contributions.
Partitions the uncertainty interval of a data variable at each time point into contributions from internal variability, model uncertainty and scenario uncertainty.
- Parameters:
data_var (
HashableorlistofHashable, optional) – Name(s) of the data variable to decompose.uncertainty_level (
float, optional) – Uncertainty level for the uncertainty intervals (percentage). Default is 90.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 toscipy.interpolate.make_smoothing_spline()if using the ‘splinefit’ method (ignored if using other methods). Default isNone.
- Returns:
xarray.Dataset– A new dataset containing the uncertainty interval decomposition of the selected data variable(s) along a new ‘level’ dimension.