windisch.array.modify_xarray_from_custom_parameters
- windisch.array.modify_xarray_from_custom_parameters(filepath: str | dict, array: DataArray) DataArray
Override default parameters values in xarray based on values provided by the user.
This function allows to override one or several default parameter values by providing either:
a file path to an Excel workbook that contains the new values
or a dictionary
The dictionary must be of the following format:
{ (parameter category, application, size, parameter name, uncertainty type): { (year, 'loc'): value, (year, 'scale'): value, (year, 'shape'): value, (year, 'minimum'): value, (year, 'maximum'): value } }
For example:
{ ('Operation', 'all', 'all', 'lifetime', 'none'): { (2018, 'loc'): 15, (2040, 'loc'): 25 } }
- Parameters:
array – the array to modify
filepath (str or dict) – File path of workbook with new values or dictionary.
- Returns:
the original array, but modified