VariableUncertainty.__setitem__#
- VariableUncertainty.__setitem__(unc_var: str, unc_def: DataArray | Variable | Tuple[List[str], ndarray, dict | None])[source]#
Adds defined uncertainty variable to dataset
- Parameters:
unc_var – uncertainty variable name
unc_def – either xarray DataArray/Variable, or definition through tuple as
(dims, data[, attrs])
.dims
is a list of variable dimension names,data
is a numpy array of uncertainty values andattrs
is a dictionary of variable attributes.attrs
should include an elementpdf_shape
which defines the uncertainty probability density function form, anderr_corr
which defines the error-correlation structure of the data. If omittedpdf_shape
is assumed Gaussian and the error-correlation is assumed random.
- Returns:
uncertainty variable interface