diff --git a/R/MergeRefToExp.R b/R/MergeRefToExp.R index 03425c862da543e7874108a3ef4d1f8bf1aa6893..f5d9069a3484eaa018aebac9c9818760622db383 100644 --- a/R/MergeRefToExp.R +++ b/R/MergeRefToExp.R @@ -9,6 +9,12 @@ #'1st the forecast covers until the beginning of June next year), a climatology #'(or other references) could be added at the end of the forecast lead time to #'cover the desired period (e.g.: until the end of summer). +#' +#'This function is created to merge observations and forecasts, known as the +#'‘blending’ strategy (see references). The basis for this strategy is that the +#'predictions are progressively replaced with observational data as soon as they +#'become available (i.e., when entering the indicator definition period). This +#'key strategy aims to increase users’ confidence in the reformed predictions. #' #'@param data1 An 's2dv_cube' object with the element 'data' being a #' multidimensional array with named dimensions. All dimensions must be @@ -50,11 +56,19 @@ #'common to both arrays and for the 'time_dim' dimension, the sum of the #'corresponding dimension of 'data1' and 'data2'. If 'memb_dim' is not null, #'regarding member dimension, two different situations can occur: (1) in the -#'case that one of the arrays does not have member dimension or is equal to 1, -#'the result will contain the repeated values of itself; (2) in the case that -#'both arrays have member dimension and is greater than 1, all combinations of -#'member dimension will be returned. The other elements of the 's2dv_cube' will -#'be updated with the combined information of both datasets. +#'case that one of the arrays does not have member dimension or is equal to 1 +#'and the other array has multiple member dimension, the result will contain the +#'repeated values of the array one up to the lenght of member dimension of array +#'two; (2) in the case that both arrays have member dimension and is greater +#'than 1, all combinations of member dimension will be returned. The other +#'elements of the 's2dv_cube' will be updated with the combined information of +#'both datasets. +#' +#'@references Chou, C., R. Marcos-Matamoros, L. Palma Garcia, N. Pérez-Zanón, +#'M. Teixeira, S. Silva, N. Fontes, A. Graça, A. Dell'Aquila, S. Calmanti and +#'N. González-Reviriego (2023). Advanced seasonal predictions for vine +#'management based on bioclimatic indicators tailored to the wine sector. +#'Climate Services, 30, 100343, \doi{doi.org/10.1016/j.cliser.2023.100343}. #' #'@examples #'data_dates <- c(seq(as.Date("01-07-1993", "%d-%m-%Y", tz = 'UTC'), @@ -220,6 +234,12 @@ CST_MergeRefToExp <- function(data1, data2, start1 = NULL, end1 = NULL, #'1st the forecast covers until the beginning of June next year), a climatology #'(or other references) could be added at the end of the forecast lead time to #'cover the desired period (e.g.: until the end of summer). +#' +#'This function is created to merge observations and forecasts, known as the +#'‘blending’ strategy (see references). The basis for this strategy is that the +#'predictions are progressively replaced with observational data as soon as they +#'become available (i.e., when entering the indicator definition period). This +#'key strategy aims to increase users’ confidence in the reformed predictions. #' #'@param data1 A multidimensional array with named dimensions. All dimensions #' must be equal to 'data2' dimensions except for the ones specified with @@ -265,10 +285,17 @@ CST_MergeRefToExp <- function(data1, data2, start1 = NULL, end1 = NULL, #'the 'time_dim' dimension, the sum of the corresponding dimension of 'data1' #'and 'data2'. If 'memb_dim' is not null, regarding member dimension, two #'different situations can occur: (1) in the case that one of the arrays does -#'not have member dimension or is equal to 1, the result will contain the -#'repeated values of itself; (2) in the case that both arrays have member -#'dimension and is greater than 1, all combinations of member dimension will be -#'returned. +#'not have member dimension or is equal to 1 and the other array has multiple +#'member dimension, the result will contain the repeated values of the array one +#'up to the lenght of member dimension of array two; (2) in the case that both +#'arrays have member dimension and is greater than 1, all combinations of member +#'dimension will be returned. +#' +#'@references Chou, C., R. Marcos-Matamoros, L. Palma Garcia, N. Pérez-Zanón, +#'M. Teixeira, S. Silva, N. Fontes, A. Graça, A. Dell'Aquila, S. Calmanti and +#'N. González-Reviriego (2023). Advanced seasonal predictions for vine +#'management based on bioclimatic indicators tailored to the wine sector. +#'Climate Services, 30, 100343, \doi{doi.org/10.1016/j.cliser.2023.100343}. #' #'@examples #'data_dates <- c(seq(as.Date("01-07-1993", "%d-%m-%Y", tz = 'UTC'), diff --git a/man/CST_MergeRefToExp.Rd b/man/CST_MergeRefToExp.Rd index bbca8c4faf98efbb29aa8cdffd560ea0585e91a9..a49c9dc10e2d8da993bf62a1fbff81686cc32415 100644 --- a/man/CST_MergeRefToExp.Rd +++ b/man/CST_MergeRefToExp.Rd @@ -67,11 +67,13 @@ the following dimensions: the original dimensions of the input data, which are common to both arrays and for the 'time_dim' dimension, the sum of the corresponding dimension of 'data1' and 'data2'. If 'memb_dim' is not null, regarding member dimension, two different situations can occur: (1) in the -case that one of the arrays does not have member dimension or is equal to 1, -the result will contain the repeated values of itself; (2) in the case that -both arrays have member dimension and is greater than 1, all combinations of -member dimension will be returned. The other elements of the 's2dv_cube' will -be updated with the combined information of both datasets. +case that one of the arrays does not have member dimension or is equal to 1 +and the other array has multiple member dimension, the result will contain the +repeated values of the array one up to the lenght of member dimension of array +two; (2) in the case that both arrays have member dimension and is greater +than 1, all combinations of member dimension will be returned. The other +elements of the 's2dv_cube' will be updated with the combined information of +both datasets. } \description{ Some indicators are defined for specific temporal periods (e.g.: summer from @@ -84,6 +86,13 @@ period because it is initialized too early (e.g.: Initialization on November (or other references) could be added at the end of the forecast lead time to cover the desired period (e.g.: until the end of summer). } +\details{ +This function is created to merge observations and forecasts, known as the +‘blending’ strategy (see references). The basis for this strategy is that the +predictions are progressively replaced with observational data as soon as they +become available (i.e., when entering the indicator definition period). This +key strategy aims to increase users’ confidence in the reformed predictions. +} \examples{ data_dates <- c(seq(as.Date("01-07-1993", "\%d-\%m-\%Y", tz = 'UTC'), as.Date("01-12-1993","\%d-\%m-\%Y", tz = 'UTC'), "day"), @@ -106,3 +115,10 @@ new_data <- CST_MergeRefToExp(data1 = ref, data2 = data, start2 = list(1, 7), end2 = list(21, 9)) } +\references{ +Chou, C., R. Marcos-Matamoros, L. Palma Garcia, N. Pérez-Zanón, +M. Teixeira, S. Silva, N. Fontes, A. Graça, A. Dell'Aquila, S. Calmanti and +N. González-Reviriego (2023). Advanced seasonal predictions for vine +management based on bioclimatic indicators tailored to the wine sector. +Climate Services, 30, 100343, \doi{doi.org/10.1016/j.cliser.2023.100343}. +} diff --git a/man/MergeRefToExp.Rd b/man/MergeRefToExp.Rd index e22b52d03277ea497ed333b2fdcfa8120fb95281..33b5d4290e3d4cef90ce698b9f4614327d0ef623 100644 --- a/man/MergeRefToExp.Rd +++ b/man/MergeRefToExp.Rd @@ -74,10 +74,11 @@ original dimensions of the input data, which are common to both arrays and for the 'time_dim' dimension, the sum of the corresponding dimension of 'data1' and 'data2'. If 'memb_dim' is not null, regarding member dimension, two different situations can occur: (1) in the case that one of the arrays does -not have member dimension or is equal to 1, the result will contain the -repeated values of itself; (2) in the case that both arrays have member -dimension and is greater than 1, all combinations of member dimension will be -returned. +not have member dimension or is equal to 1 and the other array has multiple +member dimension, the result will contain the repeated values of the array one +up to the lenght of member dimension of array two; (2) in the case that both +arrays have member dimension and is greater than 1, all combinations of member +dimension will be returned. } \description{ Some indicators are defined for specific temporal periods (e.g.: summer from @@ -90,6 +91,13 @@ period because it is initialized too early (e.g.: Initialization on November (or other references) could be added at the end of the forecast lead time to cover the desired period (e.g.: until the end of summer). } +\details{ +This function is created to merge observations and forecasts, known as the +‘blending’ strategy (see references). The basis for this strategy is that the +predictions are progressively replaced with observational data as soon as they +become available (i.e., when entering the indicator definition period). This +key strategy aims to increase users’ confidence in the reformed predictions. +} \examples{ data_dates <- c(seq(as.Date("01-07-1993", "\%d-\%m-\%Y", tz = 'UTC'), as.Date("01-12-1993","\%d-\%m-\%Y", tz = 'UTC'), "day"), @@ -107,3 +115,10 @@ new_data <- MergeRefToExp(data1 = ref, dates1 = ref_dates, start1 = list(21, 6), time_dim = 'ftime') } +\references{ +Chou, C., R. Marcos-Matamoros, L. Palma Garcia, N. Pérez-Zanón, +M. Teixeira, S. Silva, N. Fontes, A. Graça, A. Dell'Aquila, S. Calmanti and +N. González-Reviriego (2023). Advanced seasonal predictions for vine +management based on bioclimatic indicators tailored to the wine sector. +Climate Services, 30, 100343, \doi{doi.org/10.1016/j.cliser.2023.100343}. +}