From 69218a6f88d1c6851086bd74de3dc9fb0b641a8d Mon Sep 17 00:00:00 2001 From: eliotmcintire Date: Fri, 13 Dec 2024 14:51:50 -0800 Subject: [PATCH 1/5] TODO: improve use of cache --- canClimateData.R | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/canClimateData.R b/canClimateData.R index ee93805..488562b 100644 --- a/canClimateData.R +++ b/canClimateData.R @@ -181,7 +181,7 @@ Init <- function(sim) { rasterToMatch = sim$rasterToMatch, currentModuleName = "canClimateData" ) |> - Cache(omitArgs = c("climatePath", "climatePathOut")) ## TODO: improve use of cache + Cache(omitArgs = c("climatePath", "climatePathOut"), useCloud = Par$.useCloud) ## TODO: improve use of cache ## rename list elements and layers to match expected names downstream names(climateRasters) <- names(sim$climateVariables) From e4ff4d8bc02b6c07c0c6c812df08e55e088fe5a7 Mon Sep 17 00:00:00 2001 From: Eliot McIntire Date: Tue, 27 May 2025 14:03:28 -0700 Subject: [PATCH 2/5] studyArea is an output --- canClimateData.R | 2 ++ 1 file changed, 2 insertions(+) diff --git a/canClimateData.R b/canClimateData.R index 488562b..f445af7 100644 --- a/canClimateData.R +++ b/canClimateData.R @@ -95,6 +95,8 @@ defineModule(sim, list( sourceURL = NA) ), outputObjects = bindrows( + createsOutput("studyArea", "sf", + desc = "adds a column, studyAreaName"), createsOutput("historicalClimateRasters", "list", desc = "list of a single raster stack - historical MDC calculated from ClimateNA data"), createsOutput("projectedClimateRasters", "list", From b2e857146bb6435030bc122a7f835ca037ca308f Mon Sep 17 00:00:00 2001 From: Eliot McIntire Date: Tue, 27 May 2025 15:05:03 -0700 Subject: [PATCH 3/5] rm sim$studyArea$studyAreaName --- canClimateData.R | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/canClimateData.R b/canClimateData.R index ee93805..182ac80 100644 --- a/canClimateData.R +++ b/canClimateData.R @@ -161,7 +161,7 @@ Init <- function(sim) { digestSA_RTM <- .robustDigest(list(sim.studyArea = sim$studyArea, sim.rasterToMatch = sim$rasterToMatch)) - sim$studyArea$studyAreaName <- paste0(P(sim)$.studyAreaName, collapse = "_") ## makes it a data.frame + # sim$studyArea$studyAreaName <- paste0(P(sim)$.studyAreaName, collapse = "_") ## makes it a data.frame stopifnot(getOption("reproducible.useNewDigestAlgorithm") == 2) From a803786651ea0cb6ae36a23f7bb257e4ccb91865 Mon Sep 17 00:00:00 2001 From: Eliot McIntire Date: Tue, 27 May 2025 17:05:19 -0700 Subject: [PATCH 4/5] rm studyArea from createsOutput --- canClimateData.R | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/canClimateData.R b/canClimateData.R index 4e1a495..f956592 100644 --- a/canClimateData.R +++ b/canClimateData.R @@ -95,8 +95,8 @@ defineModule(sim, list( sourceURL = NA) ), outputObjects = bindrows( - createsOutput("studyArea", "sf", - desc = "adds a column, studyAreaName"), + # createsOutput("studyArea", "sf", + # desc = "adds a column, studyAreaName"), createsOutput("historicalClimateRasters", "list", desc = "list of a single raster stack - historical MDC calculated from ClimateNA data"), createsOutput("projectedClimateRasters", "list", From 8c2e26b928204e3b67ed86ee8b943144cb4563f1 Mon Sep 17 00:00:00 2001 From: Eliot McIntire Date: Fri, 11 Jul 2025 11:58:43 -0700 Subject: [PATCH 5/5] add link to help manual in module description --- canClimateData.R | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/canClimateData.R b/canClimateData.R index f956592..e878a48 100644 --- a/canClimateData.R +++ b/canClimateData.R @@ -2,7 +2,8 @@ defineModule(sim, list( name = "canClimateData", description = paste( "Prepares projected and historical climate data for fitting and predicting fires,", - "and calculating climate effects on forest growth and mortality." + "and calculating climate effects on forest growth and mortality. See ", + "https://climatena.ca/Help2#_var for list of available variables." ), keywords = "", authors = c(