diff --git a/2_SWSF_p1of5_Settings_v51.R b/2_SWSF_p1of5_Settings_v51.R index 66d01df3..f7f03a11 100644 --- a/2_SWSF_p1of5_Settings_v51.R +++ b/2_SWSF_p1of5_Settings_v51.R @@ -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