diff --git a/modules/Scorecards/Scorecards.R b/modules/Scorecards/Scorecards.R index 3bcb01ce1221fcc845d8bb9f77d7cc8e65942e84..0dbcd9210c9227200c872204526ea4e6df05adcb 100644 --- a/modules/Scorecards/Scorecards.R +++ b/modules/Scorecards/Scorecards.R @@ -29,7 +29,12 @@ Scorecards <- function(recipe) { end.year <- as.numeric(recipe$Analysis$Time$hcst_end) forecast.months <- recipe$Analysis$Time$ftime_min : recipe$Analysis$Time$ftime_max - start.months <- 1:12 #recipe$Analysis$Workflow$Scorecards$start_months + if (recipe$Analysis$Workflow$Scorecards$start_months == 'all') { + start.months <- 1:12 + } else { + start.months <- as.numeric(strsplit(recipe$Analysis$Workflow$Scorecards$start_months, + split = ", | |,")[[1]]) + } regions <- recipe$Analysis$Workflow$Scorecards$regions for (i in names(regions)){regions[[i]] <- unlist(regions[[i]])} @@ -61,6 +66,7 @@ Scorecards <- function(recipe) { } } + inf.to.na <- recipe$Analysis$Workflow$Scorecards$inf_to_na table.label <- recipe$Analysis$Workflow$Scorecards$table_label fileout.label <- recipe$Analysis$Workflow$Scorecards$fileout_label legend.white.space <- recipe$Analysis$Workflow$Scorecards$legend_white_space @@ -78,6 +84,7 @@ Scorecards <- function(recipe) { metrics = metrics.load, start.months = start.months, forecast.months = forecast.months, + inf_to_na = inf.to.na, input.path = input.path) diff --git a/recipes/atomic_recipes/recipe_scorecards_atomic.yml b/recipes/atomic_recipes/recipe_scorecards_atomic.yml index fc88af229961d6103299780315a4b2123ea16d05..a8adb6c12f6c388c05798734f53c023426995b02 100644 --- a/recipes/atomic_recipes/recipe_scorecards_atomic.yml +++ b/recipes/atomic_recipes/recipe_scorecards_atomic.yml @@ -46,24 +46,25 @@ Analysis: Indicators: index: no Scorecards: + execute: yes # yes/no regions: Extra-tropical NH: {lon.min: 0, lon.max: 360, lat.min: 30, lat.max: 90} Tropics: {lon.min: 0, lon.max: 360, lat.min: -30, lat.max: 30} Extra-tropical SH : {lon.min: 0, lon.max: 360, lat.min: -30, lat.max: -90} - start_months: NULL + start_months: 'all' metric: mean_bias enscorr rpss crpss enssprerr metric_aggregation: 'score' - table_label: NULL - fileout_label: NULL - col1_width: NULL - col2_width: NULL + inf_to_na: TRUE + table_label: + fileout_label: + col1_width: + col2_width: calculate_diff: FALSE - #output_path: /esarchive/scratch/nmilders/scorecards_images/testing ncores: 7 # Optional, int: number of cores, defaults to 1 remove_NAs: # Optional, bool: Whether NAs are removed, defaults to FALSE Output_format: Scorecards #S2S4E Run: Loglevel: INFO Terminal: yes - output_dir: /esarchive/scratch/nmilders/scorecards_data/to_system/cross_validation/both_cross_val/ + output_dir: /esarchive/scratch/nmilders/scorecards_data/new/to_system/cross_validation/all_cross_val/ code_dir: /esarchive/scratch/nmilders/gitlab/git_clones/s2s-suite/