# Can Simple Machine Learning Tools Extend and Improve Temperature-Based Methods to Infer Streambed Flux?

^{1}

^{2}

^{3}

^{*}

## Abstract

**:**

## 1. Introduction

## 2. Materials and Methods

#### 2.1. Generation of Noise-Free Observations with a Numerical Flow and Heat Transport Model

^{−11}m

^{2}. The simulation period was 1 January 2016–30 June 2017 (1.5 years) with temperature, pressure, and streambed flux generated every 5 min.

_{w}is water dynamic viscosity in micropoise (μP), T is temperature in degrees Kelvin (K), p is pressure in bars, and p

_{sat}is saturation pressure in bars corresponding to temperature T [26].

#### 2.2. Model-Generated Time Series Used for Machine Learning Analyses

#### 2.3. Training and Testing the ML Tools

#### 2.4. Implementation of Regression Tree Analyses

_{i}is the number of observations in each subset after splitting, MSE

_{i}is the corresponding mean squared error of each post-split subset, n

_{p}is the number of observations in the parent set (before splitting), and MSEp is the mean squared error of the parent set. These nodal importance values can be summed for each observation (e.g., for all instances of T(1)) and then normalized by the sum over all observations to define the relative contribution of each observation:

#### 2.5. Implementation of Gradient Boosting Tree

#### 2.6. Training and Testing the ML Algorithms

## 3. Results and Discussion

#### 3.1. Analyses of Temperature and Pressure Data at Multiple Depths

#### 3.2. Analyses of Temperature Data Only

#### 3.3. Analyses of Pressure and Temperature Observations Collected at a Single Depth

## 4. Conclusions

## Author Contributions

## Funding

## Institutional Review Board Statement

## Informed Consent Statement

## Data Availability Statement

## Acknowledgments

## Conflicts of Interest

## Appendix A

ML Model | n_Estimators | Max_Depth | Learning_Rate | Min_Samples to Split | Min_Var Reduction to Split | Dataset | Noisy | RMSE |
---|---|---|---|---|---|---|---|---|

RT | - | 7 | - | 30 | 0.001 | P and T | TRUE | 7.43 × 10^{−7} |

RT | - | 7 | - | 30 | 0.001 | P and T | FALSE | 8.51 × 10^{−7} |

RT | - | 20 | - | 30 | 0.001 | only T | FALSE | 3.41 × 10^{−6} |

RT | - | 12 | - | 30 | 0.001 | only T | TRUE | 8.41 × 10^{−6} |

RT | - | 7 | - | 30 | 0.001 | one P | TRUE | 1.15 × 10^{−6} |

RT | - | 7 | - | 30 | 0.001 | one P | FALSE | 1.13 × 10^{−6} |

RT | - | 12 | - | 30 | 0.001 | one P one T | FALSE | 7.24 × 10^{−7} |

RT | - | 7 | - | 30 | 0.001 | one P one T | TRUE | 7.17 × 10^{−7} |

GB | 1000 | 5 | 0.05 | 40 | - | P and T | FALSE | 3.13 × 10^{−7} |

GB | 1000 | 5 | 0.1 | 20 | - | P and T | TRUE | 3.85 × 10^{−7} |

GB | 1000 | 5 | 0.05 | 40 | - | one P one T | FALSE | 2.60 × 10^{−6} |

GB | 1000 | 5 | 0.05 | 100 | - | one P one T | TRUE | 8.12 × 10^{−6} |

GB | 1000 | 10 | 0.1 | 20 | - | only T | FALSE | 9.79 × 10^{−7} |

GB | 200 | 10 | 0.008 | 40 | - | only T | TRUE | 1.01 × 10^{−6} |

GB | 1000 | 3 | 0.008 | 500 | - | one P | FALSE | 4.56 × 10^{−7} |

GB | 1000 | 3 | 0.008 | 500 | - | one P | FALSE | 4.02 × 10^{−7} |

## References

