Skip to contents

Calculate DPS reuse and end of pipe loads from raw facility data

Usage

anlz_dps_facility(fls)

Arguments

fls

vector of file paths to raw facility data, one to many

Value

data frame with loading data for TP, TN, TSS, and BOD as tons per month and hydro load as million cubic meters per month. Information for each entity, facility, and outfall is retained.

Details

Input data should include flow as million gallons per day, and conc as mg/L. Steps include:

  1. Multiply flow by day in month to get million gallons per month

  2. Multiply flow by 3785.412 to get cubic meters per month

  3. Multiply conc by flow and divide by 1000 to get kg var per month

  4. Multiply m3 by 1000 to get L, then divide by 1e6 to convert mg to kg, same as dividing by 1000

  5. TN, TP, TSS, BOD dps reuse is multiplied by attenuation factor for land application (varies by location)

  6. Hydro load (m3 / mo) is also attenuated for the reuse, multiplied by 0.6 (40% attenuation)

See also

Examples

fls <- list.files(system.file('extdata/', package = 'tbeploads'),
  pattern = 'ps_dom', full.names = TRUE)
anlz_dps_facility(fls)
#> # A tibble: 144 × 11
#>     Year Month entity  facility coastco source tn_load tp_load tss_load bod_load
#>    <int> <int> <chr>   <chr>    <chr>   <chr>    <dbl>   <dbl>    <dbl>    <dbl>
#>  1  2021     1 Clearw… City of… 387     D-001   0.617   0.0301  0.251     1.65  
#>  2  2021     2 Clearw… City of… 387     D-001   0.789   0.373   0.279     2.24  
#>  3  2021     3 Clearw… City of… 387     D-001   0.393   0.344   0.135     0.842 
#>  4  2021     4 Clearw… City of… 387     D-001   0.299   0.234   0.141     0.760 
#>  5  2021     5 Clearw… City of… 387     D-001   0.0123  0.0171  0.00776   0.0447
#>  6  2021     6 Clearw… City of… 387     D-001   0.194   0.320   0.113     0.527 
#>  7  2021     7 Clearw… City of… 387     D-001   0.610   0.683   0.302     0.604 
#>  8  2021     8 Clearw… City of… 387     D-001   0.534   0.487   0.315     0.594 
#>  9  2021     9 Clearw… City of… 387     D-001   1.01    1.07    0.534     0.762 
#> 10  2021    10 Clearw… City of… 387     D-001   0.310   0.324   0.135     0.237 
#> # ℹ 134 more rows
#> # ℹ 1 more variable: hy_load <dbl>