From ffc471fccf9d2c953fcfcb8c0db548e903b1f528 Mon Sep 17 00:00:00 2001 From: ARIADNA BATALLA FERRES Date: Wed, 9 Apr 2025 17:56:52 +0200 Subject: [PATCH] Update forecast_map name in Visualization.R and rpss outfile name in plot_extreme_probs.R --- modules/Visualization/R/plot_extreme_probs.R | 4 ++-- modules/Visualization/Visualization.R | 14 +++++++------- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/modules/Visualization/R/plot_extreme_probs.R b/modules/Visualization/R/plot_extreme_probs.R index d0d38e5d..39e7a7e5 100644 --- a/modules/Visualization/R/plot_extreme_probs.R +++ b/modules/Visualization/R/plot_extreme_probs.R @@ -176,7 +176,7 @@ plot_extreme_probs <- function(recipe, fcst, "-", i_syear) # Mask if (!is.null(mask)) { - outfile <- paste0(outfile, "_enscormask") + outfile <- paste0(outfile, "_rpssmask") var_mask <- ClimProjDiags::Subset(mask, along = c("var"), indices = list(var), @@ -189,7 +189,7 @@ plot_extreme_probs <- function(recipe, fcst, } # Dots if (!is.null(dots)) { - outfile <- paste0(outfile, "_enscordots") + outfile <- paste0(outfile, "_rpssdots") var_dots <- ClimProjDiags::Subset(dots, along = c("var"), indices = var, diff --git a/modules/Visualization/Visualization.R b/modules/Visualization/Visualization.R index 8c8ee629..398d8445 100644 --- a/modules/Visualization/Visualization.R +++ b/modules/Visualization/Visualization.R @@ -143,7 +143,7 @@ Visualization <- function(recipe, } } - # Plot forecast ensemble mean + # Plot forecast map if ("forecast_map" %in% plots) { if (!is.null(data$fcst)) { if (is.null(recipe$Analysis$Workflow$Visualization$mask_ens)) { @@ -173,11 +173,11 @@ Visualization <- function(recipe, c('both', TRUE)) { if (is.null(skill_metrics)) { error(recipe$Run$logger, - paste0("For the forecast ensemble mean plot, skill_metrics ", + paste0("For the forecast map plot, skill_metrics ", "needs to be provided to be masked.")) } else if (!('enscorr' %in% names(skill_metrics))) { error(recipe$Run$logger, - paste0("For the forecast ensemble mean plot, enscor metric ", + paste0("For the forecast map plot, enscor metric ", "needs to be provided to be masked.")) } else { plot_forecast_map(recipe, data$fcst, @@ -192,11 +192,11 @@ Visualization <- function(recipe, if (recipe$Analysis$Workflow$Visualization$dots %in% c('both', TRUE)) { if (is.null(skill_metrics)) { error(recipe$Run$logger, - paste0("For the forecast ensemble mean plot, skill_metrics ", + paste0("For the forecast map plot, skill_metrics ", "needs to be provided for the dots.")) } else if (!('enscorr' %in% names(skill_metrics))) { error(recipe$Run$logger, - paste0("For the forecast ensemble mean plot, enscor metric ", + paste0("For the forecast map plot, enscor metric ", "needs to be provided for the dots.")) } else { plot_forecast_map(recipe, data$fcst, @@ -210,7 +210,7 @@ Visualization <- function(recipe, } ## End loop over methods } else { error(recipe$Run$logger, - paste0("The forecast ensemble mean plot has been requested, but ", + paste0("The forecast map plot has been requested, but ", "there is no fcst element in 'data'.")) } } @@ -327,7 +327,7 @@ Visualization <- function(recipe, } else if (!('rpss' %in% names(skill_metrics))) { error(recipe$Run$logger, paste0("For the extreme probabilities plot, rpss metric ", - "need to be provided to be masked.")) + "needs to be provided to be masked.")) } else { plot_extreme_probs(recipe = recipe, fcst = data$fcst, probabilities = probabilities$fcst, -- GitLab