- Genereux, D.P.; Leahy, S.; Mitasova, H.; Kennedy, C.D.; Corbett, D.R. Spatial and Temporal Variability of Streambed Hydraulic Conductivity in West Bear Creek, North Carolina, USA. J. Hydrol.
**2008**, 358, 332–353. [Google Scholar] [CrossRef] - Keery, J.; Binley, A.; Crook, N.; Smith, J.W.N. Temporal and Spatial Variability of Groundwater-Surface Water Fluxes: Development and Application of an Analytical Method Using Temperature Time Series. J. Hydrol.
**2007**, 336, 1–16. [Google Scholar] [CrossRef] - Xu, W.; Su, X.; Dai, Z.; Yang, F.; Zhu, P.; Huang, Y. Multi-Tracer Investigation of River and Groundwater Interactions: A Case Study in Nalenggele River Basin, Northwest China. Hydrogeol. J.
**2017**, 25, 2015–2029. [Google Scholar] [CrossRef] - Anibas, C.; Fleckenstein, J.H.; Volze, N.; Buis, K.; Verhoeven, R.; Meire, P.; Batelaan, O. Transient or Steady-State? Using Vertical Temperature Profiles to Quantify Groundwater-Surface Water Exchange. Hydrol. Process.
**2009**, 23, 2165–2177. [Google Scholar] [CrossRef] - Voytek, E.B.; Drenkelfuss, A.; Day-Lewis, F.D.; Healy, R.; Lane, J.W.; Werkema, D. 1DTempPro: Analyzing Temperature Profiles for Groundwater/Surface-Water Exchange. Groundwater
**2014**, 52, 298–302. [Google Scholar] [CrossRef][Green Version] - Koch, F.W.; Voytek, E.B.; Day-Lewis, F.D.; Healy, R.; Briggs, M.A.; Lane, J.W.; Werkema, D. 1DTempPro V2: New Features for Inferring Groundwater/Surface-Water Exchange. Groundwater
**2016**, 54, 434–439. [Google Scholar] [CrossRef] [PubMed] - Lee, D.R.; Cherry, J.A. A Field Exercise on Groundwater Flow Using Seepage Meters and Mini-Piezometers. J. Geol. Educ.
**1979**, 27, 6–10. [Google Scholar] [CrossRef] - Rosenberry, D.O.; Morin, R.H. Use of an Electromagnetic Seepage Meter to Investigate Temporal Variability in Lake Seepage. Ground Water
**2004**, 42, 68–77. [Google Scholar] [CrossRef] - Bencala, K.E.; McKnight, D.M.; Zellweger, G.W. Characterization of Transport in an Acidic and Metal-Rich Mountain Stream Based on a Lithium Tracer Injection and Simulations of Transient Storage. Water Resour. Res.
**1990**, 26, 989–1000. [Google Scholar] [CrossRef] - Constantz, J.; Cox, M.H.; Su, G.W. Comparison of Heat and Bromide as Ground Water Tracers Near Streams. Groundwater
**2003**, 41, 647–656. [Google Scholar] [CrossRef] [PubMed] - Hatch, C.E.; Fisher, A.T.; Revenaugh, J.S.; Constantz, J.; Ruehl, C. Quantifying Surface Water-Groundwater Interactions Using Time Series Analysis of Streambed Thermal Records: Method Development. Water Resour. Res.
**2006**, 42. [Google Scholar] [CrossRef][Green Version] - Stallman, R.W. Steady One-Dimensional Fluid Flow in a Semi-Infinite Porous Medium with Sinusoidal Surface Temperature. J. Geophys. Res.
**1965**, 70, 2821–2827. [Google Scholar] [CrossRef] - Suzuki, S. Percolation Measurements Based on Heat Flow through Soil with Special Reference to Paddy Fields. J. Geophys. Res.
**1960**, 65, 2883–2885. [Google Scholar] [CrossRef] - Constantz, J.; Stewart, A.E.; Niswonger, R.; Sarma, L. Analysis of Temperature Profiles for Investigating Stream Losses beneath Ephemeral Channels. Water Resour. Res.
**2002**, 38, 52-1–52-13. [Google Scholar] [CrossRef] - Anderson, M.P. Heat as a Ground Water Tracer. In Ground Water; John Wiley & Sons, Ltd: Hoboken, NJ, USA, 2005; pp. 951–968. [Google Scholar] [CrossRef]
- Constantz, J. Heat as a Tracer to Determine Streambed Water Exchanges. Water Resour. Res.
**2008**, 46. [Google Scholar] [CrossRef] - Shanafield, M.; Hatch, C.; Pohll, G. Uncertainty in Thermal Time Series Analysis Estimates of Streambed Water Flux. Water Resour. Res.
**2011**, 47. [Google Scholar] [CrossRef] - Rau, G.C.; Cuthbert, M.O.; McCallum, A.M.; Halloran, L.J.S.; Andersen, M.S. Assessing the Accuracy of 1-D Analytical Heat Tracing for Estimating near-Surface Sediment Thermal Diffusivity and Water Flux under Transient Conditions. J. Geophys. Res. Earth Surf.
**2015**, 120, 1551–1573. [Google Scholar] [CrossRef][Green Version] - Rau, G.C.; Andersen, M.S.; McCallum, A.M.; Roshan, H.; Acworth, R.I. Heat as a Tracer to Quantify Water Flow in Near-Surface Sediments. Earth-Sci. Rev.
**2014**, 129, 40–58. [Google Scholar] [CrossRef][Green Version] - Lu, D.; Ricciuto, D. Efficient Surrogate Modeling Methods for Large-Scale Earth System Models Based on Machine-Learning Techniques. Geosci. Model Dev.
**2019**, 12, 1791–1807. [Google Scholar] [CrossRef][Green Version] - Rohmat, F.I.W.; Labadie, J.W.; Gates, T.K. Deep Learning for Compute-Efficient Modeling of BMP Impacts on Stream- Aquifer Exchange and Water Law Compliance in an Irrigated River Basin. Environ. Model. Softw.
**2019**, 122, 104529. [Google Scholar] [CrossRef] - Anirudh, R.; Thiagarajan, J.J.; Bremer, P.-T.; Spears, B.K. Improved Surrogates in Inertial Confinement Fusion with Manifold and Cycle Consistencies. Proc. Natl. Acad. Sci. USA
**2019**, 117, 9741–9746. [Google Scholar] [CrossRef] [PubMed][Green Version] - Moghaddam, M.A.; Ferre, P.A.T.; Ehsani, M.R.; Klakovich, J.; Gupta, H.V. Can Deep Learning Extract Useful Information about Energy Dissipation and Effective Hydraulic Conductivity from Gridded Conductivity Fields? Water
**2021**, 13, 1668. [Google Scholar] [CrossRef] - Bisht, G.; Huang, M.; Zhou, T.; Chen, X.; Dai, H.; Hammond, G.E.; Riley, W.J.; Downs, J.L.; Liu, Y.; Zachara, J.M. Coupling a Three-Dimensional Subsurface Flow and Transport Model with a Land Surface Model to Simulate Stream-Aquifer-Land Interactions (CP v1.0). Geosci. Model Dev.
**2017**, 10, 4539–4562. [Google Scholar] [CrossRef][Green Version] - Hammond, G.E.; Lichtner, P.C.; Mills, R.T. Evaluating the Performance of Parallel Subsurface Simulators: An Illustrative Example with PFLOTRAN. Wiley Online Libr.
**2014**, 50, 208–228. [Google Scholar] [CrossRef] [PubMed][Green Version] - Meyer, C. Thermodynamics and Transport Properties of Steam: Comprising Tables and Charts for Steam and Water; American Society of Mechanical Engineers: New York, NY, USA, 1968. [Google Scholar]
- Arlot, S.; Celisse, A. A Survey of Cross-Validation Procedures for Model Selection. Stat. Surv.
**2010**, 4, 40–79. [Google Scholar] [CrossRef] - Friedman, J.H. The Elements of Statistical Learning: Data Mining, Inference and Prediction; Springer: Berlin/Heidelberg, Germany, 2005. [Google Scholar]
- Prasad, A.M.; Iverson, L.R.; Liaw, A. Newer Classification and Regression Tree Techniques: Bagging and Random Forests for Ecological Prediction. Ecosystems
**2006**, 9, 181–199. [Google Scholar] [CrossRef] - Schapire, R.E. The Strength of Weak Learnability; Springer: Berlin/Heidelberg, Germany, 1990; Volume 5. [Google Scholar]
- Touzani, S.; Granderson, J.; Fernandes, S. Gradient Boosting Machine for Modeling the Energy Consumption of Commercial Buildings. Energy Build.
**2018**, 158, 1533–1543. [Google Scholar] [CrossRef][Green Version] - Wei, Z.; Meng, Y.; Zhang, W.; Peng, J.; Meng, L. Downscaling SMAP Soil Moisture Estimation with Gradient Boosting Decision Tree Regression over the Tibetan Plateau. Remote Sens. Environ.
**2019**, 225, 30–44. [Google Scholar] [CrossRef] - Ransom, K.M.; Nolan, B.T.; Traum, J.A.; Faunt, C.C.; Bell, A.M.; Gronberg, J.A.M.; Wheeler, D.C.; Rosecrans, C.Z.; Jurgens, B.; Schwarz, G.E.; et al. A Hybrid Machine Learning Model to Predict and Visualize Nitrate Concentration throughout the Central Valley Aquifer, California, USA. Sci. Total Environ.
**2017**, 601–602, 1160–1172. [Google Scholar] [CrossRef] - Huang, G.; Wu, L.; Ma, X.; Zhang, W.; Fan, J.; Yu, X.; Zeng, W.; Zhou, H. Evaluation of CatBoost Method for Prediction of Reference Evapotranspiration in Humid Regions. J. Hydrol.
**2019**, 574, 1029–1041. [Google Scholar] [CrossRef] - Ehsani, M.R.; Behrangi, A.; Adhikari, A.; Song, Y.; Huffman, G.J.; Adler, R.F.; Bolvin, D.T.; Nelkin, E.J. Assessment of the Advanced Very High-Resolution Radiometer (AVHRR) for Snowfall Retrieval in High Latitudes Using CloudSat and Machine Learning. J. Hydrometeorol.
**2021**, 22, 1591–1608. [Google Scholar] [CrossRef] - Zhu, X.; Vondrick, C.; Fowlkes, C.C.; Ramanan, D. Do We Need More Training Data? Int. J. Comput. Vis.
**2016**, 119, 76–92. [Google Scholar] [CrossRef][Green Version]

