From af614959ef8499aa0ca46853f3f08838eb755fe1 Mon Sep 17 00:00:00 2001 From: Chihchung Chou Date: Fri, 21 Feb 2020 11:18:44 +0100 Subject: [PATCH 1/5] parameter na.rm added to CST_BiasCorrection --- R/CST_BiasCorrection.R | 29 ++++++++++++++++++++--------- 1 file changed, 20 insertions(+), 9 deletions(-) diff --git a/R/CST_BiasCorrection.R b/R/CST_BiasCorrection.R index 89821dca..94ddebb9 100644 --- a/R/CST_BiasCorrection.R +++ b/R/CST_BiasCorrection.R @@ -5,6 +5,7 @@ #' #'@param exp an object of class \code{s2dv_cube} as returned by \code{CST_Load} function, containing the seasonal forecast experiment data in the element named \code{$data} #'@param obs an object of class \code{s2dv_cube} as returned by \code{CST_Load} function, containing the observed data in the element named \code{$data}. +#'@param na.rm a logical value indicating whether missing values should be stripped before the computation proceeds, by default it is set to FALSE. #' #'@return an object of class \code{s2dv_cube} containing the bias corrected forecasts in the element called \code{$data} with the same dimensions of the experimental data. #' @@ -30,7 +31,7 @@ #'a <- CST_BiasCorrection(exp = exp, obs = obs) #'str(a) #'@export -CST_BiasCorrection <- function(exp, obs) { +CST_BiasCorrection <- function(exp, obs, na.rm = FALSE) { if (!inherits(exp, 's2dv_cube') || !inherits(obs, 's2dv_cube')) { stop("Parameter 'exp' and 'obs' must be of the class 's2dv_cube', ", "as output by CSTools::CST_Load.") @@ -41,7 +42,7 @@ CST_BiasCorrection <- function(exp, obs) { "of the parameter 'obs' must be equal to 1.") } dimnames <- names(dim(exp$data)) - BiasCorrected <- BiasCorrection(exp = exp$data, obs = obs$data) + BiasCorrected <- BiasCorrection(exp = exp$data, obs = obs$data, na.rm = na.rm) pos <- match(dimnames, names(dim(BiasCorrected))) BiasCorrected <- aperm(BiasCorrected, pos) names(dim(BiasCorrected)) <- dimnames @@ -51,7 +52,7 @@ CST_BiasCorrection <- function(exp, obs) { return(exp) } -BiasCorrection <- function (exp, obs) { +BiasCorrection <- function (exp, obs , na.rm = FALSE) { if (!all(c('member', 'sdate') %in% names(dim(exp)))) { stop("Parameter 'exp' must have the dimensions 'member' and 'sdate'.") @@ -69,6 +70,16 @@ BiasCorrection <- function (exp, obs) { warning("Parameter 'obs' contains NA values.") } + if (!is.logical(na.rm)) { + na.rm <- FALSE + warning("Paramater 'na.rm' must be a logical, it has been set to FALSE.") + } + + if (length(na.rm)>1) { + na.rm <- na.rm[1] + warning("Paramter 'na.rm' has length greater than 1, and only the fist element is used.") + } + target_dims_obs <- 'sdate' if ('member' %in% names(dim(obs))) { target_dims_obs <- c('member', target_dims_obs) @@ -76,11 +87,11 @@ BiasCorrection <- function (exp, obs) { BiasCorrected <- Apply(data = list(var_obs = obs, var_exp = exp), target_dims = list(target_dims_obs, c('member', 'sdate')), - fun = .sbc)$output1 + fun = .sbc , na.rm = na.rm)$output1 return(BiasCorrected) } -.sbc <- function(var_obs, var_exp) { +.sbc <- function(var_obs, var_exp , na.rm = FALSE) { nmembers <- dim(var_exp)['member'][] ntime <- dim(var_exp)['sdate'][] if (all(names(dim(var_exp)) != c('member','sdate'))) { @@ -96,10 +107,10 @@ BiasCorrection <- function (exp, obs) { obs <- var_obs[-t] # parameters - sd_obs <- sd(obs) - sd_exp <- sd(hcst) - clim_exp <- mean(hcst) - clim_obs <- mean(obs) + sd_obs <- sd(obs , na.rm = na.rm) + sd_exp <- sd(hcst , na.rm = na.rm)) + clim_exp <- mean(hcst , na.rm = na.rm)) + clim_obs <- mean(obs , na.rm = na.rm)) # bias corrected forecast corrected[ , t] <- ((fcst - clim_exp) * (sd_obs / sd_exp)) + clim_obs -- GitLab From 31aa1d090253019131eb3d578756c0748a8f41f2 Mon Sep 17 00:00:00 2001 From: Chihchung Chou Date: Fri, 21 Feb 2020 12:17:17 +0100 Subject: [PATCH 2/5] small bugfix for CST_BiasCorrection.R --- R/CST_BiasCorrection.R | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/R/CST_BiasCorrection.R b/R/CST_BiasCorrection.R index 94ddebb9..1da7fb5b 100644 --- a/R/CST_BiasCorrection.R +++ b/R/CST_BiasCorrection.R @@ -108,9 +108,9 @@ BiasCorrection <- function (exp, obs , na.rm = FALSE) { # parameters sd_obs <- sd(obs , na.rm = na.rm) - sd_exp <- sd(hcst , na.rm = na.rm)) - clim_exp <- mean(hcst , na.rm = na.rm)) - clim_obs <- mean(obs , na.rm = na.rm)) + sd_exp <- sd(hcst , na.rm = na.rm) + clim_exp <- mean(hcst , na.rm = na.rm) + clim_obs <- mean(obs , na.rm = na.rm) # bias corrected forecast corrected[ , t] <- ((fcst - clim_exp) * (sd_obs / sd_exp)) + clim_obs -- GitLab From 76bf67fa9cbcb26406e597086ee95b5636f22cb7 Mon Sep 17 00:00:00 2001 From: Chihchung Chou Date: Thu, 5 Mar 2020 12:07:39 +0100 Subject: [PATCH 3/5] document about CST_BiasCorrectionNA updated --- DESCRIPTION | 2 +- man/Analogs.Rd | 25 +++++++-------------- man/BEI_PDFBest.Rd | 20 ++++++----------- man/BEI_Weights.Rd | 7 +++--- man/CST_Analogs.Rd | 20 ++++++----------- man/CST_Anomaly.Rd | 10 +++++---- man/CST_BEI_Weighting.Rd | 16 +++++--------- man/CST_BiasCorrection.Rd | 11 ++++++---- man/CST_Calibration.Rd | 19 ++++++---------- man/CST_CategoricalEnsCombination.Rd | 17 +++++--------- man/CST_EnsClustering.Rd | 17 +++++--------- man/CST_Load.Rd | 1 + man/CST_MergeDims.Rd | 9 +++----- man/CST_MultiEOF.Rd | 11 +++------- man/CST_MultiMetric.Rd | 9 ++++---- man/CST_MultivarRMSE.Rd | 7 +++--- man/CST_QuantileMapping.Rd | 20 ++++++----------- man/CST_RFSlope.Rd | 1 + man/CST_RFWeights.Rd | 7 +++--- man/CST_RainFARM.Rd | 24 ++++++-------------- man/CST_SaveExp.Rd | 7 +++--- man/CST_SplitDim.Rd | 1 + man/Calibration.Rd | 20 ++++++----------- man/EnsClustering.Rd | 19 +++++----------- man/MergeDims.Rd | 9 +++----- man/MultiEOF.Rd | 17 ++++---------- man/PlotCombinedMap.Rd | 33 ++++++++-------------------- man/PlotForecastPDF.Rd | 17 +++++--------- man/PlotMostLikelyQuantileMap.Rd | 18 +++++---------- man/RFSlope.Rd | 4 +++- man/RainFARM.Rd | 23 +++++-------------- man/SplitDim.Rd | 1 + man/areave_data.Rd | 1 + man/as.s2dv_cube.Rd | 7 +++--- man/lonlat_data.Rd | 1 + man/lonlat_prec.Rd | 1 + man/s2dv_cube.Rd | 19 +++++----------- 37 files changed, 165 insertions(+), 286 deletions(-) diff --git a/DESCRIPTION b/DESCRIPTION index 2c87e147..19d0b720 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -70,4 +70,4 @@ VignetteBuilder: knitr License: Apache License 2.0 Encoding: UTF-8 LazyData: true -RoxygenNote: 7.0.2 +RoxygenNote: 5.0.0 diff --git a/man/Analogs.Rd b/man/Analogs.Rd index 06107c07..ee8a737e 100644 --- a/man/Analogs.Rd +++ b/man/Analogs.Rd @@ -4,19 +4,9 @@ \alias{Analogs} \title{Analogs based on large scale fields.} \usage{ -Analogs( - expL, - obsL, - time_obsL, - expVar = NULL, - obsVar = NULL, - criteria = "Large_dist", - lonVar = NULL, - latVar = NULL, - region = NULL, - nAnalogs = NULL, - return_list = FALSE -) +Analogs(expL, obsL, time_obsL, expVar = NULL, obsVar = NULL, + criteria = "Large_dist", lonVar = NULL, latVar = NULL, region = NULL, + nAnalogs = NULL, return_list = FALSE) } \arguments{ \item{expL}{an array of N named dimensions containing the experimental field @@ -387,6 +377,11 @@ Local_scalecor <- Analogs(expL=expSLP, str(Local_scalecor) Local_scalecor$AnalogsInfo +} +\author{ +M. Carmen Alvarez-Castro, \email{carmen.alvarez-castro@cmcc.it} + +Nuria Perez-Zanon \email{nuria.perez@bsc.es} } \references{ Yiou, P., T. Salameh, P. Drobinski, L. Menut, R. Vautard, @@ -394,8 +389,4 @@ and M. Vrac, 2013 : Ensemble reconstruction of the atmospheric column from surface pressure using analogues. Clim. Dyn., 41, 1419-1437. \email{pascal.yiou@lsce.ipsl.fr} } -\author{ -M. Carmen Alvarez-Castro, \email{carmen.alvarez-castro@cmcc.it} -Nuria Perez-Zanon \email{nuria.perez@bsc.es} -} diff --git a/man/BEI_PDFBest.Rd b/man/BEI_PDFBest.Rd index 0ba24a84..f836ab72 100644 --- a/man/BEI_PDFBest.Rd +++ b/man/BEI_PDFBest.Rd @@ -4,16 +4,9 @@ \alias{BEI_PDFBest} \title{Computing the Best Index PDFs combining Index PDFs from two SFSs} \usage{ -BEI_PDFBest( - index_obs, - index_hind1, - index_hind2, - index_fcst1 = NULL, - index_fcst2 = NULL, - method_BC = "none", - time_dim_name = "time", - na.rm = FALSE -) +BEI_PDFBest(index_obs, index_hind1, index_hind2, index_fcst1 = NULL, + index_fcst2 = NULL, method_BC = "none", time_dim_name = "time", + na.rm = FALSE) } \arguments{ \item{index_obs}{Index (e.g. NAO index) array from an observational database @@ -120,11 +113,12 @@ dim(res) # time statistic season # 1 2 2 } +\author{ +Eroteida Sanchez-Garcia - AEMET, \email{esanchezg@aemet.es} +} \references{ Regionally improved seasonal forecast of precipitation through Best estimation of winter NAO, Sanchez-Garcia, E. et al., Adv. Sci. Res., 16, 165174, 2019, https://doi.org/10.5194/asr-16-165-2019 } -\author{ -Eroteida Sanchez-Garcia - AEMET, \email{esanchezg@aemet.es} -} + diff --git a/man/BEI_Weights.Rd b/man/BEI_Weights.Rd index 867a4eb0..61db33af 100644 --- a/man/BEI_Weights.Rd +++ b/man/BEI_Weights.Rd @@ -43,12 +43,13 @@ dim(res) # sdate dataset member season # 10 3 5 1 +} +\author{ +Eroteida Sanchez-Garcia - AEMET, \email{esanchezg@aemet.es} } \references{ Regionally improved seasonal forecast of precipitation through Best estimation of winter NAO, Sanchez-Garcia, E. et al., Adv. Sci. Res., 16, 165174, 2019, https://doi.org/10.5194/asr-16-165-2019 } -\author{ -Eroteida Sanchez-Garcia - AEMET, \email{esanchezg@aemet.es} -} + diff --git a/man/CST_Analogs.Rd b/man/CST_Analogs.Rd index d7dd5e14..7c9a1e6f 100644 --- a/man/CST_Analogs.Rd +++ b/man/CST_Analogs.Rd @@ -4,15 +4,8 @@ \alias{CST_Analogs} \title{Downscaling using Analogs based on large scale fields.} \usage{ -CST_Analogs( - expL, - obsL, - time_obsL, - expVar = NULL, - obsVar = NULL, - region = NULL, - criteria = "Large_dist" -) +CST_Analogs(expL, obsL, time_obsL, expVar = NULL, obsVar = NULL, + region = NULL, criteria = "Large_dist") } \arguments{ \item{expL}{an 's2dv_cube' object containing the experimental field on the @@ -88,6 +81,11 @@ adapted version of the method of Yiou et al 2013. \examples{ res <- CST_Analogs(expL = lonlat_data$exp, obsL = lonlat_data$obs) +} +\author{ +M. Carmen Alvarez-Castro, \email{carmen.alvarez-castro@cmcc.it} + +Nuria Perez-Zanon \email{nuria.perez@bsc.es} } \references{ Yiou, P., T. Salameh, P. Drobinski, L. Menut, R. Vautard, @@ -99,8 +97,4 @@ from surface pressure using analogues. Clim. Dyn., 41, 1419-1437. code{\link{CST_Load}}, \code{\link[s2dverification]{Load}} and \code{\link[s2dverification]{CDORemap}} } -\author{ -M. Carmen Alvarez-Castro, \email{carmen.alvarez-castro@cmcc.it} -Nuria Perez-Zanon \email{nuria.perez@bsc.es} -} diff --git a/man/CST_Anomaly.Rd b/man/CST_Anomaly.Rd index 07691ea7..e1c31f0c 100644 --- a/man/CST_Anomaly.Rd +++ b/man/CST_Anomaly.Rd @@ -4,7 +4,8 @@ \alias{CST_Anomaly} \title{Anomalies relative to a climatology along selected dimension with or without cross-validation} \usage{ -CST_Anomaly(exp = NULL, obs = NULL, cross = FALSE, memb = TRUE, dim_anom = 3) +CST_Anomaly(exp = NULL, obs = NULL, cross = FALSE, memb = TRUE, + dim_anom = 3) } \arguments{ \item{exp}{an object of class \code{s2dv_cube} as returned by \code{CST_Load} function, containing the seasonal forecast experiment data in the element named \code{$data}.} @@ -52,12 +53,13 @@ str(anom3) anom4 <- CST_Anomaly(exp = exp, obs = obs, cross = FALSE, memb = FALSE) str(anom4) -} -\seealso{ -\code{\link[s2dverification]{Ano_CrossValid}}, \code{\link[s2dverification]{Clim}} and \code{\link{CST_Load}} } \author{ Perez-Zanon Nuria, \email{nuria.perez@bsc.es} Pena Jesus, \email{jesus.pena@bsc.es} } +\seealso{ +\code{\link[s2dverification]{Ano_CrossValid}}, \code{\link[s2dverification]{Clim}} and \code{\link{CST_Load}} +} + diff --git a/man/CST_BEI_Weighting.Rd b/man/CST_BEI_Weighting.Rd index d6f65bb5..0e60a356 100644 --- a/man/CST_BEI_Weighting.Rd +++ b/man/CST_BEI_Weighting.Rd @@ -4,13 +4,8 @@ \alias{CST_BEI_Weighting} \title{Weighting SFSs of a CSTools object.} \usage{ -CST_BEI_Weighting( - var_exp, - aweights, - terciles = NULL, - type = "ensembleMean", - time_dim_name = "time" -) +CST_BEI_Weighting(var_exp, aweights, terciles = NULL, type = "ensembleMean", + time_dim_name = "time") } \arguments{ \item{var_exp}{An object of the class 's2dv_cube' containing the variable @@ -73,11 +68,12 @@ dim(res_CST$data) # time lat lon dataset # 2 3 2 2 } +\author{ +Eroteida Sanchez-Garcia - AEMET, \email{esanchezg@aemet.es} +} \references{ Regionally improved seasonal forecast of precipitation through Best estimation of winter NAO, Sanchez-Garcia, E. et al., Adv. Sci. Res., 16, 165174, 2019, https://doi.org/10.5194/asr-16-165-2019 } -\author{ -Eroteida Sanchez-Garcia - AEMET, \email{esanchezg@aemet.es} -} + diff --git a/man/CST_BiasCorrection.Rd b/man/CST_BiasCorrection.Rd index a1b415fb..3a8fa4b6 100644 --- a/man/CST_BiasCorrection.Rd +++ b/man/CST_BiasCorrection.Rd @@ -4,12 +4,14 @@ \alias{CST_BiasCorrection} \title{Bias Correction based on the mean and standard deviation adjustment} \usage{ -CST_BiasCorrection(exp, obs) +CST_BiasCorrection(exp, obs, na.rm = FALSE) } \arguments{ \item{exp}{an object of class \code{s2dv_cube} as returned by \code{CST_Load} function, containing the seasonal forecast experiment data in the element named \code{$data}} \item{obs}{an object of class \code{s2dv_cube} as returned by \code{CST_Load} function, containing the observed data in the element named \code{$data}.} + +\item{na.rm}{a logical value indicating whether missing values should be stripped before the computation proceeds, by default it is set to FALSE.} } \value{ an object of class \code{s2dv_cube} containing the bias corrected forecasts in the element called \code{$data} with the same dimensions of the experimental data. @@ -35,9 +37,10 @@ attr(obs, 'class') <- 's2dv_cube' a <- CST_BiasCorrection(exp = exp, obs = obs) str(a) } -\references{ -Torralba, V., F.J. Doblas-Reyes, D. MacLeod, I. Christel and M. Davis (2017). Seasonal climate prediction: a new source of information for the management of wind energy resources. Journal of Applied Meteorology and Climatology, 56, 1231-1247, doi:10.1175/JAMC-D-16-0204.1. (CLIM4ENERGY, EUPORIAS, NEWA, RESILIENCE, SPECS) -} \author{ Verónica Torralba, \email{veronica.torralba@bsc.es} } +\references{ +Torralba, V., F.J. Doblas-Reyes, D. MacLeod, I. Christel and M. Davis (2017). Seasonal climate prediction: a new source of information for the management of wind energy resources. Journal of Applied Meteorology and Climatology, 56, 1231-1247, doi:10.1175/JAMC-D-16-0204.1. (CLIM4ENERGY, EUPORIAS, NEWA, RESILIENCE, SPECS) +} + diff --git a/man/CST_Calibration.Rd b/man/CST_Calibration.Rd index 891e2e5f..ed880aab 100644 --- a/man/CST_Calibration.Rd +++ b/man/CST_Calibration.Rd @@ -4,15 +4,9 @@ \alias{CST_Calibration} \title{Forecast Calibration} \usage{ -CST_Calibration( - exp, - obs, - cal.method = "mse_min", - eval.method = "leave-one-out", - multi.model = F, - na.fill = T, - ncores = 1 -) +CST_Calibration(exp, obs, cal.method = "mse_min", + eval.method = "leave-one-out", multi.model = F, na.fill = T, + ncores = 1) } \arguments{ \item{exp}{an object of class \code{s2dv_cube} as returned by \code{CST_Load} function, containing the seasonal forecast experiment data in the element named \code{$data}.} @@ -50,11 +44,12 @@ attr(obs, 'class') <- 's2dv_cube' a <- CST_Calibration(exp = exp, obs = obs, cal.method = "mse_min", eval.method = "in-sample") str(a) } -\seealso{ -\code{\link{CST_Load}} -} \author{ Verónica Torralba, \email{veronica.torralba@bsc.es} Bert Van Schaeybroeck, \email{bertvs@meteo.be} } +\seealso{ +\code{\link{CST_Load}} +} + diff --git a/man/CST_CategoricalEnsCombination.Rd b/man/CST_CategoricalEnsCombination.Rd index c23f8341..e551c3ec 100644 --- a/man/CST_CategoricalEnsCombination.Rd +++ b/man/CST_CategoricalEnsCombination.Rd @@ -4,14 +4,8 @@ \alias{CST_CategoricalEnsCombination} \title{Make categorical forecast based on a multi-model forecast with potential for calibrate} \usage{ -CST_CategoricalEnsCombination( - exp, - obs, - cat.method = "pool", - eval.method = "leave-one-out", - amt.cat = 3, - ... -) +CST_CategoricalEnsCombination(exp, obs, cat.method = "pool", + eval.method = "leave-one-out", amt.cat = 3, ...) } \arguments{ \item{exp}{an object of class \code{s2dv_cube} as returned by \code{CST_Load} function, containing the seasonal forecast experiment data in the element named \code{$data}. The amount of forecasting models is equal to the size of the \code{dataset} dimension of the data array. The amount of members per model may be different. The size of the \code{member} dimension of the data array is equal to the maximum of the ensemble members among the models. Models with smaller ensemble sizes have residual indices of \code{member} dimension in the data array filled with NA values.} @@ -89,6 +83,9 @@ attr(obs, 'class') <- 's2dv_cube' a <- CST_CategoricalEnsCombination(exp = exp, obs = obs, amt.cat = 3, cat.method = "mmw") } } +\author{ +Bert Van Schaeybroeck, \email{bertvs@meteo.be} +} \references{ Rajagopalan, B., Lall, U., & Zebiak, S. E. (2002). Categorical climate forecasts through regularization and optimal combination of multiple GCM ensembles. Monthly Weather Review, 130(7), 1792-1811. @@ -96,6 +93,4 @@ Robertson, A. W., Lall, U., Zebiak, S. E., & Goddard, L. (2004). Improved combin Van Schaeybroeck, B., & Vannitsem, S. (2019). Postprocessing of Long-Range Forecasts. In Statistical Postprocessing of Ensemble Forecasts (pp. 267-290). } -\author{ -Bert Van Schaeybroeck, \email{bertvs@meteo.be} -} + diff --git a/man/CST_EnsClustering.Rd b/man/CST_EnsClustering.Rd index 154541d5..c13bf205 100644 --- a/man/CST_EnsClustering.Rd +++ b/man/CST_EnsClustering.Rd @@ -4,18 +4,10 @@ \alias{CST_EnsClustering} \title{Ensemble clustering} \usage{ -CST_EnsClustering( - exp, - time_moment = "mean", - numclus = NULL, - lon_lim = NULL, - lat_lim = NULL, - variance_explained = 80, - numpcs = NULL, - time_percentile = 90, - cluster_dim = "member", - verbose = F -) +CST_EnsClustering(exp, time_moment = "mean", numclus = NULL, + lon_lim = NULL, lat_lim = NULL, variance_explained = 80, + numpcs = NULL, time_percentile = 90, cluster_dim = "member", + verbose = F) } \arguments{ \item{exp}{An object of the class 's2dv_cube', containing the variables to be analysed. @@ -133,3 +125,4 @@ Paolo Davini - ISAC-CNR, \email{p.davini@isac.cnr.it} Jost von Hardenberg - ISAC-CNR, \email{j.vonhardenberg@isac.cnr.it} } + diff --git a/man/CST_Load.Rd b/man/CST_Load.Rd index bf03ba42..1fee022c 100644 --- a/man/CST_Load.Rd +++ b/man/CST_Load.Rd @@ -47,3 +47,4 @@ obs <- CSTools::lonlat_data$obs \author{ Nicolau Manubens, \email{nicolau.manubens@bsc.es} } + diff --git a/man/CST_MergeDims.Rd b/man/CST_MergeDims.Rd index 0762e83f..449e011e 100644 --- a/man/CST_MergeDims.Rd +++ b/man/CST_MergeDims.Rd @@ -4,12 +4,8 @@ \alias{CST_MergeDims} \title{Function to Merge Dimensions} \usage{ -CST_MergeDims( - data, - merge_dims = c("ftime", "monthly"), - rename_dim = NULL, - na.rm = FALSE -) +CST_MergeDims(data, merge_dims = c("ftime", "monthly"), rename_dim = NULL, + na.rm = FALSE) } \arguments{ \item{data}{a 's2dv_cube' object} @@ -42,3 +38,4 @@ dim(new_data$data) \author{ Nuria Perez-Zanon, \email{nuria.perez@bsc.es} } + diff --git a/man/CST_MultiEOF.Rd b/man/CST_MultiEOF.Rd index 036a6470..fb584751 100644 --- a/man/CST_MultiEOF.Rd +++ b/man/CST_MultiEOF.Rd @@ -4,14 +4,8 @@ \alias{CST_MultiEOF} \title{EOF analysis of multiple variables} \usage{ -CST_MultiEOF( - datalist, - neof_max = 40, - neof_composed = 5, - minvar = 0.6, - lon_lim = NULL, - lat_lim = NULL -) +CST_MultiEOF(datalist, neof_max = 40, neof_composed = 5, minvar = 0.6, + lon_lim = NULL, lat_lim = NULL) } \arguments{ \item{datalist}{A list of objects of the class 's2dv_cube', containing the variables to be analysed. @@ -75,3 +69,4 @@ Jost von Hardenberg - ISAC-CNR, \email{j.vonhardenberg@isac.cnr.it} Paolo Davini - ISAC-CNR, \email{p.davini@isac.cnr.it} } + diff --git a/man/CST_MultiMetric.Rd b/man/CST_MultiMetric.Rd index 8e3ce593..079a5588 100644 --- a/man/CST_MultiMetric.Rd +++ b/man/CST_MultiMetric.Rd @@ -37,14 +37,15 @@ c(ano_exp, ano_obs) \%<-\% CST_Anomaly(exp = exp, obs = obs, cross = TRUE, memb a <- CST_MultiMetric(exp = ano_exp, obs = ano_obs) str(a) } +\author{ +Mishra Niti, \email{niti.mishra@bsc.es} + +Perez-Zanon Nuria, \email{nuria.perez@bsc.es} +} \references{ Mishra, N., Prodhomme, C., & Guemas, V. (n.d.). Multi-Model Skill Assessment of Seasonal Temperature and Precipitation Forecasts over Europe, 29-31.\url{http://link.springer.com/10.1007/s00382-018-4404-z} } \seealso{ \code{\link[s2dverification]{Corr}}, \code{\link[s2dverification]{RMS}}, \code{\link[s2dverification]{RMSSS}} and \code{\link{CST_Load}} } -\author{ -Mishra Niti, \email{niti.mishra@bsc.es} -Perez-Zanon Nuria, \email{nuria.perez@bsc.es} -} diff --git a/man/CST_MultivarRMSE.Rd b/man/CST_MultivarRMSE.Rd index 24af608c..685eaf77 100644 --- a/man/CST_MultivarRMSE.Rd +++ b/man/CST_MultivarRMSE.Rd @@ -56,9 +56,10 @@ weight <- c(1, 2) a <- CST_MultivarRMSE(exp = ano_exp, obs = ano_obs, weight = weight) str(a) } -\seealso{ -\code{\link[s2dverification]{RMS}} and \code{\link{CST_Load}} -} \author{ Deborah Verfaillie, \email{deborah.verfaillie@bsc.es} } +\seealso{ +\code{\link[s2dverification]{RMS}} and \code{\link{CST_Load}} +} + diff --git a/man/CST_QuantileMapping.Rd b/man/CST_QuantileMapping.Rd index ad8f4b6c..1c93843e 100644 --- a/man/CST_QuantileMapping.Rd +++ b/man/CST_QuantileMapping.Rd @@ -4,16 +4,9 @@ \alias{CST_QuantileMapping} \title{Quantiles Mapping for seasonal or decadal forecast data} \usage{ -CST_QuantileMapping( - exp, - obs, - exp_cor = NULL, - sample_dims = c("sdate", "ftime", "member"), - sample_length = NULL, - method = "QUANT", - ncores = NULL, - ... -) +CST_QuantileMapping(exp, obs, exp_cor = NULL, sample_dims = c("sdate", + "ftime", "member"), sample_length = NULL, method = "QUANT", + ncores = NULL, ...) } \arguments{ \item{exp}{an object of class \code{s2dv_cube}} @@ -84,9 +77,10 @@ res <- CST_QuantileMapping(exp = exp, obs = obs, sample_dims = 'time', method = 'DIST') } } -\seealso{ -\code{\link[qmap]{fitQmap}} and \code{\link[qmap]{doQmap}} -} \author{ Nuria Perez-Zanon, \email{nuria.perez@bsc.es} } +\seealso{ +\code{\link[qmap]{fitQmap}} and \code{\link[qmap]{doQmap}} +} + diff --git a/man/CST_RFSlope.Rd b/man/CST_RFSlope.Rd index 0c4e1671..d2b5aec0 100644 --- a/man/CST_RFSlope.Rd +++ b/man/CST_RFSlope.Rd @@ -50,3 +50,4 @@ slopes \author{ Jost von Hardenberg - ISAC-CNR, \email{j.vonhardenberg@isac.cnr.it} } + diff --git a/man/CST_RFWeights.Rd b/man/CST_RFWeights.Rd index ef5ebe4d..08a7b850 100644 --- a/man/CST_RFWeights.Rd +++ b/man/CST_RFWeights.Rd @@ -47,6 +47,9 @@ nf <- 8 ww <- CST_RFWeights("./worldclim.nc", nf, lon, lat, fsmooth = TRUE) } } +\author{ +Jost von Hardenberg - ISAC-CNR, \email{j.vonhardenberg@isac.cnr.it} +} \references{ Terzago, S., Palazzi, E., & von Hardenberg, J. (2018). Stochastic downscaling of precipitation in complex orography: @@ -54,6 +57,4 @@ A simple method to reproduce a realistic fine-scale climatology. Natural Hazards and Earth System Sciences, 18(11), 2825-2840. http://doi.org/10.5194/nhess-18-2825-2018 . } -\author{ -Jost von Hardenberg - ISAC-CNR, \email{j.vonhardenberg@isac.cnr.it} -} + diff --git a/man/CST_RainFARM.Rd b/man/CST_RainFARM.Rd index 1c609e08..4a667f9a 100644 --- a/man/CST_RainFARM.Rd +++ b/man/CST_RainFARM.Rd @@ -4,20 +4,9 @@ \alias{CST_RainFARM} \title{RainFARM stochastic precipitation downscaling of a CSTools object} \usage{ -CST_RainFARM( - data, - nf, - weights = 1, - slope = 0, - kmin = 1, - nens = 1, - fglob = FALSE, - fsmooth = TRUE, - nprocs = 1, - time_dim = NULL, - verbose = FALSE, - drop_realization_dim = FALSE -) +CST_RainFARM(data, nf, weights = 1, slope = 0, kmin = 1, nens = 1, + fglob = FALSE, fsmooth = TRUE, nprocs = 1, time_dim = NULL, + verbose = FALSE, drop_realization_dim = FALSE) } \arguments{ \item{data}{An object of the class 's2dv_cube' as returned by `CST_Load`, @@ -106,12 +95,13 @@ dim(res$data) # dataset member realization sdate ftime lat lon # 1 2 3 3 4 64 64 +} +\author{ +Jost von Hardenberg - ISAC-CNR, \email{j.vonhardenberg@isac.cnr.it} } \references{ Terzago, S. et al. (2018). NHESS 18(11), 2825-2840. http://doi.org/10.5194/nhess-18-2825-2018 ; D'Onofrio et al. (2014), J of Hydrometeorology 15, 830-843; Rebora et. al. (2006), JHM 7, 724. } -\author{ -Jost von Hardenberg - ISAC-CNR, \email{j.vonhardenberg@isac.cnr.it} -} + diff --git a/man/CST_SaveExp.Rd b/man/CST_SaveExp.Rd index 0e49c119..17537205 100644 --- a/man/CST_SaveExp.Rd +++ b/man/CST_SaveExp.Rd @@ -29,10 +29,11 @@ destination <- "./path/" CST_SaveExp(data = data, destination = destination) } -} -\seealso{ -\code{\link{CST_Load}}, \code{\link{as.s2dv_cube}} and \code{\link{s2dv_cube}} } \author{ Perez-Zanon Nuria, \email{nuria.perez@bsc.es} } +\seealso{ +\code{\link{CST_Load}}, \code{\link{as.s2dv_cube}} and \code{\link{s2dv_cube}} +} + diff --git a/man/CST_SplitDim.Rd b/man/CST_SplitDim.Rd index ee93aedc..2019ea7b 100644 --- a/man/CST_SplitDim.Rd +++ b/man/CST_SplitDim.Rd @@ -43,3 +43,4 @@ dim(new_data$data) \author{ Nuria Perez-Zanon, \email{nuria.perez@bsc.es} } + diff --git a/man/Calibration.Rd b/man/Calibration.Rd index 9f884671..4290abd7 100644 --- a/man/Calibration.Rd +++ b/man/Calibration.Rd @@ -4,15 +4,8 @@ \alias{Calibration} \title{Forecast Calibration} \usage{ -Calibration( - exp, - obs, - cal.method = "mse_min", - eval.method = "leave-one-out", - multi.model = F, - na.fill = T, - ncores = 1 -) +Calibration(exp, obs, cal.method = "mse_min", eval.method = "leave-one-out", + multi.model = F, na.fill = T, ncores = 1) } \arguments{ \item{exp}{an array containing the seasonal forecast experiment data.} @@ -37,6 +30,11 @@ Four types of member-by-member bias correction can be performed. The \code{bias} Both in-sample or our out-of-sample (leave-one-out cross validation) calibration are possible. } +\author{ +Verónica Torralba, \email{veronica.torralba@bsc.es} + +Bert Van Schaeybroeck, \email{bertvs@meteo.be} +} \references{ Doblas-Reyes F.J, Hagedorn R, Palmer T.N. The rationale behind the success of multi-model ensembles in seasonal forecasting-II calibration and combination. Tellus A. 2005;57:234-252. doi:10.1111/j.1600-0870.2005.00104.x @@ -47,8 +45,4 @@ Van Schaeybroeck, B., & Vannitsem, S. (2015). Ensemble post-processing using mem \seealso{ \code{\link{CST_Load}} } -\author{ -Verónica Torralba, \email{veronica.torralba@bsc.es} -Bert Van Schaeybroeck, \email{bertvs@meteo.be} -} diff --git a/man/EnsClustering.Rd b/man/EnsClustering.Rd index 2fd8a3f1..27aca453 100644 --- a/man/EnsClustering.Rd +++ b/man/EnsClustering.Rd @@ -4,20 +4,10 @@ \alias{EnsClustering} \title{Ensemble clustering} \usage{ -EnsClustering( - data, - lat, - lon, - time_moment = "mean", - numclus = NULL, - lon_lim = NULL, - lat_lim = NULL, - variance_explained = 80, - numpcs = NULL, - time_percentile = 90, - cluster_dim = "member", - verbose = T -) +EnsClustering(data, lat, lon, time_moment = "mean", numclus = NULL, + lon_lim = NULL, lat_lim = NULL, variance_explained = 80, + numpcs = NULL, time_percentile = 90, cluster_dim = "member", + verbose = T) } \arguments{ \item{data}{A matrix of dimensions 'dataset member sdate ftime lat lon' containing the variables to be analysed.} @@ -77,3 +67,4 @@ Paolo Davini - ISAC-CNR, \email{p.davini@isac.cnr.it} Jost von Hardenberg - ISAC-CNR, \email{j.vonhardenberg@isac.cnr.it} } + diff --git a/man/MergeDims.Rd b/man/MergeDims.Rd index 7539ef6e..585049e8 100644 --- a/man/MergeDims.Rd +++ b/man/MergeDims.Rd @@ -4,12 +4,8 @@ \alias{MergeDims} \title{Function to Split Dimension} \usage{ -MergeDims( - data, - merge_dims = c("time", "monthly"), - rename_dim = NULL, - na.rm = FALSE -) +MergeDims(data, merge_dims = c("time", "monthly"), rename_dim = NULL, + na.rm = FALSE) } \arguments{ \item{data}{an n-dimensional array with named dimensions} @@ -32,3 +28,4 @@ new_data <- MergeDims(data, merge_dims = c('time', 'lat')) \author{ Nuria Perez-Zanon, \email{nuria.perez@bsc.es} } + diff --git a/man/MultiEOF.Rd b/man/MultiEOF.Rd index dd0fc7fe..1e822fc4 100644 --- a/man/MultiEOF.Rd +++ b/man/MultiEOF.Rd @@ -4,19 +4,9 @@ \alias{MultiEOF} \title{EOF analysis of multiple variables starting from an array (reduced version)} \usage{ -MultiEOF( - data, - lon, - lat, - time, - lon_dim = "lon", - lat_dim = "lat", - neof_max = 40, - neof_composed = 5, - minvar = 0.6, - lon_lim = NULL, - lat_lim = NULL -) +MultiEOF(data, lon, lat, time, lon_dim = "lon", lat_dim = "lat", + neof_max = 40, neof_composed = 5, minvar = 0.6, lon_lim = NULL, + lat_lim = NULL) } \arguments{ \item{data}{A multidimensional array with dimension \code{"var"}, @@ -56,3 +46,4 @@ Jost von Hardenberg - ISAC-CNR, \email{j.vonhardenberg@isac.cnr.it} Paolo Davini - ISAC-CNR, \email{p.davini@isac.cnr.it} } + diff --git a/man/PlotCombinedMap.Rd b/man/PlotCombinedMap.Rd index 616b84f9..6857c64d 100644 --- a/man/PlotCombinedMap.Rd +++ b/man/PlotCombinedMap.Rd @@ -4,27 +4,11 @@ \alias{PlotCombinedMap} \title{Plot Multiple Lon-Lat Variables In a Single Map According to a Decision Function} \usage{ -PlotCombinedMap( - maps, - lon, - lat, - map_select_fun, - display_range, - map_dim = "map", - brks = NULL, - cols = NULL, - col_unknown_map = "white", - mask = NULL, - col_mask = "grey", - bar_titles = NULL, - legend_scale = 1, - fileout = NULL, - width = 8, - height = 5, - size_units = "in", - res = 100, - ... -) +PlotCombinedMap(maps, lon, lat, map_select_fun, display_range, + map_dim = "map", brks = NULL, cols = NULL, col_unknown_map = "white", + mask = NULL, col_mask = "grey", bar_titles = NULL, legend_scale = 1, + fileout = NULL, width = 8, height = 5, size_units = "in", res = 100, + ...) } \arguments{ \item{maps}{List of matrices to plot, each with (longitude, latitude) dimensions, or 3-dimensional array with the dimensions (longitude, latitude, map). Dimension names are required.} @@ -83,11 +67,12 @@ PlotCombinedMap(list(a, b, c), lons, lats, bar_titles = paste('\% of belonging to', c('a', 'b', 'c')), brks = 20, width = 10, height = 8) } -\seealso{ -\code{PlotCombinedMap} and \code{PlotEquiMap} -} \author{ Nicolau Manubens, \email{nicolau.manubens@bsc.es} Veronica Torralba, \email{veronica.torralba@bsc.es} } +\seealso{ +\code{PlotCombinedMap} and \code{PlotEquiMap} +} + diff --git a/man/PlotForecastPDF.Rd b/man/PlotForecastPDF.Rd index c04b43c1..d7b95b08 100644 --- a/man/PlotForecastPDF.Rd +++ b/man/PlotForecastPDF.Rd @@ -4,18 +4,10 @@ \alias{PlotForecastPDF} \title{Plot one or multiple ensemble forecast pdfs for the same event} \usage{ -PlotForecastPDF( - fcst, - tercile.limits, - extreme.limits = NULL, - obs = NULL, - plotfile = NULL, - title = "Set a title", - var.name = "Varname (units)", - fcst.names = NULL, - add.ensmemb = c("above", "below", "no"), - color.set = c("ggplot", "s2s4e", "hydro") -) +PlotForecastPDF(fcst, tercile.limits, extreme.limits = NULL, obs = NULL, + plotfile = NULL, title = "Set a title", var.name = "Varname (units)", + fcst.names = NULL, add.ensmemb = c("above", "below", "no"), + color.set = c("ggplot", "s2s4e", "hydro")) } \arguments{ \item{fcst}{a dataframe or array containing all the ensember members for each forecast. If \code{'fcst'} is an array, it should have two labelled dimensions, and one of them should be \code{'members'}. If \code{'fcsts'} is a data.frame, each column shoul be a separate forecast, with the rows beeing the different ensemble members.} @@ -57,3 +49,4 @@ PlotForecastPDF(fcsts2, c(-0.66, 0.66), extreme.limits = c(-1.2, 1.2), \author{ Llorenç Lledó \email{llledo@bsc.es} } + diff --git a/man/PlotMostLikelyQuantileMap.Rd b/man/PlotMostLikelyQuantileMap.Rd index 4c400b18..6c92850e 100644 --- a/man/PlotMostLikelyQuantileMap.Rd +++ b/man/PlotMostLikelyQuantileMap.Rd @@ -4,15 +4,8 @@ \alias{PlotMostLikelyQuantileMap} \title{Plot Maps of Most Likely Quantiles} \usage{ -PlotMostLikelyQuantileMap( - probs, - lon, - lat, - cat_dim = "bin", - bar_titles = NULL, - col_unknown_cat = "white", - ... -) +PlotMostLikelyQuantileMap(probs, lon, lat, cat_dim = "bin", + bar_titles = NULL, col_unknown_cat = "white", ...) } \arguments{ \item{probs}{a list of bi-dimensional arrays with the named dimensions 'latitude' (or 'lat') and 'longitude' (or 'lon'), with equal size and in the same order, or a single tri-dimensional array with an additional dimension (e.g. 'bin') for the different categories. The arrays must contain probability values between 0 and 1, and the probabilities for all categories of a grid cell should not exceed 1 when added.} @@ -116,10 +109,11 @@ PlotMostLikelyQuantileMap(bins, lons, lats, mask = 1 - (w1 + w2 / max(c(w1, w2))), brks = 20, width = 10, height = 8) -} -\seealso{ -\code{PlotCombinedMap} and \code{PlotEquiMap} } \author{ Veronica Torralba, \email{veronica.torralba@bsc.es}, Nicolau Manubens, \email{nicolau.manubens@bsc.es} } +\seealso{ +\code{PlotCombinedMap} and \code{PlotEquiMap} +} + diff --git a/man/RFSlope.Rd b/man/RFSlope.Rd index db3f0e10..09a24ff5 100644 --- a/man/RFSlope.Rd +++ b/man/RFSlope.Rd @@ -4,7 +4,8 @@ \alias{RFSlope} \title{RainFARM spectral slopes from an array (reduced version)} \usage{ -RFSlope(data, kmin = 1, time_dim = NULL, lon_dim = "lon", lat_dim = "lat") +RFSlope(data, kmin = 1, time_dim = NULL, lon_dim = "lon", + lat_dim = "lat") } \arguments{ \item{data}{Array containing the spatial precipitation fields to downscale. @@ -59,3 +60,4 @@ slopes \author{ Jost von Hardenberg - ISAC-CNR, \email{j.vonhardenberg@isac.cnr.it} } + diff --git a/man/RainFARM.Rd b/man/RainFARM.Rd index 0db84679..984dcd42 100644 --- a/man/RainFARM.Rd +++ b/man/RainFARM.Rd @@ -4,24 +4,10 @@ \alias{RainFARM} \title{RainFARM stochastic precipitation downscaling (reduced version)} \usage{ -RainFARM( - data, - lon, - lat, - nf, - weights = 1, - nens = 1, - slope = 0, - kmin = 1, - fglob = FALSE, - fsmooth = TRUE, - nprocs = 1, - time_dim = NULL, - lon_dim = "lon", - lat_dim = "lat", - drop_realization_dim = FALSE, - verbose = FALSE -) +RainFARM(data, lon, lat, nf, weights = 1, nens = 1, slope = 0, kmin = 1, + fglob = FALSE, fsmooth = TRUE, nprocs = 1, time_dim = NULL, + lon_dim = "lon", lat_dim = "lat", drop_realization_dim = FALSE, + verbose = FALSE) } \arguments{ \item{data}{Precipitation array to downscale. @@ -131,3 +117,4 @@ dim(res$data) \author{ Jost von Hardenberg - ISAC-CNR, \email{j.vonhardenberg@isac.cnr.it} } + diff --git a/man/SplitDim.Rd b/man/SplitDim.Rd index f07e4756..e36aa8a5 100644 --- a/man/SplitDim.Rd +++ b/man/SplitDim.Rd @@ -35,3 +35,4 @@ new_data <- SplitDim(data, indices = time, freq = 'year') \author{ Nuria Perez-Zanon, \email{nuria.perez@bsc.es} } + diff --git a/man/areave_data.Rd b/man/areave_data.Rd index a772220a..cc79c85c 100644 --- a/man/areave_data.Rd +++ b/man/areave_data.Rd @@ -41,3 +41,4 @@ areave_data <- Nicolau Manubens \email{nicolau.manubens@bsc.es} } \keyword{data} + diff --git a/man/as.s2dv_cube.Rd b/man/as.s2dv_cube.Rd index c2b8f3a8..13a2a296 100644 --- a/man/as.s2dv_cube.Rd +++ b/man/as.s2dv_cube.Rd @@ -40,11 +40,12 @@ data <- as.s2dv_cube(data) class(data) } } -\seealso{ -\code{\link{s2dv_cube}}, \code{\link[s2dverification]{Load}}, \code{\link[startR]{Start}} and \code{\link{CST_Load}} -} \author{ Perez-Zanon Nuria, \email{nuria.perez@bsc.es} Nicolau Manubens, \email{nicolau.manubens@bsc.es} } +\seealso{ +\code{\link{s2dv_cube}}, \code{\link[s2dverification]{Load}}, \code{\link[startR]{Start}} and \code{\link{CST_Load}} +} + diff --git a/man/lonlat_data.Rd b/man/lonlat_data.Rd index 0c6ee30f..eca7abac 100644 --- a/man/lonlat_data.Rd +++ b/man/lonlat_data.Rd @@ -41,3 +41,4 @@ lonlat_data <- Nicolau Manubens \email{nicolau.manubens@bsc.es} } \keyword{data} + diff --git a/man/lonlat_prec.Rd b/man/lonlat_prec.Rd index 345e3cab..69cb94e8 100644 --- a/man/lonlat_prec.Rd +++ b/man/lonlat_prec.Rd @@ -29,3 +29,4 @@ lonlat_prec <- CST_Load('prlr', exp = list(infile), obs = NULL, Jost von Hardenberg \email{j.vonhardenberg@isac.cnr.it} } \keyword{data} + diff --git a/man/s2dv_cube.Rd b/man/s2dv_cube.Rd index b0ce8966..48af7bbb 100644 --- a/man/s2dv_cube.Rd +++ b/man/s2dv_cube.Rd @@ -4,16 +4,8 @@ \alias{s2dv_cube} \title{Creation of a 's2dv_cube' object} \usage{ -s2dv_cube( - data, - lon = NULL, - lat = NULL, - Variable = NULL, - Datasets = NULL, - Dates = NULL, - when = NULL, - source_files = NULL -) +s2dv_cube(data, lon = NULL, lat = NULL, Variable = NULL, + Datasets = NULL, Dates = NULL, when = NULL, source_files = NULL) } \arguments{ \item{data}{an array with any number of named dimensions, typically an object output from CST_Load, with the following dimensions: dataset, member, sdate, ftime, lat and lon.} @@ -83,9 +75,10 @@ exp8 <- s2dv_cube(data = exp_original, lon = seq(-10, 10, 5), lat = c(45, 50), end = paste0(rep("31", 10), rep("01", 10), 1990:1999))) class(exp8) } -\seealso{ -\code{\link[s2dverification]{Load}} and \code{\link{CST_Load}} -} \author{ Perez-Zanon Nuria, \email{nuria.perez@bsc.es} } +\seealso{ +\code{\link[s2dverification]{Load}} and \code{\link{CST_Load}} +} + -- GitLab From b1ad3d13b225e3a49c8473e4676eecf7e25918dd Mon Sep 17 00:00:00 2001 From: nperez Date: Thu, 4 Jun 2020 14:41:11 +0200 Subject: [PATCH 4/5] run devtools to generate documentation --- DESCRIPTION | 2 +- man/Analogs.Rd | 25 ++++++++++++++------- man/BEI_PDFBest.Rd | 20 +++++++++++------ man/BEI_Weights.Rd | 7 +++--- man/CST_Analogs.Rd | 20 +++++++++++------ man/CST_Anomaly.Rd | 10 ++++----- man/CST_BEI_Weighting.Rd | 16 +++++++++----- man/CST_BiasCorrection.Rd | 7 +++--- man/CST_Calibration.Rd | 10 ++++----- man/CST_CategoricalEnsCombination.Rd | 17 +++++++++----- man/CST_EnsClustering.Rd | 4 ++-- man/CST_Load.Rd | 1 - man/CST_MergeDims.Rd | 9 +++++--- man/CST_MultiEOF.Rd | 11 +++++++--- man/CST_MultiMetric.Rd | 9 ++++---- man/CST_MultivarRMSE.Rd | 7 +++--- man/CST_QuantileMapping.Rd | 20 +++++++++++------ man/CST_RFSlope.Rd | 1 - man/CST_RFWeights.Rd | 7 +++--- man/CST_RainFARM.Rd | 24 ++++++++++++++------ man/CST_SaveExp.Rd | 7 +++--- man/CST_SplitDim.Rd | 1 - man/Calibration.Rd | 14 +++++------- man/EnsClustering.Rd | 4 ++-- man/MergeDims.Rd | 9 +++++--- man/MultiEOF.Rd | 17 ++++++++++---- man/PlotCombinedMap.Rd | 33 ++++++++++++++++++++-------- man/PlotForecastPDF.Rd | 17 +++++++++----- man/PlotMostLikelyQuantileMap.Rd | 18 ++++++++++----- man/RFSlope.Rd | 4 +--- man/RainFARM.Rd | 23 ++++++++++++++----- man/SplitDim.Rd | 1 - man/areave_data.Rd | 1 - man/as.s2dv_cube.Rd | 7 +++--- man/lonlat_data.Rd | 1 - man/lonlat_prec.Rd | 1 - man/s2dv_cube.Rd | 19 +++++++++++----- 37 files changed, 249 insertions(+), 155 deletions(-) diff --git a/DESCRIPTION b/DESCRIPTION index dd1e75d0..0492186b 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -71,4 +71,4 @@ VignetteBuilder: knitr License: Apache License 2.0 Encoding: UTF-8 LazyData: true -RoxygenNote: 5.0.0 +RoxygenNote: 7.0.2 diff --git a/man/Analogs.Rd b/man/Analogs.Rd index ee8a737e..06107c07 100644 --- a/man/Analogs.Rd +++ b/man/Analogs.Rd @@ -4,9 +4,19 @@ \alias{Analogs} \title{Analogs based on large scale fields.} \usage{ -Analogs(expL, obsL, time_obsL, expVar = NULL, obsVar = NULL, - criteria = "Large_dist", lonVar = NULL, latVar = NULL, region = NULL, - nAnalogs = NULL, return_list = FALSE) +Analogs( + expL, + obsL, + time_obsL, + expVar = NULL, + obsVar = NULL, + criteria = "Large_dist", + lonVar = NULL, + latVar = NULL, + region = NULL, + nAnalogs = NULL, + return_list = FALSE +) } \arguments{ \item{expL}{an array of N named dimensions containing the experimental field @@ -377,11 +387,6 @@ Local_scalecor <- Analogs(expL=expSLP, str(Local_scalecor) Local_scalecor$AnalogsInfo -} -\author{ -M. Carmen Alvarez-Castro, \email{carmen.alvarez-castro@cmcc.it} - -Nuria Perez-Zanon \email{nuria.perez@bsc.es} } \references{ Yiou, P., T. Salameh, P. Drobinski, L. Menut, R. Vautard, @@ -389,4 +394,8 @@ and M. Vrac, 2013 : Ensemble reconstruction of the atmospheric column from surface pressure using analogues. Clim. Dyn., 41, 1419-1437. \email{pascal.yiou@lsce.ipsl.fr} } +\author{ +M. Carmen Alvarez-Castro, \email{carmen.alvarez-castro@cmcc.it} +Nuria Perez-Zanon \email{nuria.perez@bsc.es} +} diff --git a/man/BEI_PDFBest.Rd b/man/BEI_PDFBest.Rd index f836ab72..0ba24a84 100644 --- a/man/BEI_PDFBest.Rd +++ b/man/BEI_PDFBest.Rd @@ -4,9 +4,16 @@ \alias{BEI_PDFBest} \title{Computing the Best Index PDFs combining Index PDFs from two SFSs} \usage{ -BEI_PDFBest(index_obs, index_hind1, index_hind2, index_fcst1 = NULL, - index_fcst2 = NULL, method_BC = "none", time_dim_name = "time", - na.rm = FALSE) +BEI_PDFBest( + index_obs, + index_hind1, + index_hind2, + index_fcst1 = NULL, + index_fcst2 = NULL, + method_BC = "none", + time_dim_name = "time", + na.rm = FALSE +) } \arguments{ \item{index_obs}{Index (e.g. NAO index) array from an observational database @@ -113,12 +120,11 @@ dim(res) # time statistic season # 1 2 2 } -\author{ -Eroteida Sanchez-Garcia - AEMET, \email{esanchezg@aemet.es} -} \references{ Regionally improved seasonal forecast of precipitation through Best estimation of winter NAO, Sanchez-Garcia, E. et al., Adv. Sci. Res., 16, 165174, 2019, https://doi.org/10.5194/asr-16-165-2019 } - +\author{ +Eroteida Sanchez-Garcia - AEMET, \email{esanchezg@aemet.es} +} diff --git a/man/BEI_Weights.Rd b/man/BEI_Weights.Rd index 61db33af..867a4eb0 100644 --- a/man/BEI_Weights.Rd +++ b/man/BEI_Weights.Rd @@ -43,13 +43,12 @@ dim(res) # sdate dataset member season # 10 3 5 1 -} -\author{ -Eroteida Sanchez-Garcia - AEMET, \email{esanchezg@aemet.es} } \references{ Regionally improved seasonal forecast of precipitation through Best estimation of winter NAO, Sanchez-Garcia, E. et al., Adv. Sci. Res., 16, 165174, 2019, https://doi.org/10.5194/asr-16-165-2019 } - +\author{ +Eroteida Sanchez-Garcia - AEMET, \email{esanchezg@aemet.es} +} diff --git a/man/CST_Analogs.Rd b/man/CST_Analogs.Rd index 7c9a1e6f..d7dd5e14 100644 --- a/man/CST_Analogs.Rd +++ b/man/CST_Analogs.Rd @@ -4,8 +4,15 @@ \alias{CST_Analogs} \title{Downscaling using Analogs based on large scale fields.} \usage{ -CST_Analogs(expL, obsL, time_obsL, expVar = NULL, obsVar = NULL, - region = NULL, criteria = "Large_dist") +CST_Analogs( + expL, + obsL, + time_obsL, + expVar = NULL, + obsVar = NULL, + region = NULL, + criteria = "Large_dist" +) } \arguments{ \item{expL}{an 's2dv_cube' object containing the experimental field on the @@ -81,11 +88,6 @@ adapted version of the method of Yiou et al 2013. \examples{ res <- CST_Analogs(expL = lonlat_data$exp, obsL = lonlat_data$obs) -} -\author{ -M. Carmen Alvarez-Castro, \email{carmen.alvarez-castro@cmcc.it} - -Nuria Perez-Zanon \email{nuria.perez@bsc.es} } \references{ Yiou, P., T. Salameh, P. Drobinski, L. Menut, R. Vautard, @@ -97,4 +99,8 @@ from surface pressure using analogues. Clim. Dyn., 41, 1419-1437. code{\link{CST_Load}}, \code{\link[s2dverification]{Load}} and \code{\link[s2dverification]{CDORemap}} } +\author{ +M. Carmen Alvarez-Castro, \email{carmen.alvarez-castro@cmcc.it} +Nuria Perez-Zanon \email{nuria.perez@bsc.es} +} diff --git a/man/CST_Anomaly.Rd b/man/CST_Anomaly.Rd index ce3bda65..365cbf46 100644 --- a/man/CST_Anomaly.Rd +++ b/man/CST_Anomaly.Rd @@ -4,8 +4,7 @@ \alias{CST_Anomaly} \title{Anomalies relative to a climatology along selected dimension with or without cross-validation} \usage{ -CST_Anomaly(exp = NULL, obs = NULL, cross = FALSE, memb = TRUE, - dim_anom = 3) +CST_Anomaly(exp = NULL, obs = NULL, cross = FALSE, memb = TRUE, dim_anom = 3) } \arguments{ \item{exp}{an object of class \code{s2dv_cube} as returned by \code{CST_Load} function, containing the seasonal forecast experiment data in the element named \code{$data}.} @@ -57,13 +56,12 @@ anom5 <- CST_Anomaly(lonlat_data$exp) anom6 <- CST_Anomaly(obs = lonlat_data$obs) +} +\seealso{ +\code{\link[s2dverification]{Ano_CrossValid}}, \code{\link[s2dverification]{Clim}} and \code{\link{CST_Load}} } \author{ Perez-Zanon Nuria, \email{nuria.perez@bsc.es} Pena Jesus, \email{jesus.pena@bsc.es} } -\seealso{ -\code{\link[s2dverification]{Ano_CrossValid}}, \code{\link[s2dverification]{Clim}} and \code{\link{CST_Load}} -} - diff --git a/man/CST_BEI_Weighting.Rd b/man/CST_BEI_Weighting.Rd index 0e60a356..d6f65bb5 100644 --- a/man/CST_BEI_Weighting.Rd +++ b/man/CST_BEI_Weighting.Rd @@ -4,8 +4,13 @@ \alias{CST_BEI_Weighting} \title{Weighting SFSs of a CSTools object.} \usage{ -CST_BEI_Weighting(var_exp, aweights, terciles = NULL, type = "ensembleMean", - time_dim_name = "time") +CST_BEI_Weighting( + var_exp, + aweights, + terciles = NULL, + type = "ensembleMean", + time_dim_name = "time" +) } \arguments{ \item{var_exp}{An object of the class 's2dv_cube' containing the variable @@ -68,12 +73,11 @@ dim(res_CST$data) # time lat lon dataset # 2 3 2 2 } -\author{ -Eroteida Sanchez-Garcia - AEMET, \email{esanchezg@aemet.es} -} \references{ Regionally improved seasonal forecast of precipitation through Best estimation of winter NAO, Sanchez-Garcia, E. et al., Adv. Sci. Res., 16, 165174, 2019, https://doi.org/10.5194/asr-16-165-2019 } - +\author{ +Eroteida Sanchez-Garcia - AEMET, \email{esanchezg@aemet.es} +} diff --git a/man/CST_BiasCorrection.Rd b/man/CST_BiasCorrection.Rd index 3a8fa4b6..55c325a2 100644 --- a/man/CST_BiasCorrection.Rd +++ b/man/CST_BiasCorrection.Rd @@ -37,10 +37,9 @@ attr(obs, 'class') <- 's2dv_cube' a <- CST_BiasCorrection(exp = exp, obs = obs) str(a) } -\author{ -Verónica Torralba, \email{veronica.torralba@bsc.es} -} \references{ Torralba, V., F.J. Doblas-Reyes, D. MacLeod, I. Christel and M. Davis (2017). Seasonal climate prediction: a new source of information for the management of wind energy resources. Journal of Applied Meteorology and Climatology, 56, 1231-1247, doi:10.1175/JAMC-D-16-0204.1. (CLIM4ENERGY, EUPORIAS, NEWA, RESILIENCE, SPECS) } - +\author{ +Verónica Torralba, \email{veronica.torralba@bsc.es} +} diff --git a/man/CST_Calibration.Rd b/man/CST_Calibration.Rd index e781545d..76812a43 100644 --- a/man/CST_Calibration.Rd +++ b/man/CST_Calibration.Rd @@ -11,7 +11,8 @@ CST_Calibration( eval.method = "leave-one-out", multi.model = FALSE, na.fill = TRUE, - ncores = 1) + ncores = 1 +) } \arguments{ \item{exp}{an object of class \code{s2dv_cube} as returned by \code{CST_Load} function, containing the seasonal forecast experiment data in the element named \code{$data}.} @@ -49,12 +50,11 @@ attr(obs, 'class') <- 's2dv_cube' a <- CST_Calibration(exp = exp, obs = obs, cal.method = "mse_min", eval.method = "in-sample") str(a) } +\seealso{ +\code{\link{CST_Load}} +} \author{ Verónica Torralba, \email{veronica.torralba@bsc.es} Bert Van Schaeybroeck, \email{bertvs@meteo.be} } -\seealso{ -\code{\link{CST_Load}} -} - diff --git a/man/CST_CategoricalEnsCombination.Rd b/man/CST_CategoricalEnsCombination.Rd index e551c3ec..c23f8341 100644 --- a/man/CST_CategoricalEnsCombination.Rd +++ b/man/CST_CategoricalEnsCombination.Rd @@ -4,8 +4,14 @@ \alias{CST_CategoricalEnsCombination} \title{Make categorical forecast based on a multi-model forecast with potential for calibrate} \usage{ -CST_CategoricalEnsCombination(exp, obs, cat.method = "pool", - eval.method = "leave-one-out", amt.cat = 3, ...) +CST_CategoricalEnsCombination( + exp, + obs, + cat.method = "pool", + eval.method = "leave-one-out", + amt.cat = 3, + ... +) } \arguments{ \item{exp}{an object of class \code{s2dv_cube} as returned by \code{CST_Load} function, containing the seasonal forecast experiment data in the element named \code{$data}. The amount of forecasting models is equal to the size of the \code{dataset} dimension of the data array. The amount of members per model may be different. The size of the \code{member} dimension of the data array is equal to the maximum of the ensemble members among the models. Models with smaller ensemble sizes have residual indices of \code{member} dimension in the data array filled with NA values.} @@ -83,9 +89,6 @@ attr(obs, 'class') <- 's2dv_cube' a <- CST_CategoricalEnsCombination(exp = exp, obs = obs, amt.cat = 3, cat.method = "mmw") } } -\author{ -Bert Van Schaeybroeck, \email{bertvs@meteo.be} -} \references{ Rajagopalan, B., Lall, U., & Zebiak, S. E. (2002). Categorical climate forecasts through regularization and optimal combination of multiple GCM ensembles. Monthly Weather Review, 130(7), 1792-1811. @@ -93,4 +96,6 @@ Robertson, A. W., Lall, U., Zebiak, S. E., & Goddard, L. (2004). Improved combin Van Schaeybroeck, B., & Vannitsem, S. (2019). Postprocessing of Long-Range Forecasts. In Statistical Postprocessing of Ensemble Forecasts (pp. 267-290). } - +\author{ +Bert Van Schaeybroeck, \email{bertvs@meteo.be} +} diff --git a/man/CST_EnsClustering.Rd b/man/CST_EnsClustering.Rd index aa87aca4..6ee79b7c 100644 --- a/man/CST_EnsClustering.Rd +++ b/man/CST_EnsClustering.Rd @@ -15,7 +15,8 @@ CST_EnsClustering( time_dim = NULL, time_percentile = 90, cluster_dim = "member", - verbose = F) + verbose = F +) } \arguments{ \item{exp}{An object of the class 's2dv_cube', containing the variables to be analysed. @@ -137,4 +138,3 @@ Paolo Davini - ISAC-CNR, \email{p.davini@isac.cnr.it} Jost von Hardenberg - ISAC-CNR, \email{j.vonhardenberg@isac.cnr.it} } - diff --git a/man/CST_Load.Rd b/man/CST_Load.Rd index 1fee022c..bf03ba42 100644 --- a/man/CST_Load.Rd +++ b/man/CST_Load.Rd @@ -47,4 +47,3 @@ obs <- CSTools::lonlat_data$obs \author{ Nicolau Manubens, \email{nicolau.manubens@bsc.es} } - diff --git a/man/CST_MergeDims.Rd b/man/CST_MergeDims.Rd index 449e011e..0762e83f 100644 --- a/man/CST_MergeDims.Rd +++ b/man/CST_MergeDims.Rd @@ -4,8 +4,12 @@ \alias{CST_MergeDims} \title{Function to Merge Dimensions} \usage{ -CST_MergeDims(data, merge_dims = c("ftime", "monthly"), rename_dim = NULL, - na.rm = FALSE) +CST_MergeDims( + data, + merge_dims = c("ftime", "monthly"), + rename_dim = NULL, + na.rm = FALSE +) } \arguments{ \item{data}{a 's2dv_cube' object} @@ -38,4 +42,3 @@ dim(new_data$data) \author{ Nuria Perez-Zanon, \email{nuria.perez@bsc.es} } - diff --git a/man/CST_MultiEOF.Rd b/man/CST_MultiEOF.Rd index fb584751..036a6470 100644 --- a/man/CST_MultiEOF.Rd +++ b/man/CST_MultiEOF.Rd @@ -4,8 +4,14 @@ \alias{CST_MultiEOF} \title{EOF analysis of multiple variables} \usage{ -CST_MultiEOF(datalist, neof_max = 40, neof_composed = 5, minvar = 0.6, - lon_lim = NULL, lat_lim = NULL) +CST_MultiEOF( + datalist, + neof_max = 40, + neof_composed = 5, + minvar = 0.6, + lon_lim = NULL, + lat_lim = NULL +) } \arguments{ \item{datalist}{A list of objects of the class 's2dv_cube', containing the variables to be analysed. @@ -69,4 +75,3 @@ Jost von Hardenberg - ISAC-CNR, \email{j.vonhardenberg@isac.cnr.it} Paolo Davini - ISAC-CNR, \email{p.davini@isac.cnr.it} } - diff --git a/man/CST_MultiMetric.Rd b/man/CST_MultiMetric.Rd index 079a5588..8e3ce593 100644 --- a/man/CST_MultiMetric.Rd +++ b/man/CST_MultiMetric.Rd @@ -37,15 +37,14 @@ c(ano_exp, ano_obs) \%<-\% CST_Anomaly(exp = exp, obs = obs, cross = TRUE, memb a <- CST_MultiMetric(exp = ano_exp, obs = ano_obs) str(a) } -\author{ -Mishra Niti, \email{niti.mishra@bsc.es} - -Perez-Zanon Nuria, \email{nuria.perez@bsc.es} -} \references{ Mishra, N., Prodhomme, C., & Guemas, V. (n.d.). Multi-Model Skill Assessment of Seasonal Temperature and Precipitation Forecasts over Europe, 29-31.\url{http://link.springer.com/10.1007/s00382-018-4404-z} } \seealso{ \code{\link[s2dverification]{Corr}}, \code{\link[s2dverification]{RMS}}, \code{\link[s2dverification]{RMSSS}} and \code{\link{CST_Load}} } +\author{ +Mishra Niti, \email{niti.mishra@bsc.es} +Perez-Zanon Nuria, \email{nuria.perez@bsc.es} +} diff --git a/man/CST_MultivarRMSE.Rd b/man/CST_MultivarRMSE.Rd index 685eaf77..24af608c 100644 --- a/man/CST_MultivarRMSE.Rd +++ b/man/CST_MultivarRMSE.Rd @@ -56,10 +56,9 @@ weight <- c(1, 2) a <- CST_MultivarRMSE(exp = ano_exp, obs = ano_obs, weight = weight) str(a) } -\author{ -Deborah Verfaillie, \email{deborah.verfaillie@bsc.es} -} \seealso{ \code{\link[s2dverification]{RMS}} and \code{\link{CST_Load}} } - +\author{ +Deborah Verfaillie, \email{deborah.verfaillie@bsc.es} +} diff --git a/man/CST_QuantileMapping.Rd b/man/CST_QuantileMapping.Rd index 1c93843e..ad8f4b6c 100644 --- a/man/CST_QuantileMapping.Rd +++ b/man/CST_QuantileMapping.Rd @@ -4,9 +4,16 @@ \alias{CST_QuantileMapping} \title{Quantiles Mapping for seasonal or decadal forecast data} \usage{ -CST_QuantileMapping(exp, obs, exp_cor = NULL, sample_dims = c("sdate", - "ftime", "member"), sample_length = NULL, method = "QUANT", - ncores = NULL, ...) +CST_QuantileMapping( + exp, + obs, + exp_cor = NULL, + sample_dims = c("sdate", "ftime", "member"), + sample_length = NULL, + method = "QUANT", + ncores = NULL, + ... +) } \arguments{ \item{exp}{an object of class \code{s2dv_cube}} @@ -77,10 +84,9 @@ res <- CST_QuantileMapping(exp = exp, obs = obs, sample_dims = 'time', method = 'DIST') } } -\author{ -Nuria Perez-Zanon, \email{nuria.perez@bsc.es} -} \seealso{ \code{\link[qmap]{fitQmap}} and \code{\link[qmap]{doQmap}} } - +\author{ +Nuria Perez-Zanon, \email{nuria.perez@bsc.es} +} diff --git a/man/CST_RFSlope.Rd b/man/CST_RFSlope.Rd index d2b5aec0..0c4e1671 100644 --- a/man/CST_RFSlope.Rd +++ b/man/CST_RFSlope.Rd @@ -50,4 +50,3 @@ slopes \author{ Jost von Hardenberg - ISAC-CNR, \email{j.vonhardenberg@isac.cnr.it} } - diff --git a/man/CST_RFWeights.Rd b/man/CST_RFWeights.Rd index 08a7b850..ef5ebe4d 100644 --- a/man/CST_RFWeights.Rd +++ b/man/CST_RFWeights.Rd @@ -47,9 +47,6 @@ nf <- 8 ww <- CST_RFWeights("./worldclim.nc", nf, lon, lat, fsmooth = TRUE) } } -\author{ -Jost von Hardenberg - ISAC-CNR, \email{j.vonhardenberg@isac.cnr.it} -} \references{ Terzago, S., Palazzi, E., & von Hardenberg, J. (2018). Stochastic downscaling of precipitation in complex orography: @@ -57,4 +54,6 @@ A simple method to reproduce a realistic fine-scale climatology. Natural Hazards and Earth System Sciences, 18(11), 2825-2840. http://doi.org/10.5194/nhess-18-2825-2018 . } - +\author{ +Jost von Hardenberg - ISAC-CNR, \email{j.vonhardenberg@isac.cnr.it} +} diff --git a/man/CST_RainFARM.Rd b/man/CST_RainFARM.Rd index 4a667f9a..1c609e08 100644 --- a/man/CST_RainFARM.Rd +++ b/man/CST_RainFARM.Rd @@ -4,9 +4,20 @@ \alias{CST_RainFARM} \title{RainFARM stochastic precipitation downscaling of a CSTools object} \usage{ -CST_RainFARM(data, nf, weights = 1, slope = 0, kmin = 1, nens = 1, - fglob = FALSE, fsmooth = TRUE, nprocs = 1, time_dim = NULL, - verbose = FALSE, drop_realization_dim = FALSE) +CST_RainFARM( + data, + nf, + weights = 1, + slope = 0, + kmin = 1, + nens = 1, + fglob = FALSE, + fsmooth = TRUE, + nprocs = 1, + time_dim = NULL, + verbose = FALSE, + drop_realization_dim = FALSE +) } \arguments{ \item{data}{An object of the class 's2dv_cube' as returned by `CST_Load`, @@ -95,13 +106,12 @@ dim(res$data) # dataset member realization sdate ftime lat lon # 1 2 3 3 4 64 64 -} -\author{ -Jost von Hardenberg - ISAC-CNR, \email{j.vonhardenberg@isac.cnr.it} } \references{ Terzago, S. et al. (2018). NHESS 18(11), 2825-2840. http://doi.org/10.5194/nhess-18-2825-2018 ; D'Onofrio et al. (2014), J of Hydrometeorology 15, 830-843; Rebora et. al. (2006), JHM 7, 724. } - +\author{ +Jost von Hardenberg - ISAC-CNR, \email{j.vonhardenberg@isac.cnr.it} +} diff --git a/man/CST_SaveExp.Rd b/man/CST_SaveExp.Rd index 17537205..0e49c119 100644 --- a/man/CST_SaveExp.Rd +++ b/man/CST_SaveExp.Rd @@ -29,11 +29,10 @@ destination <- "./path/" CST_SaveExp(data = data, destination = destination) } -} -\author{ -Perez-Zanon Nuria, \email{nuria.perez@bsc.es} } \seealso{ \code{\link{CST_Load}}, \code{\link{as.s2dv_cube}} and \code{\link{s2dv_cube}} } - +\author{ +Perez-Zanon Nuria, \email{nuria.perez@bsc.es} +} diff --git a/man/CST_SplitDim.Rd b/man/CST_SplitDim.Rd index 2019ea7b..ee93aedc 100644 --- a/man/CST_SplitDim.Rd +++ b/man/CST_SplitDim.Rd @@ -43,4 +43,3 @@ dim(new_data$data) \author{ Nuria Perez-Zanon, \email{nuria.perez@bsc.es} } - diff --git a/man/Calibration.Rd b/man/Calibration.Rd index 3a78b797..64452279 100644 --- a/man/Calibration.Rd +++ b/man/Calibration.Rd @@ -11,7 +11,8 @@ Calibration( eval.method = "leave-one-out", multi.model = FALSE, na.fill = TRUE, - ncores = 1) + ncores = 1 +) } \arguments{ \item{exp}{an array containing the seasonal forecast experiment data.} @@ -36,12 +37,6 @@ Four types of member-by-member bias correction can be performed. The \code{bias} Both in-sample or our out-of-sample (leave-one-out cross validation) calibration are possible. } -<<<<<<< HEAD -\author{ -Verónica Torralba, \email{veronica.torralba@bsc.es} - -Bert Van Schaeybroeck, \email{bertvs@meteo.be} -======= \examples{ mod1 <- 1 : (1 * 3 * 4 * 5 * 6 * 7) dim(mod1) <- c(dataset = 1, member = 3, sdate = 4, ftime = 5, lat = 6, lon = 7) @@ -49,7 +44,6 @@ obs1 <- 1 : (1 * 1 * 4 * 5 * 6 * 7) dim(obs1) <- c(dataset = 1, member = 1, sdate = 4, ftime = 5, lat = 6, lon = 7) a <- Calibration(exp = mod1, obs = obs1) str(a) ->>>>>>> master } \references{ Doblas-Reyes F.J, Hagedorn R, Palmer T.N. The rationale behind the success of multi-model ensembles in seasonal forecasting-II calibration and combination. Tellus A. 2005;57:234-252. doi:10.1111/j.1600-0870.2005.00104.x @@ -61,4 +55,8 @@ Van Schaeybroeck, B., & Vannitsem, S. (2015). Ensemble post-processing using mem \seealso{ \code{\link{CST_Load}} } +\author{ +Verónica Torralba, \email{veronica.torralba@bsc.es} +Bert Van Schaeybroeck, \email{bertvs@meteo.be} +} diff --git a/man/EnsClustering.Rd b/man/EnsClustering.Rd index 456e8215..30d81f87 100644 --- a/man/EnsClustering.Rd +++ b/man/EnsClustering.Rd @@ -17,7 +17,8 @@ EnsClustering( time_percentile = 90, time_dim = NULL, cluster_dim = "member", - verbose = T) + verbose = T +) } \arguments{ \item{data}{A matrix of dimensions 'dataset member sdate ftime lat lon' containing the variables to be analysed.} @@ -81,4 +82,3 @@ Paolo Davini - ISAC-CNR, \email{p.davini@isac.cnr.it} Jost von Hardenberg - ISAC-CNR, \email{j.vonhardenberg@isac.cnr.it} } - diff --git a/man/MergeDims.Rd b/man/MergeDims.Rd index 585049e8..7539ef6e 100644 --- a/man/MergeDims.Rd +++ b/man/MergeDims.Rd @@ -4,8 +4,12 @@ \alias{MergeDims} \title{Function to Split Dimension} \usage{ -MergeDims(data, merge_dims = c("time", "monthly"), rename_dim = NULL, - na.rm = FALSE) +MergeDims( + data, + merge_dims = c("time", "monthly"), + rename_dim = NULL, + na.rm = FALSE +) } \arguments{ \item{data}{an n-dimensional array with named dimensions} @@ -28,4 +32,3 @@ new_data <- MergeDims(data, merge_dims = c('time', 'lat')) \author{ Nuria Perez-Zanon, \email{nuria.perez@bsc.es} } - diff --git a/man/MultiEOF.Rd b/man/MultiEOF.Rd index 1e822fc4..dd0fc7fe 100644 --- a/man/MultiEOF.Rd +++ b/man/MultiEOF.Rd @@ -4,9 +4,19 @@ \alias{MultiEOF} \title{EOF analysis of multiple variables starting from an array (reduced version)} \usage{ -MultiEOF(data, lon, lat, time, lon_dim = "lon", lat_dim = "lat", - neof_max = 40, neof_composed = 5, minvar = 0.6, lon_lim = NULL, - lat_lim = NULL) +MultiEOF( + data, + lon, + lat, + time, + lon_dim = "lon", + lat_dim = "lat", + neof_max = 40, + neof_composed = 5, + minvar = 0.6, + lon_lim = NULL, + lat_lim = NULL +) } \arguments{ \item{data}{A multidimensional array with dimension \code{"var"}, @@ -46,4 +56,3 @@ Jost von Hardenberg - ISAC-CNR, \email{j.vonhardenberg@isac.cnr.it} Paolo Davini - ISAC-CNR, \email{p.davini@isac.cnr.it} } - diff --git a/man/PlotCombinedMap.Rd b/man/PlotCombinedMap.Rd index 6857c64d..616b84f9 100644 --- a/man/PlotCombinedMap.Rd +++ b/man/PlotCombinedMap.Rd @@ -4,11 +4,27 @@ \alias{PlotCombinedMap} \title{Plot Multiple Lon-Lat Variables In a Single Map According to a Decision Function} \usage{ -PlotCombinedMap(maps, lon, lat, map_select_fun, display_range, - map_dim = "map", brks = NULL, cols = NULL, col_unknown_map = "white", - mask = NULL, col_mask = "grey", bar_titles = NULL, legend_scale = 1, - fileout = NULL, width = 8, height = 5, size_units = "in", res = 100, - ...) +PlotCombinedMap( + maps, + lon, + lat, + map_select_fun, + display_range, + map_dim = "map", + brks = NULL, + cols = NULL, + col_unknown_map = "white", + mask = NULL, + col_mask = "grey", + bar_titles = NULL, + legend_scale = 1, + fileout = NULL, + width = 8, + height = 5, + size_units = "in", + res = 100, + ... +) } \arguments{ \item{maps}{List of matrices to plot, each with (longitude, latitude) dimensions, or 3-dimensional array with the dimensions (longitude, latitude, map). Dimension names are required.} @@ -67,12 +83,11 @@ PlotCombinedMap(list(a, b, c), lons, lats, bar_titles = paste('\% of belonging to', c('a', 'b', 'c')), brks = 20, width = 10, height = 8) } +\seealso{ +\code{PlotCombinedMap} and \code{PlotEquiMap} +} \author{ Nicolau Manubens, \email{nicolau.manubens@bsc.es} Veronica Torralba, \email{veronica.torralba@bsc.es} } -\seealso{ -\code{PlotCombinedMap} and \code{PlotEquiMap} -} - diff --git a/man/PlotForecastPDF.Rd b/man/PlotForecastPDF.Rd index d7b95b08..c04b43c1 100644 --- a/man/PlotForecastPDF.Rd +++ b/man/PlotForecastPDF.Rd @@ -4,10 +4,18 @@ \alias{PlotForecastPDF} \title{Plot one or multiple ensemble forecast pdfs for the same event} \usage{ -PlotForecastPDF(fcst, tercile.limits, extreme.limits = NULL, obs = NULL, - plotfile = NULL, title = "Set a title", var.name = "Varname (units)", - fcst.names = NULL, add.ensmemb = c("above", "below", "no"), - color.set = c("ggplot", "s2s4e", "hydro")) +PlotForecastPDF( + fcst, + tercile.limits, + extreme.limits = NULL, + obs = NULL, + plotfile = NULL, + title = "Set a title", + var.name = "Varname (units)", + fcst.names = NULL, + add.ensmemb = c("above", "below", "no"), + color.set = c("ggplot", "s2s4e", "hydro") +) } \arguments{ \item{fcst}{a dataframe or array containing all the ensember members for each forecast. If \code{'fcst'} is an array, it should have two labelled dimensions, and one of them should be \code{'members'}. If \code{'fcsts'} is a data.frame, each column shoul be a separate forecast, with the rows beeing the different ensemble members.} @@ -49,4 +57,3 @@ PlotForecastPDF(fcsts2, c(-0.66, 0.66), extreme.limits = c(-1.2, 1.2), \author{ Llorenç Lledó \email{llledo@bsc.es} } - diff --git a/man/PlotMostLikelyQuantileMap.Rd b/man/PlotMostLikelyQuantileMap.Rd index 6c92850e..4c400b18 100644 --- a/man/PlotMostLikelyQuantileMap.Rd +++ b/man/PlotMostLikelyQuantileMap.Rd @@ -4,8 +4,15 @@ \alias{PlotMostLikelyQuantileMap} \title{Plot Maps of Most Likely Quantiles} \usage{ -PlotMostLikelyQuantileMap(probs, lon, lat, cat_dim = "bin", - bar_titles = NULL, col_unknown_cat = "white", ...) +PlotMostLikelyQuantileMap( + probs, + lon, + lat, + cat_dim = "bin", + bar_titles = NULL, + col_unknown_cat = "white", + ... +) } \arguments{ \item{probs}{a list of bi-dimensional arrays with the named dimensions 'latitude' (or 'lat') and 'longitude' (or 'lon'), with equal size and in the same order, or a single tri-dimensional array with an additional dimension (e.g. 'bin') for the different categories. The arrays must contain probability values between 0 and 1, and the probabilities for all categories of a grid cell should not exceed 1 when added.} @@ -109,11 +116,10 @@ PlotMostLikelyQuantileMap(bins, lons, lats, mask = 1 - (w1 + w2 / max(c(w1, w2))), brks = 20, width = 10, height = 8) -} -\author{ -Veronica Torralba, \email{veronica.torralba@bsc.es}, Nicolau Manubens, \email{nicolau.manubens@bsc.es} } \seealso{ \code{PlotCombinedMap} and \code{PlotEquiMap} } - +\author{ +Veronica Torralba, \email{veronica.torralba@bsc.es}, Nicolau Manubens, \email{nicolau.manubens@bsc.es} +} diff --git a/man/RFSlope.Rd b/man/RFSlope.Rd index 09a24ff5..db3f0e10 100644 --- a/man/RFSlope.Rd +++ b/man/RFSlope.Rd @@ -4,8 +4,7 @@ \alias{RFSlope} \title{RainFARM spectral slopes from an array (reduced version)} \usage{ -RFSlope(data, kmin = 1, time_dim = NULL, lon_dim = "lon", - lat_dim = "lat") +RFSlope(data, kmin = 1, time_dim = NULL, lon_dim = "lon", lat_dim = "lat") } \arguments{ \item{data}{Array containing the spatial precipitation fields to downscale. @@ -60,4 +59,3 @@ slopes \author{ Jost von Hardenberg - ISAC-CNR, \email{j.vonhardenberg@isac.cnr.it} } - diff --git a/man/RainFARM.Rd b/man/RainFARM.Rd index 984dcd42..0db84679 100644 --- a/man/RainFARM.Rd +++ b/man/RainFARM.Rd @@ -4,10 +4,24 @@ \alias{RainFARM} \title{RainFARM stochastic precipitation downscaling (reduced version)} \usage{ -RainFARM(data, lon, lat, nf, weights = 1, nens = 1, slope = 0, kmin = 1, - fglob = FALSE, fsmooth = TRUE, nprocs = 1, time_dim = NULL, - lon_dim = "lon", lat_dim = "lat", drop_realization_dim = FALSE, - verbose = FALSE) +RainFARM( + data, + lon, + lat, + nf, + weights = 1, + nens = 1, + slope = 0, + kmin = 1, + fglob = FALSE, + fsmooth = TRUE, + nprocs = 1, + time_dim = NULL, + lon_dim = "lon", + lat_dim = "lat", + drop_realization_dim = FALSE, + verbose = FALSE +) } \arguments{ \item{data}{Precipitation array to downscale. @@ -117,4 +131,3 @@ dim(res$data) \author{ Jost von Hardenberg - ISAC-CNR, \email{j.vonhardenberg@isac.cnr.it} } - diff --git a/man/SplitDim.Rd b/man/SplitDim.Rd index e36aa8a5..f07e4756 100644 --- a/man/SplitDim.Rd +++ b/man/SplitDim.Rd @@ -35,4 +35,3 @@ new_data <- SplitDim(data, indices = time, freq = 'year') \author{ Nuria Perez-Zanon, \email{nuria.perez@bsc.es} } - diff --git a/man/areave_data.Rd b/man/areave_data.Rd index cc79c85c..a772220a 100644 --- a/man/areave_data.Rd +++ b/man/areave_data.Rd @@ -41,4 +41,3 @@ areave_data <- Nicolau Manubens \email{nicolau.manubens@bsc.es} } \keyword{data} - diff --git a/man/as.s2dv_cube.Rd b/man/as.s2dv_cube.Rd index 13a2a296..c2b8f3a8 100644 --- a/man/as.s2dv_cube.Rd +++ b/man/as.s2dv_cube.Rd @@ -40,12 +40,11 @@ data <- as.s2dv_cube(data) class(data) } } +\seealso{ +\code{\link{s2dv_cube}}, \code{\link[s2dverification]{Load}}, \code{\link[startR]{Start}} and \code{\link{CST_Load}} +} \author{ Perez-Zanon Nuria, \email{nuria.perez@bsc.es} Nicolau Manubens, \email{nicolau.manubens@bsc.es} } -\seealso{ -\code{\link{s2dv_cube}}, \code{\link[s2dverification]{Load}}, \code{\link[startR]{Start}} and \code{\link{CST_Load}} -} - diff --git a/man/lonlat_data.Rd b/man/lonlat_data.Rd index eca7abac..0c6ee30f 100644 --- a/man/lonlat_data.Rd +++ b/man/lonlat_data.Rd @@ -41,4 +41,3 @@ lonlat_data <- Nicolau Manubens \email{nicolau.manubens@bsc.es} } \keyword{data} - diff --git a/man/lonlat_prec.Rd b/man/lonlat_prec.Rd index 69cb94e8..345e3cab 100644 --- a/man/lonlat_prec.Rd +++ b/man/lonlat_prec.Rd @@ -29,4 +29,3 @@ lonlat_prec <- CST_Load('prlr', exp = list(infile), obs = NULL, Jost von Hardenberg \email{j.vonhardenberg@isac.cnr.it} } \keyword{data} - diff --git a/man/s2dv_cube.Rd b/man/s2dv_cube.Rd index 48af7bbb..b0ce8966 100644 --- a/man/s2dv_cube.Rd +++ b/man/s2dv_cube.Rd @@ -4,8 +4,16 @@ \alias{s2dv_cube} \title{Creation of a 's2dv_cube' object} \usage{ -s2dv_cube(data, lon = NULL, lat = NULL, Variable = NULL, - Datasets = NULL, Dates = NULL, when = NULL, source_files = NULL) +s2dv_cube( + data, + lon = NULL, + lat = NULL, + Variable = NULL, + Datasets = NULL, + Dates = NULL, + when = NULL, + source_files = NULL +) } \arguments{ \item{data}{an array with any number of named dimensions, typically an object output from CST_Load, with the following dimensions: dataset, member, sdate, ftime, lat and lon.} @@ -75,10 +83,9 @@ exp8 <- s2dv_cube(data = exp_original, lon = seq(-10, 10, 5), lat = c(45, 50), end = paste0(rep("31", 10), rep("01", 10), 1990:1999))) class(exp8) } -\author{ -Perez-Zanon Nuria, \email{nuria.perez@bsc.es} -} \seealso{ \code{\link[s2dverification]{Load}} and \code{\link{CST_Load}} } - +\author{ +Perez-Zanon Nuria, \email{nuria.perez@bsc.es} +} -- GitLab From 76a81bdca7779cf6709904fd443ca86c6e8d9fad Mon Sep 17 00:00:00 2001 From: nperez Date: Thu, 4 Jun 2020 14:44:19 +0200 Subject: [PATCH 5/5] BiasCorrection na.rm parameter listed in NEWS --- NEWS.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/NEWS.md b/NEWS.md index 655c96bc..bbb9a496 100644 --- a/NEWS.md +++ b/NEWS.md @@ -3,6 +3,8 @@ - New features: + EnsClustering vignette + + EnsClustering has a new parameter 'time_dim' + + CST_BiasCorrection has na.rm paramter - Fixes + CST_Anomaly handles exp, obs or both + PlotForecastPDF vignette displays figures correctly @@ -10,7 +12,7 @@ + MultiMetric vignette fixed typo text description + RainFARM checks 'slope' is not a vector + DESCRIPTION specifies the minimum multiApply version required - + EnsClustering has a new parameter 'time_dim' and fixed 'closest_member' output + + EnsClustering has a fixed 'closest_member' output ### CSTools 3.0.0 **Submission date to CRAN: 10-02-2020** -- GitLab