Skip to content

Commit

Permalink
Adding new settings 'agg_funs' and 'agg_years'
Browse files Browse the repository at this point in the history
- this branch will be addressing issue #18
- setting option ‘agg_funs’ allows to choose which functions will be
applied to aggregate output across years (and/or to output for each
year)
- setting option ‘agg_years’ contains sequences of years over which
will be aggregated


Former-commit-id: d3124f4
  • Loading branch information
dschlaep committed Sep 9, 2016
1 parent ccec56a commit 8ba1d5a
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions 2_SWSF_p1of5_Settings_v51.R
Original file line number Diff line number Diff line change
Expand Up @@ -319,6 +319,24 @@ Index_RunInformation <- NULL #indices of columns of 'SWRunInformation', e.g, c(3
#------Select aggregated output: time scale and variable groups
#simulation_timescales is at least one of c("daily", "weekly", "monthly", "yearly")
simulation_timescales <- c("daily", "monthly", "yearly")
# functions to aggregate output across years
# don't delete names, only set \code{TRUE}/\code{FALSE}
agg_funs <- list(
mean = TRUE,
SD = TRUE,
quantile = TRUE,
mad = TRUE,
yearly = TRUE
)
agg_fun_options <- list(
quantile = list(probs = c(0, 0.025, 0.5, 0.975, 1))
)
# named list of time windows to aggregate over
agg_years <- c(
current1 = list(startyr:endyr),
current2 = list((endyr - 10):(endyr + 10)),
future = apply(future_yrs, 1, function(x) x["DSfut_startyr"]:x["DSfut_endyr"])
)
#turn aggregation for variable groups on (1) or off (0), don't delete any variable group labels
output_aggregates <- c(
#---Aggregation: SoilWat inputs
Expand Down

0 comments on commit 8ba1d5a

Please sign in to comment.