preproc_main {HyMETT} | R Documentation |
A wrapper function for preproc_precondition_data, preproc_audit_data, and calc_annual_flow_stats
Description
A wrapper function for preproc_precondition_data
,
preproc_audit_data
, and
calc_annual_flow_stats
Usage
preproc_main(
data = NULL,
Date,
value,
date_format = "%Y-%m-%d",
year_group = c("WY", "CY", "year"),
use_specific_years = FALSE,
begin_year = NULL,
end_year = NULL,
days_cutoff = 360,
calc_high = TRUE,
calc_low = TRUE,
calc_percentiles = TRUE,
calc_monthly = TRUE,
calc_WSCVD = TRUE,
longitude = NA,
calc_ICVD = FALSE,
zero_threshold = 33,
quantile_type = 8,
na.action = c("na.omit", "na.pass")
)
Arguments
data |
'data.frame'. Optional data.frame input, with columns containing |
Date |
'Date' or 'character' vector when |
value |
'numeric' vector when |
date_format |
'character' string. Format of Date. Default is |
year_group |
'character' value. Specify either |
use_specific_years |
'boolean' value. Flag to clip data to a certain set of years in
|
begin_year |
'numeric' value. If |
end_year |
'numeric' value. If |
days_cutoff |
'numeric' value. Designating the number of days required for a year to be
counted as full. Default is |
calc_high |
'boolean' value. Calculate high streamflow statistics for years in |
calc_low |
'boolean' value. Calculate low streamflow statistics for years in |
calc_percentiles |
'boolean' value. Calculate percentiles for years in |
calc_monthly |
'boolean' value. Calculate monthly statistics for years in |
calc_WSCVD |
'boolean' value. Calculate winter-spring center volume date for years in
|
longitude |
'numeric' value. Site longitude in NAD83, required in WSCVD calculation.
Default is |
calc_ICVD |
'boolean' value. Calculate inverse center volume date for years in
|
zero_threshold |
'numeric' value as percentage. The percentage of years of a statistic that
need to be zero in order for it to be deemed a zero streamflow site for that statistic. For
use in trend calculation. See Details on attributes. Default is |
quantile_type |
'numeric' value. The distribution type used in the |
na.action |
'character' string indicating na.action passed to |
Details
This is a wrapper function of preproc_precondition_data
, preproc_audit_data
, and
calc_annual_flow_stats
. Data are first passed to the precondition function, then audited,
then annual statistics are computed.
It also checks the timestep of the data to make sure that it is daily timestep.
Other time steps are currently not supported and will return the data.frame without moving
averages computed.
Value
A list of three data.frames: 1 of preconditioned data, 1 data audit, and 1 annual statistics.
See Also
preproc_audit_data
, preproc_precondition_data
,
calc_annual_flow_stats
Examples
preproc_main(data = example_obs, Date = "Date", value = "streamflow_cfs", longitude = -68)