RSFME: An Assessment of Annual Load Estimation Methods in Small Watersheds for Cross Site Comparisons
Authors: Nic Gubbins (Colorado State University), Weston M. Slaughter (UMD), Michael J. Vlah (Duke), Spencer Rhea (Duke), William H. McDowell (UNH/FIU), Emily S. Bernhardt (Duke), Matthew R.V. Ross (CSU)
Target journal: Hydrology and Earth System Sciences (HESS)
Contact: gubbins@colostate.edu
This repository contains the code and data pipeline for evaluating four common solute load estimation methods (linear interpolation, Beale ratio, rating, composite) by coarsening high-frequency sensor data from three monitoring networks:
- Hubbard Brook Experimental Forest (HBEF) — 15-min sensor data, Watershed 3
- Plynlimon Research Catchments — 7-hour auto-sampler data, Upper Hafren
- NEON — Daily sensor data from 6 first-order stream sites
The methods are then applied to the MacroSheds synthesis dataset (~93 sites, 112 solutes), producing a publicly available dataset of 16,489 site-years of annual load estimates.
RSFME/
├── source/ # Core analysis functions
│ ├── flux_methods.R # Load estimation methods (PW, Beale, Rating, Composite)
│ ├── plot_theme.R # Shared ggplot2 theme and palettes
│ └── calculate_annual_flux.R # MacroSheds annual load computation
├── data/ # All input and intermediate data (see data/README.md)
├── paper/
│ ├── source/ # Numbered analysis scripts (01–12)
│ │ └── 00_run_all.R # Runner script for full pipeline
│ └── figures/ # All output figures (PNGs)
└── README.md # This file
- R 4.4+
- Required packages:
tidyverse,here,feather,lfstat,lubridate,RiverLoad,zoo,patchwork,EGRET,macrosheds,imputeTS
- MacroSheds data: Download EDI package
edi.1262.2from the EDI Data Portal and unzip intodata/macrosheds/. - HBEF sensor data: Place
w3_sensor_wdisch.featherin the repository root. This file is proprietary and not included — contact the lead author for access. - Other data files are included in the repository under
data/.
See data/README.md for detailed provenance of each data file.
From the repository root in R:
source("paper/source/00_run_all.R")To resume from a specific script (e.g., skip the long-running analysis scripts):
Rscript paper/source/00_run_all.R 5Scripts 01, 04, and 06 run coarsening analyses with 100 repetitions each and may take 30+ minutes. Scripts 02–03, 05, 07–12 generate figures and complete in seconds.
- Figures are written to
paper/figures/, named by figure number (e.g.,fig07_hbef_ca_coarsening.png). - Intermediate data (coarsening results) are written to subdirectories of
data/. - Annual load estimates are written to
data/load_annual.csv.
| # | Script | Description |
|---|---|---|
| 01 | 01_coarsen_analysis_hbef.R |
HBEF coarsening experiment (Ca, NO3) |
| 02 | 02_coarsen_figure_hbef.R |
HBEF coarsening figures (Figs 7–8) |
| 03 | 03_coarsen_example_figure.R |
Coarsening example illustration (Fig 6) |
| 04 | 04_coarsen_analysis_plynlimon.R |
Plynlimon coarsening experiment |
| 05 | 05_coarsen_figure_plynlimon.R |
Plynlimon coarsening figures (Figs 9–10) |
| 06 | 06_coarsen_analysis_neon.R |
NEON coarsening experiment |
| 07 | 07_coarsen_figure_neon.R |
NEON coarsening figures (supplement) |
| 08 | 08_macrosheds_compare.R |
MacroSheds method comparison figures |
| 09 | 09_macrosheds_descriptive.R |
MacroSheds load distribution figure |
| 10 | 10_ca_correlation.R |
Ca–SpCond regression (helper, sourced by 11) |
| 11 | 11_misc_figures.R |
Raw data and C:Q plots (Figs 2–5) |
| 12 | 12_hbef_method_comparison.R |
HBEF method comparison (Fig 11) |
Data availability and usage terms are described in the paper's Data Availability section.