Skip to contents

Prep Verna Wellfield data for use in AD calculations

Usage

util_ad_prepverna(fl, fillmis = T)

Arguments

fl

text string for the file path to the Verna Wellfield data

fillmis

logical indicating whether to fill missing data with monthly means

Value

A data frame with total nitrogen and phosphorus estimates as mg/l for each year and month of the input data

Details

Raw data can be obtained from https://nadp.slh.wisc.edu/sites/ntn-FL41/ as monthly observations. Total nitrogen and phosphorus concentrations are estimated from ammonium and nitrate concentrations (mg/L) using the following relationships:

$$TN = NH_4^+ * 0.78 + NO_3^- * 0.23$$ $$TP = 0.01262 * TN + 0.00110$$

The first equation corrects for the % of ions in ammonium and nitrate that is N, and the second is a regression relationship between TBADS TN and TP, applied to Verna.

Examples

fl <- system.file('extdata/verna-raw.csv', package = 'tbeploads')
util_ad_prepverna(fl)
#> # A tibble: 72 × 4
#>     Year Month TNConc  TPConc
#>    <int> <int>  <dbl>   <dbl>
#>  1  2017     1 0.253  0.00429
#>  2  2017     2 0.214  0.00380
#>  3  2017     3 0.170  0.00324
#>  4  2017     4 0.367  0.00573
#>  5  2017     5 0.582  0.00844
#>  6  2017     6 0.190  0.00349
#>  7  2017     7 0.225  0.00394
#>  8  2017     8 0.124  0.00266
#>  9  2017     9 0.0829 0.00215
#> 10  2017    10 0.0485 0.00171
#> # ℹ 62 more rows