Adds observation timeseries to a HS object. This is needed in order to evaluate performance of discharge estimates, or to perform data assimilation combining several estimates.

add_observations(HS, timeseries, unit, riverIDs, station_names = NULL)

Arguments

HS

An HS object.

timeseries

a data.frame with observations. Must contain column Date.

unit

The unit of values in timeseries.

riverIDs

A vector of riverID of the river segments in the column-order in timeseries.

station_names

a vector of names for the stations in timeseries. If not provided, station names are obtained from column names of timeseries.

Value

Returns the HS object with added list column observation_ts containing a timeseries, and column observation_station containing the name of observation stations.