WRTDS-K (Kalman)¶
WRTDS-K extends the standard WRTDS model by using AR(1) residual interpolation to produce improved daily concentration and flux estimates. It is described in:
Zhang, Q. and Hirsch, R.M. (2019), River Water-Quality Concentration and Flux Estimation Can Be Improved by Accounting for Serial Correlation Through an Autoregressive Model. Water Resources Research, 55, 9705-9723.
Running WRTDS-K¶
WRTDS-K requires a fitted model:
This adds two columns to w.daily:
| Column | Description |
|---|---|
GenConc |
Generalized concentration (mg/L) |
GenFlux |
Generalized flux (kg/day) |
How It Works¶
- For each Monte Carlo iteration:
- Augment censored samples — draw random concentrations from a truncated log-normal for left-censored observations
- Compute standardised residuals at sample dates:
e = (ln(C_obs) - yHat) / SE - Interpolate residuals for gap days between samples using conditional AR(1) draws (conditioned on the residuals at both bounding sample dates)
- Convert back to concentration:
GenConc = exp(yHat + SE * e_interp)
- Average across all iterations to get the final
GenConcandGenFlux
Choosing rho¶
The rho parameter is the AR(1) autocorrelation coefficient and controls how strongly
residuals persist from day to day:
rho |
Behavior | When to use |
|---|---|---|
| 0.85 | Reactive | Short-memory systems, flashy catchments |
| 0.90 | Default | Most applications |
| 0.95 | Conservative | Long-memory systems, large rivers |
Higher rho values produce smoother interpolation between sample dates. The default
of 0.90 is appropriate for most applications.
Iterations (n_iter)¶
The n_iter parameter controls Monte Carlo averaging. More iterations produce more
stable results but take longer. The default of 200 is sufficient for most applications.
Setting seed ensures reproducibility.
Interpreting Results¶
GenConcandGenFluxare generally more accurate thanConcDayandFluxDayfor computing annual totals, because they account for serial correlation in residuals- Near sample dates,
GenConcis pulled toward the observed value - Far from sample dates,
GenConcreverts toward the WRTDS surface prediction - Annual means of
GenConcandGenFluxappear intable_results()and in the annual history plots when available