process_chem: Process chem data for calcs

Description Usage Arguments Details Value

View source: R/process_chem.R

Description

Processes concentrations of parameters (e.g., d18O, Magnesium, Calcium) for use in water/solute balances. Filters CSLSdata::water_chem to specified parameter, limits to lake, precipitation, and upgradient groundwater sites, and interpolates to a daily timestep.

Usage

1
process_chem(parameter, start_date, end_date, dt = "day", use_kniffin = TRUE)

Arguments

parameter

description of parameter to use in analysis, as in CSLSdata::water_chem$description (e.g., "d18O", "MAGNESIUM TOTAL RECOVERABLE")

start_date

start date of analysis period (POSIX).

end_date

end date of analysis period (POSIX).

dt

time step at which to summarize data. Defaults to "day" for daily time step, can also be "month" for monthly time step.

use_kniffin

logical defaults to TRUE to use kniffin precip stable isotope data (only when stable isotopes selected as the paramter)

Details

If using with non-CSLS data, will need an alternate way to get solute/isotope concentrations into the format outputted by this function.

Value

df, a data frame with the following columns:

lake

name of lake, i.e., "Pleasant", "Long", and "Plainfield"

date

date of observation (POSIX). If monthly time step, monthly means are assigned to first day of the month

C_lake

concentration in the lake (units in per mil, mg/L, or whatever unit parameter has in CSLSdata::water_chem)

C_pcpn

concentration in precipitation (units in per mil, mg/L, or whatever unit parameter has in CSLSdata::water_chem)

C_GWin

concentration in upgradient groundwater (units in per mil, mg/L, or whatever unit parameter has in CSLSdata::water_chem)


WDNR-Water-Use/CSLSchem documentation built on July 3, 2020, 10:51 a.m.