From f260963762b6ec6db795d6904ebadf0a8592d33d Mon Sep 17 00:00:00 2001 From: biopsichas <svajunas.plunge@gmail.com> Date: Thu, 7 Nov 2024 13:11:24 +0200 Subject: [PATCH] warning msg for rhum in percentage --- R/plot_climate.R | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/R/plot_climate.R b/R/plot_climate.R index c6a5913..e168d5e 100644 --- a/R/plot_climate.R +++ b/R/plot_climate.R @@ -128,6 +128,13 @@ plot_climate_annual <- function(sim_verify) { rhum_mean = mean(rhum)) %>% pivot_longer(cols = -yr) + rhum_check <- unique(rhum_tbl$value[!is.na(rhum_tbl$value)]) + if(length(rhum_check) == 1 && rhum_check == 0.99){ + warning("Relative humidity model output is consistently 0.99. Please check the input data. + It is likely that your model input is in the wrong units. Relative humidity + input should be in fractional units (0-1), not percentage!") + } + gg_rhum <- ggplot() + geom_errorbarh(data = rhum_tbl, aes(xmax = yr + 0.5, xmin = yr - 0.5, y = value, height = 0, col = name), -- GitLab