From 7ccb82008df60b91524c6463fe59401e9bb31b24 Mon Sep 17 00:00:00 2001 From: nperez Date: Wed, 17 Apr 2019 13:23:49 +0200 Subject: [PATCH 1/4] dash correction in vignettes --- vignettes/MultiModelSkill_vignette.Rmd | 4 ++-- vignettes/RainFARM_vignette.Rmd | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/vignettes/MultiModelSkill_vignette.Rmd b/vignettes/MultiModelSkill_vignette.Rmd index 414955a2..4e12ca17 100644 --- a/vignettes/MultiModelSkill_vignette.Rmd +++ b/vignettes/MultiModelSkill_vignette.Rmd @@ -11,7 +11,7 @@ vignette: > Multi-model Skill Assessment ----------------------------------------- -**reference**: Mishra, N., Prodhomme, C., & Guemas, V. (2018). Multi-Model Skill Assessment of Seasonal Temperature and Precipitation Forecasts over Europe, 29–31. +**reference**: Mishra, N., Prodhomme, C., & Guemas, V. (2018). Multi-Model Skill Assessment of Seasonal Temperature and Precipitation Forecasts over Europe, 29-31. A version of s2dverification under development should be loaded by running: @@ -35,7 +35,7 @@ library(CSTools) ### 1.- Load data -In this case, the seasonal temperature forecasted, initialized in November, will be used to assess the EUROSIP multi-model seasonal forecasting system consists of a number of independent coupled seasonal forecasting systems integrated into a common framework. From September 2012, the systems include those from ECMWF, the Met Office, Météo-France and NCEP. +In this case, the seasonal temperature forecasted, initialized in November, will be used to assess the EUROSIP multi-model seasonal forecasting system consists of a number of independent coupled seasonal forecasting systems integrated into a common framework. From September 2012, the systems include those from ECMWF, the Met Office, Meteo-France and NCEP. The parameters defined are the initializating month and the variable: diff --git a/vignettes/RainFARM_vignette.Rmd b/vignettes/RainFARM_vignette.Rmd index 90a882c8..891845bc 100644 --- a/vignettes/RainFARM_vignette.Rmd +++ b/vignettes/RainFARM_vignette.Rmd @@ -198,10 +198,10 @@ RainFARM creates an additional dimension in the `$data` array of the output data ## Bibliography -* Terzago, S., Palazzi, E., von Hardenberg, J. Stochastic downscaling of precipitation in complex orography: A simple method to reproduce a realistic fine-scale climatology. Natural Hazards and Earth System Sciences, 18(11), 2825–2840, doi:10.5194/nhess-18-2825-2018 (2018) +* Terzago, S., Palazzi, E., von Hardenberg, J. Stochastic downscaling of precipitation in complex orography: A simple method to reproduce a realistic fine-scale climatology. Natural Hazards and Earth System Sciences, 18(11), 2825-2840, doi:10.5194/nhess-18-2825-2018 (2018) * D'Onofrio, D.; Palazzi, E., von Hardenberg, J., Provenzale A., Calmanti S. Stochastic Rainfall Downscaling of Climate Models. J of Hydrometeorology 15 (2), 830-843, doi:10.1175/JHM-D-13-096.1 (2014) -* Rebora, N., L. Ferraris, J. von Hardenberg, A. Provenzale. Rainfall downscaling and flood forecasting: A case study in the Mediterranean area. Nat. Hazards Earth Syst. Sci., 6, 611–619, doi:10.5194/nhess-6-611-2006 (2006a) -* Rebora, N., Ferraris, L., von Hardenberg, J., Provenzale, A. RainFARM: Rainfall downscaling by a filtered autoregressive model. J. Hydrometeor., 7, 724–738, doi:10.1175/JHM517.1 (2006b) -* Ferraris, L., Gabellani, S., Parodi, U., Rebora, N., von Hardenberg, J., Provenzale, A. Revisiting multifractality in rainfall fields. J. Hydrometeor., 4, 544–551, doi:10.1175/ 1525-7541(2003)004,0544:RMIRF.2.0.CO;2 (2003a) +* Rebora, N., L. Ferraris, J. von Hardenberg, A. Provenzale. Rainfall downscaling and flood forecasting: A case study in the Mediterranean area. Nat. Hazards Earth Syst. Sci., 6, 611-619, doi:10.5194/nhess-6-611-2006 (2006a) +* Rebora, N., Ferraris, L., von Hardenberg, J., Provenzale, A. RainFARM: Rainfall downscaling by a filtered autoregressive model. J. Hydrometeor., 7, 724-738, doi:10.1175/JHM517.1 (2006b) +* Ferraris, L., Gabellani, S., Parodi, U., Rebora, N., von Hardenberg, J., Provenzale, A. Revisiting multifractality in rainfall fields. J. Hydrometeor., 4, 544-551, doi:10.1175/ 1525-7541(2003)004,0544:RMIRF.2.0.CO;2 (2003a) * Ferraris, L., Gabellani, S., Rebora, N., and Provenzale, A.. A comparison of stochastic models for spatial rainfall downscaling, Water Resour. Res., 39, 1368, https://doi.org/10.1029/2003WR002504, (2003b) -- GitLab From c1aa0626f1a691b34f56ffe1fd4d28e2b76f02fd Mon Sep 17 00:00:00 2001 From: nperez Date: Wed, 17 Apr 2019 15:03:27 +0200 Subject: [PATCH 2/4] encoding corrections names documentation --- man/CST_Calibration.Rd | 2 +- man/CST_MultiMetric.Rd | 2 +- man/CST_RainFARM.Rd | 2 +- man/PlotForecastPDF.Rd | 2 +- man/RainFARM.Rd | 6 +++--- 5 files changed, 7 insertions(+), 7 deletions(-) diff --git a/man/CST_Calibration.Rd b/man/CST_Calibration.Rd index 6af358a2..396d87ca 100644 --- a/man/CST_Calibration.Rd +++ b/man/CST_Calibration.Rd @@ -29,7 +29,7 @@ str(exp_calibrated) Verónica Torralba, \email{veronica.torralba@bsc.es} } \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 +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 } \seealso{ \code{\link{CST_Load}} diff --git a/man/CST_MultiMetric.Rd b/man/CST_MultiMetric.Rd index b6daf29f..079a5588 100644 --- a/man/CST_MultiMetric.Rd +++ b/man/CST_MultiMetric.Rd @@ -43,7 +43,7 @@ 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} +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}} diff --git a/man/CST_RainFARM.Rd b/man/CST_RainFARM.Rd index 0c8886ab..ca32e2d8 100644 --- a/man/CST_RainFARM.Rd +++ b/man/CST_RainFARM.Rd @@ -96,7 +96,7 @@ dim(res$data) Jost von Hardenberg - ISAC-CNR, \email{j.vonhardenberg@isac.cnr.it} } \references{ -Terzago, S. et al. (2018). NHESS 18(11), 2825–2840. +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. } diff --git a/man/PlotForecastPDF.Rd b/man/PlotForecastPDF.Rd index 3d1d65c3..83867d89 100644 --- a/man/PlotForecastPDF.Rd +++ b/man/PlotForecastPDF.Rd @@ -47,6 +47,6 @@ PlotForecastPDF(fcsts2, c(-0.66, 0.66), extreme.limits = c(-1.2, 1.2), } } \author{ -Llorenç Lledó \email{llledo@bsc.es} +Lloren\encoding{ç} Lled\encoding{ó} \email{llledo@bsc.es} } diff --git a/man/RainFARM.Rd b/man/RainFARM.Rd index 3385ef34..ed8e91c7 100644 --- a/man/RainFARM.Rd +++ b/man/RainFARM.Rd @@ -75,7 +75,7 @@ and one or more dimension (such as "ftime", "sdate" or "time") over which to average automatically determined spectral slopes. Adapted for climate downscaling and including orographic correction. References: -Terzago, S. et al. (2018). NHESS 18(11), 2825–2840. http://doi.org/10.5194/nhess-18-2825-2018, +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. } \examples{ @@ -83,7 +83,7 @@ D'Onofrio et al. (2014), J of Hydrometeorology 15, 830-843; Rebora et. al. (2006 nf <- 8 # Choose a downscaling by factor 8 nens <- 3 # Number of ensemble members # create a test array with dimension 8x8 and 20 timesteps -# or provide your own read from a netcdf file +# or provide your own read from a netcdf file pr <- rnorm(8 * 8 * 20) dim(pr) <- c(lon = 8, lat = 8, ftime = 20) lon_mat <- seq(10, 13.5, 0.5) # could also be a 2d matrix @@ -104,7 +104,7 @@ str(res) #List of 3 # $ data: num [1:3, 1:20, 1:64, 1:64] 0.186 0.212 0.138 3.748 0.679 ... # $ lon : num [1:64] 9.78 9.84 9.91 9.97 10.03 ... -# $ lat : num [1:64] 39.8 39.8 39.9 40 40 … +# $ lat : num [1:64] 39.8 39.8 39.9 40 40 ... dim(res$data) # lon lat ftime realization # 64 64 20 2 -- GitLab From d8d83a2b9e4b384b652aabeea0850862f453fb0b Mon Sep 17 00:00:00 2001 From: nperez Date: Wed, 17 Apr 2019 15:35:31 +0200 Subject: [PATCH 3/4] correction \encoding{UTF-8} --- man/CST_BiasCorrection.Rd | 1 + man/CST_Calibration.Rd | 2 +- man/PlotForecastPDF.Rd | 4 ++-- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/man/CST_BiasCorrection.Rd b/man/CST_BiasCorrection.Rd index e8a82af0..75207e2e 100644 --- a/man/CST_BiasCorrection.Rd +++ b/man/CST_BiasCorrection.Rd @@ -41,4 +41,5 @@ 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) } +\encoding{UTF-8} diff --git a/man/CST_Calibration.Rd b/man/CST_Calibration.Rd index 396d87ca..c8419076 100644 --- a/man/CST_Calibration.Rd +++ b/man/CST_Calibration.Rd @@ -34,4 +34,4 @@ Doblas-Reyes F.J, Hagedorn R, Palmer T.N. The rationale behind the success of mu \seealso{ \code{\link{CST_Load}} } - +\encoding{UTF-8} diff --git a/man/PlotForecastPDF.Rd b/man/PlotForecastPDF.Rd index 83867d89..bed0bd31 100644 --- a/man/PlotForecastPDF.Rd +++ b/man/PlotForecastPDF.Rd @@ -47,6 +47,6 @@ PlotForecastPDF(fcsts2, c(-0.66, 0.66), extreme.limits = c(-1.2, 1.2), } } \author{ -Lloren\encoding{ç} Lled\encoding{ó} \email{llledo@bsc.es} +Llorenç Lledó \email{llledo@bsc.es} } - +\encoding{UTF-8} -- GitLab From 873d6af2119246ae3488f4d4479223ca0232b687 Mon Sep 17 00:00:00 2001 From: nperez Date: Wed, 17 Apr 2019 16:52:58 +0200 Subject: [PATCH 4/4] corrections added to header of functions except encoding --- R/CST_Calibration.R | 2 +- R/CST_MultiMetric.R | 2 +- R/CST_RFWeights.R | 2 +- R/CST_RainFARM.R | 10 +++++----- man/CST_BiasCorrection.Rd | 1 - man/CST_RFWeights.Rd | 2 +- man/RainFARM.Rd | 2 +- 7 files changed, 10 insertions(+), 11 deletions(-) diff --git a/R/CST_Calibration.R b/R/CST_Calibration.R index 75002d2a..5115f1e8 100644 --- a/R/CST_Calibration.R +++ b/R/CST_Calibration.R @@ -3,7 +3,7 @@ #'@author Verónica Torralba, \email{veronica.torralba@bsc.es} #'@description This function applies a variance inflation technique described in Doblas-Reyes et al. (2005) in leave-one-out cross-validation. This bias adjustment method produces calibrated forecasts with equivalent mean and variance to that of the reference dataset, but at the same time preserve reliability. #' -#'@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 +#'@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 #' #'@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}. diff --git a/R/CST_MultiMetric.R b/R/CST_MultiMetric.R index e7bfc729..e85c8b68 100644 --- a/R/CST_MultiMetric.R +++ b/R/CST_MultiMetric.R @@ -12,7 +12,7 @@ #'@return an object of class \code{s2dv_cube} containing the statistics of the selected metric in the element \code{$data} which is an array with two datset dimensions equal to the 'dataset' dimension in the \code{exp$data} and \code{obs$data} inputs. If \code{multimodel} is TRUE, the greatest first dimension correspons to the Multi-Model Mean. The third dimension contains the statistics selected. For metric \code{correlation}, the third dimension is of length four and they corresponds to the lower limit of the 95\% confidence interval, the statistics itselfs, the upper limit of the 95\% confidence interval and the 95\% significance level. For metric \code{rms}, the third dimension is length three and they corresponds to the lower limit of the 95\% confidence interval, the RMSE and the upper limit of the 95\% confidence interval. For metric \code{rmsss}, the third dimension is length two and they corresponds to the statistics itselfs and the p-value of the one-sided Fisher test with Ho: RMSSS = 0. #'@seealso \code{\link[s2dverification]{Corr}}, \code{\link[s2dverification]{RMS}}, \code{\link[s2dverification]{RMSSS}} and \code{\link{CST_Load}} #'@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} +#'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} #' #'@import s2dverification #'@import stats diff --git a/R/CST_RFWeights.R b/R/CST_RFWeights.R index 51a377f2..bd626ef3 100644 --- a/R/CST_RFWeights.R +++ b/R/CST_RFWeights.R @@ -7,7 +7,7 @@ #' Stochastic downscaling of precipitation in complex orography: #' 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 . +#' 2825-2840. http://doi.org/10.5194/nhess-18-2825-2018 . #' @param climfile Filename of a fine-scale precipitation climatology. #' The file is expected to be in NetCDF format and should contain #' at least one precipitation field. If several fields at different times are provided, diff --git a/R/CST_RainFARM.R b/R/CST_RainFARM.R index 290199f5..77189e4a 100644 --- a/R/CST_RainFARM.R +++ b/R/CST_RainFARM.R @@ -8,7 +8,7 @@ #' 's2dv_cube' as provided by `CST_Load`) as input. #' Adapted for climate downscaling and including orographic correction #' as described in Terzago et al. 2018. -#' @references Terzago, S. et al. (2018). NHESS 18(11), 2825–2840. +#' @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. #' @param data An object of the class 's2dv_cube' as returned by `CST_Load`, @@ -103,7 +103,7 @@ CST_RainFARM <- function(data, nf, weights = 1., slope = 0, kmin = 1, #' over which to average automatically determined spectral slopes. #' Adapted for climate downscaling and including orographic correction. #' References: -#' Terzago, S. et al. (2018). NHESS 18(11), 2825–2840. http://doi.org/10.5194/nhess-18-2825-2018, +#' 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. #' @param data Precipitation array to downscale. #' The input array is expected to have at least two dimensions named "lon" and "lat" by default @@ -156,14 +156,14 @@ CST_RainFARM <- function(data, nf, weights = 1., slope = 0, kmin = 1, #' nf <- 8 # Choose a downscaling by factor 8 #' nens <- 3 # Number of ensemble members #' # create a test array with dimension 8x8 and 20 timesteps -#' # or provide your own read from a netcdf file +#' # or provide your own read from a netcdf file #' pr <- rnorm(8 * 8 * 20) #' dim(pr) <- c(lon = 8, lat = 8, ftime = 20) #' lon_mat <- seq(10, 13.5, 0.5) # could also be a 2d matrix #' lat_mat <- seq(40, 43.5, 0.5) #' # Create a test array of weights #' ww <- array(1., dim = c(8 * nf, 8 * nf)) -#' # ... or create proper weights using an external fine-scale climatology file +#' # or create proper weights using an external fine-scale climatology file #' # Specify a weightsfn filename if you wish to save the weights #' \dontrun{ #' ww <- CST_RFWeights("./worldclim.nc", nf, lon = lon_mat, lat = lat_mat, @@ -177,7 +177,7 @@ CST_RainFARM <- function(data, nf, weights = 1., slope = 0, kmin = 1, #' #List of 3 #' # $ data: num [1:3, 1:20, 1:64, 1:64] 0.186 0.212 0.138 3.748 0.679 ... #' # $ lon : num [1:64] 9.78 9.84 9.91 9.97 10.03 ... -#' # $ lat : num [1:64] 39.8 39.8 39.9 40 40 … +#' # $ lat : num [1:64] 39.8 39.8 39.9 40 40 ... #' dim(res$data) #' # lon lat ftime realization #' # 64 64 20 2 diff --git a/man/CST_BiasCorrection.Rd b/man/CST_BiasCorrection.Rd index 75207e2e..485199ea 100644 --- a/man/CST_BiasCorrection.Rd +++ b/man/CST_BiasCorrection.Rd @@ -42,4 +42,3 @@ Verónica Torralba, \email{veronica.torralba@bsc.es} 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) } \encoding{UTF-8} - diff --git a/man/CST_RFWeights.Rd b/man/CST_RFWeights.Rd index d9bb4869..ffd700bd 100644 --- a/man/CST_RFWeights.Rd +++ b/man/CST_RFWeights.Rd @@ -55,6 +55,6 @@ Terzago, S., Palazzi, E., & von Hardenberg, J. (2018). Stochastic downscaling of precipitation in complex orography: 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 . +2825-2840. http://doi.org/10.5194/nhess-18-2825-2018 . } diff --git a/man/RainFARM.Rd b/man/RainFARM.Rd index ed8e91c7..3ef2a2f6 100644 --- a/man/RainFARM.Rd +++ b/man/RainFARM.Rd @@ -90,7 +90,7 @@ lon_mat <- seq(10, 13.5, 0.5) # could also be a 2d matrix lat_mat <- seq(40, 43.5, 0.5) # Create a test array of weights ww <- array(1., dim = c(8 * nf, 8 * nf)) -# ... or create proper weights using an external fine-scale climatology file +# or create proper weights using an external fine-scale climatology file # Specify a weightsfn filename if you wish to save the weights \dontrun{ ww <- CST_RFWeights("./worldclim.nc", nf, lon = lon_mat, lat = lat_mat, -- GitLab