Section 10 Automated Pipeline Verification & Literature Provenance

Every dataset, spatial join, model fit, simplex constraint, and statistical claim in the manuscript is verified against automated checks in R/verify.R and R/claims.R:

10.1 Automated Pipeline Verification Checklist

Pipeline Stage Verification Check Expected Criterion Observed Value Status
  1. AquaMatch download
All 4 EDI packages + spatial layers present 11 / 11 files 11 / 11 files <span class=“pass”>✔ PASS</span>
  1. Simultaneous obs.
Training matchups (Secchi + Chl a + DOC + TSS) > 250,000 281,439 <span class=“pass”>✔ PASS</span>
  1. Simultaneous obs.
Application matchups (Chl a + DOC + TSS, Secchi optional) > 450,000 486,689 <span class=“pass”>✔ PASS</span>
  1. Training set
Analytical-floor & Beer-Lambert screened training obs. > 250,000 276,321 <span class=“pass”>✔ PASS</span>
  1. Training set
Residual screen against the published reference attenuation (&#124;z_r&#124; <= 2.5 SD) <= 2.50 SD max &#124;z_r&#124; = 2.50 SD <span class=“pass”>✔ PASS</span>
  1. Training set
Shuffled-Secchi null test: the screen creates no fit by itself R2 < 0.01 R2 = 0.0019 (max of 20 repeats 0.0024) <span class=“pass”>✔ PASS</span>
  1. Training set
Pure-water offset k_w = 1 / (1.5 * max Secchi) [m^-1] 0.04776 0.04776 <span class=“pass”>✔ PASS</span>
  1. Ecoregion joins
1-to-1 site assignment (no boundary row duplication) 276,321 276,321 <span class=“pass”>✔ PASS</span>
  1. Models 1-10
Unified minimum group size (> 100 obs) across all models > 100 min group = 102 <span class=“pass”>✔ PASS</span>
  1. Model 7 application
All ternary fractions strictly inside [0, 1] simplex 0 outside [0, 1] 0 outside [0, 1] <span class=“pass”>✔ PASS</span>
  1. Model 7 application
Consistent k_w used in both model fit and Secchi prediction 0.04776 m^-1 0.04776 m^-1 <span class=“pass”>✔ PASS</span>
  1. Dominance classes
Secchi ordering: NAP-dominant lowest, then Chl a-dominant, then DOC-dominant and Mixed NAP < Chl a < DOC, Mixed NAP dominant: 0.58 m; Chl a dominant: 0.92 m; DOC dominant: 1.22 m; Mixed: 1.22 m <span class=“pass”>✔ PASS</span>
  1. Dominance classes
NAP-dominant waters less clear than each other class at p < 0.01 (Welch & Wilcoxon) 3 / 3 pairs p < 0.01 3 / 3 pairs; all six pairs: 5 / 6 (not different: Mixed vs. DOC dominant) <span class=“pass”>✔ PASS</span>
  1. Figure 4 metric
Exact ternary area fraction (normalized by sqrt(3)/4): Streams & Estuaries < Lakes Stream, Estuary (~10%) < Lake (~15%) Stream 9.1%, Estuary 10.1% < Lake 14.8% <span class=“pass”>✔ PASS</span>

All 14 checks pass.


10.2 Literature Provenance Table

Table 10.1: Table 10.2: Peer-reviewed literature and data provenance supporting each step of the water-clarity partitioning pipeline.
Pipeline Stage / Decision Equation / Parameter Primary Citation DOI / Package ID Implementation Notes
In-situ Secchi depth (sdd) AquaMatch harmonized WQP Secchi depth (2.74M records, 1970-2024) De La Torre et al. (2025) EDI package edi.1856.1 Retrieved via AquaMatchr::download_parameters(“sdd”); records with sdd_mdl >= 2 (<=0.01 m floor placeholders) set to NA.
In-situ Chlorophyll a (chla) AquaMatch harmonized WQP Chlorophyll a (3.39M records, 1970-2024) Brousil et al. (2024) EDI package edi.1756.2 Retrieved via AquaMatchr::download_parameters(“chla”).
In-situ Dissolved Organic Carbon (doc) AquaMatch harmonized WQP DOC (1.84M records, 1970-2024) Brousil et al. (2024) EDI package edi.1809.1 Retrieved via AquaMatchr::download_parameters(“doc”).
In-situ Total Suspended Solids & SSC (tss) AquaMatch harmonized WQP TSS & SSC (4.61M records, 1970-2025) Brousil et al. (2025) EDI package edi.2048.2 Retrieved via AquaMatchr::download_parameters(“tss”); prefers TSS when both TSS and SSC are measured on the same sample.
Diffuse attenuation from Secchi depth K_d = 1 / z_SD (Eq. 1 with a = 1) Lee et al. (2015, 2018) 10.1016/j.rse.2015.08.002; 10.1002/lno.10940 Contrast-transmittance theory showing K_d(tr) is inversely proportional to Secchi depth without empirical Poole & Atkins (1929) constants.
Algal dry biomass & NAP separation biomass [mg/L] = 0.234 * (Chl a)^0.57; NAP = TSS - biomass Gohin et al. (2005) 10.1016/j.rse.2004.11.007 Nonlinear power-law conversion accounting for lower C:Chl ratios at high algal concentrations; prevents over-subtraction of algal mass.
Published Chl a attenuation coefficient k_c = 0.016 m^2 (mg Chl a)^-1 for diffuse attenuation of PAR Bannister (1974); Atlas and Bannister (1980) 10.4319/lo.1974.19.1.0001; 10.4319/lo.1980.25.1.0157 An estimate, not an upper limit (Bannister p. 6 and p. 10). It is per unit of K_d; ours is per unit of 1/z_SD, so the two differ by the factor a = K_d x z_SD.
Values below reporting limits Chl a, DOC, TSS (and NAP where algal mass >= TSS) below the limit replaced by draws from a fitted lognormal truncated at the limit Lubin et al. (2004); Helsel (2006) 10.1289/ehp.7199; 10.1016/j.chemosphere.2006.04.051 Fill-in from a fitted distribution instead of substituting the limit; fewer than 3% of values are affected. Draws are tied to the record so training and application use the same value.
Data screen against a published reference attenuation K_ref = 0.1 + 0.0625 NAP + k_DOC DOC + 0.016 Chl a, k_DOC = 0.22 (lakes, streams) or 0.047 (estuaries); keep &#124;z_r&#124; <= 2.5 on r = log10[(1/z_SD) / K_ref] Gohin et al. (2005); Morris et al. (1995); Gallegos (2001); Bannister (1974) 10.1016/j.rse.2004.11.007; 10.4319/lo.1995.40.8.1381; 10.2307/1353240; 10.4319/lo.1974.19.1.0001 Every coefficient is a published value used as printed (Gohin Eq. 21; Morris Table 3; Gallegos Table 5; Bannister p. 6). A constant Secchi conversion factor cancels in z_r. Shuffled-Secchi test and reference sensitivity: Section 4.
Secchi depth and attenuation z_SD = Gamma / (alpha + K), Gamma ~ 8-9; K_d x z_SD = 0.59 to 4.09 across studies Tyler (1968); Preisendorfer (1986); Koenings and Edmundson (1991) 10.4319/lo.1968.13.1.0001; 10.4319/lo.1986.31.5.0909; 10.4319/lo.1991.36.1.0091 Theory and measurements behind the conversion factor a in Eq. 1 and the comparison of our coefficients with published ones.
DOC as CDOM proxy & regional SUVA variation alpha_DOC varies across ecoregions with DOM aromaticity Spencer et al. (2012); Griffin et al. (2018) 10.1029/2011JG001928; 10.1016/j.watres.2018.08.007 Justifies ecoregion-stratified attenuation slopes (Model 7) to capture regional differences in CDOM:DOC stoichiometry.
Hierarchical Ecoregion Stratification EPA / CEC North American Ecoregions Levels I-IV Omernik & Griffith (2014) 10.1007/s00267-014-0364-1 Provides continentally nested physiographic, soil, and land-cover boundaries governing sediment and DOM optical properties.
River network longitudinal distances RiverSR modified NHDPlusV2 flowlines (TermnlP = 200005438) Gardner et al. (2021) 10.5281/zenodo.4304567 Provides path lengths along the Delaware River mainstem for Figure 3.

R Session Information

## R version 4.5.2 (2025-10-31)
## Platform: aarch64-apple-darwin20
## Running under: macOS Sequoia 15.7.9
## 
## Matrix products: default
## BLAS:   /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libBLAS.dylib 
## LAPACK: /Library/Frameworks/R.framework/Versions/4.5-arm64/Resources/lib/libRlapack.dylib;  LAPACK version 3.12.1
## 
## locale:
## [1] en_US/en_US/en_US/C/en_US/en_US
## 
## time zone: America/Denver
## tzcode source: internal
## 
## attached base packages:
## [1] stats     graphics  grDevices utils     datasets  methods   base     
## 
## other attached packages:
##  [1] kableExtra_1.4.0 knitr_1.51       scales_1.4.0     patchwork_1.3.2 
##  [5] feather_0.4.0    sf_1.1-1         lubridate_1.9.5  forcats_1.0.1   
##  [9] stringr_1.6.0    dplyr_1.2.1      purrr_1.2.2      readr_2.2.0     
## [13] tidyr_1.3.2      tibble_3.3.1     ggplot2_4.0.3    tidyverse_2.0.0 
## 
## loaded via a namespace (and not attached):
##  [1] gtable_0.3.6                  xfun_0.62                    
##  [3] bslib_0.10.0                  tzdb_0.5.0                   
##  [5] vctrs_0.7.3                   tools_4.5.2                  
##  [7] generics_0.1.4                parallel_4.5.2               
##  [9] proxy_0.4-29                  pkgconfig_2.0.3              
## [11] KernSmooth_2.23-26            RColorBrewer_1.1-3           
## [13] S7_0.2.2                      assertthat_0.2.1             
## [15] lifecycle_1.0.5               compiler_4.5.2               
## [17] farver_2.1.2                  textshaping_1.0.5            
## [19] terra_1.9-11                  codetools_0.2-20             
## [21] htmltools_0.5.9               class_7.3-23                 
## [23] sass_0.4.10                   yaml_2.3.12                  
## [25] crayon_1.5.3                  pillar_1.11.1                
## [27] jquerylib_0.1.4               classInt_0.4-11              
## [29] cachem_1.1.0                  tidyselect_1.2.1             
## [31] digest_0.6.39                 stringi_1.8.7                
## [33] bookdown_0.48                 labeling_0.4.3               
## [35] arrow_25.0.0                  rnaturalearth_1.2.0          
## [37] fastmap_1.2.0                 grid_4.5.2                   
## [39] cli_3.6.6                     magrittr_2.0.5               
## [41] maptiles_0.11.0               e1071_1.7-17                 
## [43] withr_3.0.3                   bit64_4.8.2                  
## [45] timechange_0.4.0              rmarkdown_2.31               
## [47] bit_4.6.0                     otel_0.2.0                   
## [49] ragg_1.5.2                    rnaturalearthhires_1.0.0.9000
## [51] hms_1.1.4                     evaluate_1.0.5               
## [53] viridisLite_0.4.3             rlang_1.3.0                  
## [55] Rcpp_1.1.1-1.1                glue_1.8.1                   
## [57] DBI_1.3.0                     xml2_1.6.0                   
## [59] vroom_1.7.1                   svglite_2.2.2                
## [61] rstudioapi_0.18.0             jsonlite_2.0.0               
## [63] R6_2.6.1                      systemfonts_1.3.2            
## [65] units_1.0-1