**Figure 2.**Time series of (

**a**) surface/ground water exchange flux across the streambed, (

**b**) pressure at three depths, and (

**c**) temperature at three depths.

**Figure 3.**Illustrative example of a two-level regression tree to segregate streambed exchange flux based on subsurface temperature observations at ten depths T(0), T(1) … T(10).

**Figure 4.**Time series of training (blue) and testing (red) sets illustrated using data from 0.005 m depth. (

**a**) upward flux, (

**b**) pressure, and (

**c**) temperature.

**Figure 5.**Testing results using temperature and pressure sensors, which are located at, 0.015, 0.105, and 0.195 m. (

**a**) Noise-free data using RT. (

**b**) Noise-free data using GB. (

**c**) SNR = 100 noisy data using RT. (

**d**) SNR = 100 noisy data using GB.

**Figure 6.**Figures (

**a**) through (

**c**) show results for RT; (

**d**) through (

**f**) relate to GB. (

**a**,

**d**) Feature importance for pressure and temperature observations (P and T) and spatial (dz) and temporal (dt) gradients for sensors at 0.015, 0.105, and 0.195 m depths with (orange) and without (blue) measurement error. The time delay after the flux estimation is shown in parentheses, and features with less than 0.001 importance value are not shown in the x axis. (

**b**,

**e**) Summary of feature importance by type–observed value, temporal gradient (dt), and spatial gradient (dz). (

**c**,

**f**) Summary of feature importance by depth.

