**9. Summary and Conclusions**

Real-time salinity management is a stakeholder- and water agency-sanctioned program that helps to maximize allowable salt export from the agriculture-dominated SJR Basin. The essential components of the current program that are now in place include the establishment of telemetered sensor networks, a web-based information system for shar-

ing data, a basin-scale salt load assimilative capacity forecasting model and institutional entities tasked with performing weekly forecasts of river SLAC and using these forecasts to improve scheduling of west-side drainage salt load export and the dilution provided by east-side reservoir releases. Two modeling approaches were developed simultaneously, in part to see if a higher level of automation could be introduced in developing SLAC forecasts and if the frequency of these forecasts could be moved from weekly using the WARMF numerical simulation model to a simpler flow-based regression modeling approach run daily. The Regression model relies on a comprehensive statistical analysis of the relationship between flow and salt concentration at three compliance monitoring sites. The WARMF watershed water quality simulation model provided the conventional SLAC forecasting approach. The model is data driven and although model data acquisition is almost fully automated, there is still a need for user involvement for simulation times that may take an hour or more. The results from both models are migrated manually to Excel spreadsheets that are used to produce graphics that are posted to the web daily in the case of the Regression model and weekly for the WARMF model.

The first part of this paper has provided a comprehensive analysis of the model results when used to make 14 day EC forecasts (daily and 30 day running average EC) and an estimate of 14 day river SLAC. Analysis of the results from both model-based forecasting approaches over a period of five years shows that the regression-based forecasting model, run daily Monday to Friday each week, provided marginally better performance. However, the regression-based forecasting model assumes the same general relationship between flow and salinity which breaks down during extreme weather events such as droughts when water allocation cutbacks among stakeholders are not evenly distributed across the basin. A recent test case was used to demonstrate the potential utility of both models in dealing with an exceedance event at the Crows Landing compliance monitoring station. This year is providing an opportunity to test the robustness and reliability of the flow-EC relationship that the regression model relies upon since contract water delivery to USBR contractors is scaled back unequally during times of shortage in association with District water rights. The major lesson learned from the project to date is that a dual modeling approach of using a simple Regression model for daily automated forecasting with weekly simulation model runs using the WARMF model appears to be a good compromise at present that provides sufficient frequency of forecasts to allow stakeholders to make timely decisions (Regression model) while using stakeholder data to eliminate model inconsistencies during periods of unusual or extreme basin hydrology. The use of the WARMF model in this dual modeling approach provides modelers with a tool to more fully understand the current state of the system and to investigate unusual occurrences in basin hydrology and water quality that are only possible with a mechanistic model like the WARMF model.

In the future, it would be desirable that the Regression and WARMF models are both run daily which would eliminate some of the model comparison questions that were addressed in this study. Further automation of WARMF model data pre-processing steps could be combined with similarly automated real-time data quality assurance routines perhaps enhanced with machine learning procedures to eliminate data gaps, remove sensor drift and data spikes to improve model performance. The lack of a robust and customizable, public domain real-time data quality assurance software tool remains the biggest remaining impediment to water quality forecasting capabilities and if addressed could enhance stakeholder confidence in this instance of model-based environmental decision support.

**Author Contributions:** Conceptualization, N.W.T.Q.; methodology, N.W.T.Q., M.K.T. and J.L.; software, J.L.; statistical analysis, M.K.T.; data curation, M.K.T., J.L. and N.W.T.Q.; visualization, M.K.T. and N.W.T.Q.; writing—original draft preparation, N.W.T.Q.; writing—review and editing, N.W.T.Q. and M.K.T.; response to reviewer comments, N.W.T.Q. All authors have read and agreed to the published version of the manuscript.

**Funding:** This research received no external funding.

**Institutional Review Board Statement:** Not applicable.

**Informed Consent Statement:** Not applicable.

**Data Availability Statement:** No new data, models, or code were generated or used during the study—this study has com-piled publicly accessible data and existing model output to create a unique contribution to the literature. Daily model forecasts of flow and EC at the three compliance monitoring sites mentioned in the paper produced using the Regression model are available on the USBR's web portal at http://www.usbr.gov/ptms/ (accessed on 20 September 2021). Weekly WARMF model forecasts may be substituted for the Regression model forecasts when SJR flow data is unavailable or unreliable. These forecasts are posted on the same web portal.

**Acknowledgments:** The lead author wishes to recognize individual contributions made to the manuscript by the co-authors within the USBR. Much of the statistical analysis in the paper was drawn from an internal agency report provided by Michael Tansey. James Lu developed the EC forecasting algorithm for the Regression model and is responsible for daily web posting of Regression model-based forecasts of EC at the three SJR compliance monitoring sites. WARMF model forecasts are made weekly by Jun Wang and the lead author and are posted by Jun Wang on the same USBR web portal. Recent results from both models were used in the case study presented. The lead author also wishes to acknowledge the support of the San Joaquin Valley Drainage Authority and member water districts including Grasslands Water District, Patterson and West Stanislaus Irrigation Districts that have helped to advance the concept of real-time water quality management. Also, the California Regional Water Quality Control Board, the State regulator, for encouraging this new approach to salt management in the Basin that maximizes the beneficial use of the SJR. Much of the success of the Program is a result of generous State of California Department of Water Resources funding under Proposition 84 which has allowed upgrading and ongoing support of the various flow and EC sensor networks. The USBR has provided essential ongoing support since the inception of the Program.

**Conflicts of Interest:** The authors declare no conflict of interest.
