source("modules/Loading/Loading.R")
source("modules/Units/Units.R")
source("modules/Preprocessing/Preprocessing.R")
source("modules/Calibration/Calibration.R")
source("modules/Anomalies/Anomalies.R")
source("modules/Skill/Skill.R")
source("modules/Indices/Indices.R")
source("modules/Saving/Saving.R")
source("modules/Visualization/Visualization.R")
source("build_compute_workflow.R")

recipe_file <- "recipes/atomic_recipes/recipe_test_compute_decadal.yml"
# recipe_file <- "recipes/atomic_recipes/recipe_test_compute_decadal_daily.yml"
recipe <- prepare_outputs(recipe_file)

# Load datasets
data <- Loading(recipe, retrieve = F)

# Run workflow with compute
result <- run_compute_workflow(recipe, data)

# Plot data
Visualization(recipe, data = result$data, skill_metrics = result$skill,
 	      significance = T)
