hydromt.Model.set_results#
- Model.set_results(data, name=None, split_dataset=False)[source]#
Add data to results attribute which is a dictionary of xarray.DataArray and/or xarray.Dataset.
The dictionary key is taken from the variable name. In case of a DataArray without name, the name can be passed using the optional name argument. In case of a Dataset, the dictionnary key is passed using the name argument.
Dataset can either be added as is to the dictionnary (default) or split into several DataArrays using the split_dataset argument.
- Parameters:
data (xarray.Dataset or xarray.DataArray) – New forcing data to add
name (str, optional) – Variable name, only in case data is of type DataArray or if a Dataset is added as is (split_dataset=False).
split_dataset (bool, optional) – If data is a xarray.Dataset, either add it as is to results or split it into several xarray.DataArrays.