Stream flow and water temperature for BC’s Freshwater Atlas
Mean annual and monthly flow per stream segment, and flow and water-temperature departures at hydrometric stations. wet builds its own open estimate and scores other groups’ products (PCIC, fwapg, the BC Water Tools) against it and against HYDAT.
Three paths:
-
Segments. Gridded runoff is sampled to FWA fundamental watersheds, accumulated upstream by area weighting, and converted to m³/s. Two sources:
- PCIC VIC-GL, historical, over the Peace, Fraser and Columbia;
- an open water balance (climr precipitation less a Budyko-floored AET), province-wide, fitted at 315 HYDAT gauges and giving mean annual and monthly flow.
run =, but no scenario output is built yet. - Station flow. Daily flow from HYDAT, continued by ECCC provisional and real-time data, summarised per year over month-day windows for cd’s departure statistics.
- Station water temperature. Daily water temperature from the ECCC readings that water-temp-bc archives (about 300 stations, from 2002), through the same windows to cd. The baseline is 2016–2025, because few loggers reach back to 1981–2010.
Installation
pak::pak("NewGraphEnvironment/wet")Prerequisites
The segment path needs PostgreSQL with fwapg loaded; fresh’s docker/ has a local setup. Connection is through the standard libpq env vars (PGHOST, PGPORT, PGDATABASE, PGUSER, PGPASSWORD). The station flow path needs a HYDAT database (tidyhydat::download_hydat()). The water-temperature path needs duckdb; it reads water-temp-bc’s public archive, so no credentials are needed.
Example
Flow at Buck Creek since 1981, against its 1981–2010 normal in three Chinook windows:
library(wet)
q <- wet_station_daily("08EE013") # HYDAT, then provisional, then real-time
w <- data.frame(window = c("Migration", "Spawning", "Fry migration"),
start = c("05-01", "08-01", "07-15"), end = c("08-01", "09-15", "09-07"))
s <- wet_window_stats(q, w, stats = c("mean", "min7")) # one value per year, window, statistic
s$station_number <- NULL # cd takes one station per call
cd::cd_anomaly(s, cd::cd_baseline(s, 1981:2010))Vignettes
- Chinook flow at two stations: the station path on 08EE013 and 08EE003, from map to departure and trend.
-
Stream discharge per segment: the published per-segment discharge, what its two sources are, which value to use (
pick, with a province map of the source it takes), how to read it, and how each source scores against the gauges.
Function reference and both vignettes are on the pkgdown site.
Ecosystem
| Package | Role |
|---|---|
| wet | Stream flow per segment and per station, and station water temperature (this package) |
| fresh | Stream network modelling engine; its habitat rules can read mean annual discharge (mad_m3s) per segment |
| link | Habitat interpretation layer that runs fresh’s pipeline; reads mean annual discharge per segment through lnk_discharge()
|
| cd | Departure statistics (baseline, anomaly, trend) over wet’s per-year values, and ERA5-Land climate |
| gq | Map symbology for the vignettes |
| water-temp-bc | Monthly archive of ECCC provisional hydrometric data (discharge and water temperature) that bridges HYDAT and real-time |
Pipelines:
- Fish habitat: wet (discharge) → link (
lnk_discharge(), pipeline) → fresh (segment attribute,madrules) - Flow departure: wet (per-year window values) → cd (baseline, anomaly, trend), against 1981–2010
- Water-temperature departure: wet (per-year window values, °C) → cd, against 2016–2025
