Calculate non-point source (NPS) loads for Tampa Bay
Usage
anlz_nps(
yrrng = c("2021-01-01", "2023-12-31"),
tbbase,
rain,
mancopth,
pincopth,
lakemanpth,
tampabypth,
bellshlpth,
vernafl,
verbose = T
)
Arguments
- yrrng
A vector of two dates in 'YYYY-MM-DD' format, specifying the date range to retrieve flow data. Default is from '2021-01-01' to '2023-12-31'.
- tbbase
data frame containing polygon areas for the combined data layer of bay segment, basin, jurisdiction, land use data, and soils, see details
- rain
data frame of rainfall data, see details
- mancopth
character, path to the Manatee County water quality data file, see details
- pincopth
character, path to the Pinellas County water quality data file, see details
- lakemanpth
character, path to the file containing the Lake Manatee flow data, see details
- tampabypth
character, path to the file containing the Tampa Bypass flow data, see details
- bellshlpth
character, path to the file containing the Bell shoals data, see details
- vernafl
character vector of file path to Verna Wellfield atmospheric concentration data
- verbose
logical indicating whether to print verbose output
Value
A data frame of non-point source loads for Tampa Bay, including columns for year, month, basin, bay segment, basin area (hectares), and loads for water, total nitrogen (TN), total phosphorus (TP), total suspended solids (TSS), and biochemical oxygen demand (BOD).
Details
The function estimates non-point source (NPS) loads for Tampa Bay by combining ungaged and gaged NPS loads. Ungaged loads are estimated using rainfall, flow, event mean concentration, land use, and soils data, while gaged loads are estimated using water quality data and flow data. The function also incorporates atmospheric concentration data from the Verna Wellfield site.
The following functions are used internally and are provided here for reference on the components used in the calculations:
anlz_nps_ungaged
: Estimates ungaged NPS loads.anlz_nps_gaged
: Estimates gaged NPS loads.util_prepverna
: Prepares and fills missing data with five-year means for the Verna Wellfield site data.util_nps_getflow
: Gets flow estimates for NPS gaged and ungaged calculations.util_nps_getusgsflow
: Gets USGS flow data for NPS calculations, used inutil_nps_getflow
.util_nps_getextflow
: Gets external flow data and contacts (Lake Manatee, Tampa Bypass, and Bell Shoals), used inutil_nps_getflow
.util_nps_getwq
: Gets water quality data for NPS gaged calculations (formancopth
,pincopth
, and Hillsborough County data).util_getrain
: Gets rainfall data for NPS ungaged calculations, as provided inrain
.util_nps_tbbase
: Gets the combined spatial data layer for NPS ungaged calculations, as provided intbbase
.
Examples
if (FALSE) { # \dontrun{
data(tbbase)
data(rain)
mancopth <- system.file('extdata/nps_wq_manco.txt', package = 'tbeploads')
pincopth <- system.file('extdata/nps_wq_pinco.txt', package = 'tbeploads')
lakemanpth <- system.file('extdata/nps_extflow_lakemanatee.xlsx', package = 'tbeploads')
tampabypth <- system.file('extdata/nps_extflow_tampabypass.xlsx', package = 'tbeploads')
bellshlpth <- system.file('extdata/nps_extflow_bellshoals.xls', package = 'tbeploads')
vernafl <- system.file('extdata/verna-raw.csv', package = 'tbeploads')
anlz_nps(yrrng = c('2021-01-01', '2023-12-31'), tbbase, rain, mancopth, pincopth,
lakemanpth, tampabypth, bellshlpth, vernafl, verbose = TRUE)
} # }