sim_salin.Rd
Simulate salinity for a timeseries of streamflow
sim_salin(Q_ts, v, salin_init = 100, salin_min = 100)
Q_ts | Timeseries of daily streamflow values |
---|---|
v | Vector of length 4 containing log parameter values: |
salin_init | Initial salinity for simulation |
salin_min | Minimum value of salinity |
streamflow_df <- ganges_streamflow[ganges_streamflow$date < "2000-01-01",] # Output salinity in ppm streamflow_df$S_ppm <- sim_salin(streamflow_df$Q_cumec, ganges_params$param) head(streamflow_df)#> # A tibble: 6 x 6 #> year date yday Q_cumec group S_ppm #> <dbl> <date> <dbl> <dbl> <chr> <dbl> #> 1 1 1998-01-01 1 2970. Treaty avg 100 #> 2 1 1998-01-02 2 2930. Treaty avg 100. #> 3 1 1998-01-03 3 2891. Treaty avg 101. #> 4 1 1998-01-04 4 2874. Treaty avg 101. #> 5 1 1998-01-05 5 2799. Treaty avg 102. #> 6 1 1998-01-06 6 2752. Treaty avg 102.