
source("modules/Loading/Loading.R")
source("modules/Saving/Saving.R")
source("modules/Units/Units.R")
source("modules/Visualization/Visualization.R")
args = commandArgs(trailingOnly = TRUE)
recipe_file <- args[1]
#recipe_file <- "recipe_tas_oper.yml"
recipe <- read_atomic_recipe(recipe_file)
#recipe <- prepare_outputs(recipe_file)
# Load datasets
data <- Loading(recipe)
data <- Units(recipe, data)
data_summary(data$hcst, recipe)
data_summary(data$obs, recipe)


source("full_crossval_anomalies.R")
res <- full_crossval_anomalies(recipe = recipe, data = data)

source("skill_full_crossval.R")
skill_metrics <- skill_full_crossval(recipe = recipe, data_crossval = res,
                                fair = FALSE, nmemb = NULL, nmemb_ref = NULL) 

Visualization(recipe = recipe, data = data, skill_metrics = skill_metrics, significance = TRUE)

## Check logo size is appropiated for your maps:
source("tools/add_logo.R")
add_logo(recipe, "rsz_rsz_bsc_logo.png")


