From 9cfc7983270144f84b0771b01f2e8957a95d0396 Mon Sep 17 00:00:00 2001 From: Mengqi Zhao Date: Mon, 19 Feb 2024 09:48:15 -0800 Subject: [PATCH] Fix the name for scenario selection --- R/diagnostics.R | 2 +- inst/extras/dev_tests.R | 12 ++++++++++++ 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/R/diagnostics.R b/R/diagnostics.R index 72c5758..b679d3b 100644 --- a/R/diagnostics.R +++ b/R/diagnostics.R @@ -321,7 +321,7 @@ diagnostics <- function(hdcd_segment = tibble::tibble(), noaa_name <- paste('NOAA', noaa_year_i, sep = '-') } else { - scenario_sel <- paste('ncdf_', year_i) + scenario_sel <- paste0('ncdf_', year_i) } # filter year and format for plotting diff --git a/inst/extras/dev_tests.R b/inst/extras/dev_tests.R index 4f72c8b..2152138 100644 --- a/inst/extras/dev_tests.R +++ b/inst/extras/dev_tests.R @@ -228,3 +228,15 @@ helios::diagnostics( folder = file.path(getwd(), 'output'), name_append = 'combined_hdhcdh_monthly_us49' ) + +# Test diagnostics with NERSC output on monthly HDHCDH at Gridregion +hdhcdh_gridregion <- data.table::fread( + 'C:/WorkSpace/IM3/helios/hddcdd/nersc/combined_outputs_hdcd_rcp45cooler_ssp3/combined_hdhcdh_2020_2099_monthly_gridregion.csv' +) + +helios::diagnostics( + hdcd_monthly = hdhcdh_gridregion, + min_diagnostic_months = 6, + folder = file.path(getwd(), 'output'), + name_append = 'combined_hdhcdh_monthly_gridregion' +)