Code and Model Interface To Estimate a Wetland's Retention Capacity

Tool Resource
March 2020
OWC Github Screenshot

Wetlands can help reduce nutrient loading to lakes and estuaries, but determining how much phosphorus or nitrogen a particular wetland can capture and retain over the long run is difficult.  A research team from Old Woman Creek Reserve and the University of Toledo developed a Bayesian hierarchical modeling approach to calculate the long-term phosphorus retention capacity of wetlands with limited datasets. They produced a series of tools, including a monitoring protocol and freely available statistical code to enable others to estimate the retention capacity of their own wetland system. The tools are most useful for wetlands with a single inflow and outflow point.

About this Tool

To facilitate data analysis and interpretation, the team has developed a series of technical resources that are available on a GitHub Repository. A model user guide, example data set, statistical code, and other supporting information are housed on the repository. The R code is intended to help researchers who want to use this approach to analyze similarly suitable data.

The user guide includes instructions for preparing, uploading, and running the data through a cloud-based model interface the team has developed. The model example is written in Jupyter notebook and can be run on Google Colaboratory (colab) without needing to install R and Stan locally.

A companion resource, Determination of Wetland Total Phosphorus Retention Capacity, provides guidance on how to monitor your wetland and generate the data necessary to do these calculations.


The statistical analysis code and model interface were developed by Song Qian from the University of Toledo, Email:

Learn more about the project(s) and related resources: