Simulate salinity, re-initializing each year

sim_salin_annual(Q_df, v)

Arguments

Q_df

A data.frame containing Q_cumec and year columns. The rows must be in order of consecutive days.

v

Vector of length 4 containing log parameter values: log(a), log(b), log(d), and log(C_d)

Value

A vector of salinity corresponding to input Q_cumec, with each year simulated separately

Examples

library(ggplot2) # Create new data.frame with streamflow input variables streamflow_df <- ganges_streamflow # Simulate salinity each year streamflow_df$S_ppm <- sim_salin_annual(ganges_streamflow, ganges_params$param) # Plot the output ggplot(streamflow_df) + geom_line(aes(yday,S_ppm, color = group))