
source("modules/Loading/Loading.R")
source("modules/Units/Units.R")
source("modules/Anomalies/Anomalies.R")

recipe_file <- "recipe_NAO_scorecards_atomic.yml"
recipe <- prepare_outputs(recipe_file)

data <- Loading(recipe)
data <- Units(recipe = recipe, data = data)

data_summary(data$hcst, recipe = recipe)
data_summary(data$obs, recipe = recipe)

PlotEquiMap(data$hcst$data
source("modules/Aggregation/Aggregation.R")
data2 <- Aggregation(recipe = recipe, data = data)

source("modules/Indices/R/plot_deterministic_forecast.R")
plot_deterministic_forecast(obs = data2$obs$data,
                            fcst = data2$hcst$data, style = 'boxplot',
                            time_dim = 'syear', member_dim = 'ensemble',
                            ylims = c(1010, 1020),
                            ylab = 'SLP (hPa)',
                            xlabs = 1993:2016,
                            title = 'Weighted mean NAO region',
                            fileout = 'testpsl.png')
data3 <- Anomalies(data = data2, recipe = recipe)
plot_deterministic_forecast(obs = data3$obs$data,
                            fcst = data3$hcst$data, style = 'boxplot',
                            time_dim = 'syear', member_dim = 'ensemble',
                            ylab = 'Anomalies SLP (hPa)',
                            xlabs = 1993:2016,
                            title = 'Weighted mean NAO region',
                            fileout = 'testpsl.png')





