Various R and JAGS code is available on my github. In particular, I maintain code for estimating aquatic ecosystem metabolism from high-frequency measurements of dissolved oxygen in streams and lakes. Please don’t hesitate to contact me with any problems and suggestions for improvements are always welcome.

BAyesian Single-station Estimation (BASE)
Note (8th Jan 2018): We’re currently preparing this as an R package – stay tuned!

BASE is R and JAGS code to quickly estimate single-station stream metabolism from long time series of dissolved oxygen data. It operates in a batch mode to model metabolic parameters for many days without repeated user input. The code was written in collaboration with Mike Grace and Ralph Mac Nally. The model uses Bayesian methods to simultaneously estimate GPP, respiration and the reaeration coefficient K, along with their uncertainties. Prior information from independent measures of K can be optionally incorporated. The model output provides metrics and plots to assess model fit.

Please see the accompanying publication (Grace et al. 2015 L&O Methods) and note the updates documented in the manual that describes the code (available as pdf on github).


Bayesian Estimation of Depth-Integrated Lake Metabolism

R and JAGS code for estimating daily rates of gross primary production (GPP), ecosystem respiration (ER) and net ecosystem production (NEP) from depth-specific measurements of dissolved oxygen, temperature and light in lakes. This code was the outcome of ongoing collaborations with members of the Networking Lake Observatories in Europe (NETLAKE) community.

Please see Giling et al. (2017) and references within for a description of the model. Important information for assessing model convergence and fit can be found in the manual that accompanies the code on github.