From 8dbd827528f13eecf3906214e1c221bdb1cdd81a Mon Sep 17 00:00:00 2001 From: Chihchung Chou Date: Mon, 19 Apr 2021 04:59:25 +0200 Subject: [PATCH 1/4] editing DESCRIPTION --- DESCRIPTION | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DESCRIPTION b/DESCRIPTION index 18a9d22..1a4826f 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -3,7 +3,7 @@ Title: Sectorial Indicators for Climate Services from Sub-Seasonal Forecast to D Version: 0.0.1 Authors@R: c( person("Nuria", "Perez-Zanon", , "nuria.perez@bsc.es", role = c("aut", "cre"), comment = c(ORCID = "0000-0001-8568-3071"))) -Description: The package contains the definition-based computation of the sectoral indicators for the Climate Service. +Description: The first package in the Climate Forecast Analysis Tools Framework which is designed specifically for indicator computation across sectors namely agriculture, renewable energy and air quality, as well as for the time scales from sub-seasonal, seasonal to decadal. Taking the advantage of the multiApply package, the high efficiency and multi-core feature which are applied here partly solve the memory-demanding and error-prone post-processings. This package was developed in the context of the H2020 project MEDGOLD. Depends: R (>= 3.6.0) Imports: -- GitLab From 36770b75d1c4878cce0271b5b378aa9fcc852d52 Mon Sep 17 00:00:00 2001 From: Raul Date: Mon, 3 May 2021 15:36:12 +0000 Subject: [PATCH 2/4] Update DESCRIPTION --- DESCRIPTION | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/DESCRIPTION b/DESCRIPTION index 1a4826f..28c11bd 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,9 +1,9 @@ Package: CSIndicators -Title: Sectorial Indicators for Climate Services from Sub-Seasonal Forecast to Decadal Predictions +Title: Sectoral Indicators for Climate Services based on Sub-Seasonal to Decadal Climate Predictions Version: 0.0.1 Authors@R: c( person("Nuria", "Perez-Zanon", , "nuria.perez@bsc.es", role = c("aut", "cre"), comment = c(ORCID = "0000-0001-8568-3071"))) -Description: The first package in the Climate Forecast Analysis Tools Framework which is designed specifically for indicator computation across sectors namely agriculture, renewable energy and air quality, as well as for the time scales from sub-seasonal, seasonal to decadal. Taking the advantage of the multiApply package, the high efficiency and multi-core feature which are applied here partly solve the memory-demanding and error-prone post-processings. This package was developed in the context of the H2020 project MEDGOLD. +Description: Set of generalised tools for the flexible computation of climate related indicators defined by the user. Each method represents a specific mathematical approach which is combined with the possibility to select an arbitrary time period to define the indicator. This enables a wide range of possibilities to tailor the most suitable indicator for each particular climate service application (agriculture, food security, energy, water management…). This package is intended for sub-seasonal, seasonal and decadal climate predictions, but its methods are also applicable to other time-scales, provided the dimensional structure of the input is maintained. Additionally, the outputs of the functions in this package are compatible with CSTools. This package was developed in the context of H2020 MED-GOLD (776467) and S2S4E (776787) projects. Depends: R (>= 3.6.0) Imports: -- GitLab From d38634a79c3e6aa745a5feb47a2e81c6b651c62a Mon Sep 17 00:00:00 2001 From: nperez Date: Tue, 4 May 2021 09:43:04 +0200 Subject: [PATCH 3/4] Reduce example size --- R/PeriodMean.R | 1 + R/QThreshold.R | 4 ++-- R/TotalTimeExceedingThreshold.R | 2 +- man/CST_PeriodMean.Rd | 1 + man/CST_TotalTimeExceedingThreshold.Rd | 2 +- man/QThreshold.Rd | 4 ++-- 6 files changed, 8 insertions(+), 6 deletions(-) diff --git a/R/PeriodMean.R b/R/PeriodMean.R index c63c5f0..fa3af03 100644 --- a/R/PeriodMean.R +++ b/R/PeriodMean.R @@ -19,6 +19,7 @@ #' #'@examples #'exp <- CSTools::lonlat_data$exp +#'exp$data <- CSTools::lonlat_data$exp$data[1, , 3, , 1, 1] #'SA <- CST_PeriodMean(exp) #' #'@export diff --git a/R/QThreshold.R b/R/QThreshold.R index 9549b93..067c495 100644 --- a/R/QThreshold.R +++ b/R/QThreshold.R @@ -104,8 +104,8 @@ CST_QThreshold <- function(data, threshold, start = NULL, end = NULL, #'@importFrom ClimProjDiags Subset #'@examples #'threshold = 25 -#'data <- array(rnorm(25 * 3 * 20 * 2, mean = 26), -#' c(member = 25, sdate = 3, time = 20, lon = 2)) +#'data <- array(rnorm(5 * 3 * 20 * 2, mean = 26), +#' c(member = 5, sdate = 3, time = 20, lon = 2)) #'thres_q <- QThreshold(data, threshold) #'@export QThreshold <- function(data, threshold, dates = NULL, start = NULL, end = NULL, diff --git a/R/TotalTimeExceedingThreshold.R b/R/TotalTimeExceedingThreshold.R index 84d829c..3792caf 100644 --- a/R/TotalTimeExceedingThreshold.R +++ b/R/TotalTimeExceedingThreshold.R @@ -27,7 +27,7 @@ #'@import multiApply #'@examples #'exp <- CSTools::lonlat_data$exp -#'exp$data <- CSTools::lonlat_data$exp$data[1, 5, 3, 3, 1, 1] +#'exp$data <- CSTools::lonlat_data$exp$data[1, 1, 3, 3, 1, 1] #'DOT <- CST_TotalTimeExceedingThreshold(exp, threshold = 280) #'@export CST_TotalTimeExceedingThreshold <- function(data, threshold, op = '>', diff --git a/man/CST_PeriodMean.Rd b/man/CST_PeriodMean.Rd index 95b4a36..1beefc5 100644 --- a/man/CST_PeriodMean.Rd +++ b/man/CST_PeriodMean.Rd @@ -38,6 +38,7 @@ Providing temperature data, two agriculture indices can be obtain by using this } \examples{ exp <- CSTools::lonlat_data$exp +exp$data <- CSTools::lonlat_data$exp$data[1, , 3, , 1, 1] SA <- CST_PeriodMean(exp) } diff --git a/man/CST_TotalTimeExceedingThreshold.Rd b/man/CST_TotalTimeExceedingThreshold.Rd index 50124fe..e1d3c7d 100644 --- a/man/CST_TotalTimeExceedingThreshold.Rd +++ b/man/CST_TotalTimeExceedingThreshold.Rd @@ -51,6 +51,6 @@ Providing maximum temperature daily data, the following agriculture indices for } \examples{ exp <- CSTools::lonlat_data$exp -exp$data <- CSTools::lonlat_data$exp$data[1, 5, 3, 3, 1, 1] +exp$data <- CSTools::lonlat_data$exp$data[1, 1, 3, 3, 1, 1] DOT <- CST_TotalTimeExceedingThreshold(exp, threshold = 280) } diff --git a/man/QThreshold.Rd b/man/QThreshold.Rd index 8f55bad..ff4900e 100644 --- a/man/QThreshold.Rd +++ b/man/QThreshold.Rd @@ -52,7 +52,7 @@ The sample used will depend on the dimensions of the data provided and the dimen } \examples{ threshold = 25 -data <- array(rnorm(25 * 3 * 20 * 2, mean = 26), - c(member = 25, sdate = 3, time = 20, lon = 2)) +data <- array(rnorm(5 * 3 * 20 * 2, mean = 26), + c(member = 5, sdate = 3, time = 20, lon = 2)) thres_q <- QThreshold(data, threshold) } -- GitLab From 60375a50b52a7784d206239a7bbc46345c121d20 Mon Sep 17 00:00:00 2001 From: nperez Date: Tue, 4 May 2021 09:54:04 +0200 Subject: [PATCH 4/4] add BSC as cph --- DESCRIPTION | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/DESCRIPTION b/DESCRIPTION index e75c11a..f8939a9 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -2,11 +2,12 @@ Package: CSIndicators Title: Sectoral Indicators for Climate Services Based on Sub-Seasonal to Decadal Climate Predictions Version: 0.0.1 Authors@R: c( - person("Núria", "Pérez-Zanón", , "nuria.perez@bsc.es", role = c("aut", "cre"), comment = c(ORCID = "0000-0001-8568-3071")), + person("Nuria", "Perez-Zanon", , "nuria.perez@bsc.es", role = c("aut", "cre"), comment = c(ORCID = "0000-0001-8568-3071")), person("Chou", "Chihchung", ,"chihchung.chou@bsc.es", role = "aut"), person("Llorenç", "Lledó", , "llorenc.lledo@bsc.es", role = "aut"), person("González-Reviriego", "Nube", , "nube.gonzalez@bsc.es", role = "ctb"), - person("Marcos", "Raül", , "raul.marcos@bsc.es", role = "ctb")) + person("Marcos", "Raül", , "raul.marcos@bsc.es", role = "ctb"), + person("BSC-CNS", role = "cph")) Description: Set of generalised tools for the flexible computation of climate related indicators defined by the user. Each method represents a specific mathematical approach which is combined with the possibility to select an arbitrary time period to define the indicator. This enables a wide range of possibilities to tailor the most suitable indicator for each particular climate service application (agriculture, food security, energy, water management…). This package is intended for sub-seasonal, seasonal and decadal climate predictions, but its methods are also applicable to other time-scales, provided the dimensional structure of the input is maintained. Additionally, the outputs of the functions in this package are compatible with CSTools. This package was developed in the context of H2020 MED-GOLD (776467) and S2S4E (776787) projects. Depends: R (>= 3.6.0) -- GitLab