**Figure 7.**Testing results using temperature sensors only, which are located at 0.015, 0.105, and 0.195 m. (

**a**) Noise-free data using RT. (

**b**) Noise-free data using GB. (

**c**) SNR = 100 noisy data using RT. (

**d**) SNR = 100 noisy data using GB.

**Figure 8.**Performance of one pressure sensor and a combined pressure and temperature observation set with respect to the depth of installation considering the influence of measurement error and whether GB was used for the analysis.

Publisher’s Note: MDPI stays neutral with regard to jurisdictional claims in published maps and institutional affiliations. |

© 2021 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (https://creativecommons.org/licenses/by/4.0/).

## Share and Cite

**MDPI and ACS Style**

Moghaddam, M.A.; Ferré, T.P.A.; Chen, X.; Chen, K.; Song, X.; Hammond, G.
Can Simple Machine Learning Tools Extend and Improve Temperature-Based Methods to Infer Streambed Flux? *Water* **2021**, *13*, 2837.
https://doi.org/10.3390/w13202837

**AMA Style**

Moghaddam MA, Ferré TPA, Chen X, Chen K, Song X, Hammond G.
Can Simple Machine Learning Tools Extend and Improve Temperature-Based Methods to Infer Streambed Flux? *Water*. 2021; 13(20):2837.
https://doi.org/10.3390/w13202837

**Chicago/Turabian Style**

Moghaddam, Mohammad A., Ty P. A. Ferré, Xingyuan Chen, Kewei Chen, Xuehang Song, and Glenn Hammond.
2021. "Can Simple Machine Learning Tools Extend and Improve Temperature-Based Methods to Infer Streambed Flux?" *Water* 13, no. 20: 2837.
https://doi.org/10.3390/w13202837