hydromt.Model.set_forcing#
- Model.set_forcing(data: DataArray | Dataset | DataFrame, name: str | None = None, split_dataset: bool | None = True)#
Add data to forcing attribute.
Data can be xarray.DataArray, xarray.Dataset or pandas.DataFrame. If pandas.DataFrame, indices should be the DataFrame index and the columns the variable names. the DataFrame will then be converted to xr.Dataset using
pandas.DataFrame.to_xarray()
method.- Parameters:
data (
xarray.Dataset
orxarray.DataArray
orpd.DataFrame
) – New forcing data to addname (
str
, optional) – Results name, required if data is xarray.Dataset is and split_dataset=False.split_dataset (
bool
, optional) – If True (default), split a Dataset to store each variable as a DataArray.