diff --git a/DESCRIPTION b/DESCRIPTION index cdaeac9..151b7c9 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,6 +1,6 @@ Package: calibratoR Depends: - R(>= 3.4.0), + R(>= 3.5.0), transformeR(>= 1.1.0) Imports: stats, @@ -10,11 +10,12 @@ Suggests: loadeR.ECOMS, visualizeR, knitr, - rmarkdown + rmarkdown, + climate4R.datasets Type: Package Title: An R package for statistical calibration of seasonal climate forecasts -Version: 0.1.1 -Date: 2018-06-25 +Version: 0.2.0 +Date: 2023-06-23 Authors@R: as.person(c( "Santander Meteorology Group [cph]", "Rodrigo Manzanas [aut, cre]", @@ -30,7 +31,7 @@ Description: calibratoR (\url{https://github.com/SantanderMetGroup/calibratoR}) which range from simple mean/variance adjustment to more sophisticated Ensemble Model Output Statistics (EMOS) options which take into account the existing correspondence between the ensemble mean and the observations in the calibration process. It works with the grid object developed for the climate4R bundle (\url{http://www.meteo.unican.es/climate4r}). Currently, only gridded data are supported (point-wise stations will be also supported in a future release). -License: GPL (>= 3) +License: file LICENSE LazyData: true -RoxygenNote: 6.0.1 +RoxygenNote: 7.1.2 VignetteBuilder: knitr diff --git a/NEWS b/NEWS index 5e8bf26..93faa0f 100644 --- a/NEWS +++ b/NEWS @@ -10,3 +10,7 @@ * `calInflation` has been deprecated, replaced by `calCCR` (Climate Conserving Recalibration) * Replace `print` calls by `message` * Other minor doc updates + +## v0.2.0 (23 Jun 2023) + * Add LICENSE file + * Documentation update diff --git a/R/calCCR.R b/R/calCCR.R index c535af0..2308c89 100644 --- a/R/calCCR.R +++ b/R/calCCR.R @@ -40,6 +40,7 @@ #' @author R. Manzanas and V. Torralba. #' @examples{ #' ## loading seasonal forecasts (CFS) and observations (NCEP) of boreal winter temperature over Iberia +#' require(climate4R.datasets) #' data("CFS_Iberia_tas"); fcst = CFS_Iberia_tas #' data("NCEP_Iberia_tas"); obs = NCEP_Iberia_tas #' ## passing from daily data to seasonal averages diff --git a/R/calLM.R b/R/calLM.R index 79186a0..f626ad6 100644 --- a/R/calLM.R +++ b/R/calLM.R @@ -33,6 +33,7 @@ #' @family calibration #' @examples{ #' ## loading seasonal forecasts (CFS) and observations (NCEP) of boreal winter temperature over Iberia +#' require(climate4R.datasets) #' data("CFS_Iberia_tas"); fcst = CFS_Iberia_tas #' data("NCEP_Iberia_tas"); obs = NCEP_Iberia_tas #' ## passing from daily data to seasonal averages diff --git a/R/calMVA.R b/R/calMVA.R index 8f48657..113402c 100644 --- a/R/calMVA.R +++ b/R/calMVA.R @@ -36,6 +36,7 @@ #' @author R. Manzanas and V. Torralba. #' @examples{ #' ## loading seasonal forecasts (CFS) and observations (NCEP) of boreal winter temperature over Iberia +#' require(climate4R.datasets) #' data("CFS_Iberia_tas"); fcst = CFS_Iberia_tas #' data("NCEP_Iberia_tas"); obs = NCEP_Iberia_tas #' ## passing from daily data to seasonal averages diff --git a/R/calNGR.R b/R/calNGR.R index 3cfbd04..92b0c18 100644 --- a/R/calNGR.R +++ b/R/calNGR.R @@ -42,7 +42,7 @@ #' @family calibration #' @examples{ #' ## loading seasonal forecasts (CFS) and observations (NCEP) of boreal winter temperature over Iberia -#' require(transformeR) +#' require(climate4R.datasets) #' data("CFS_Iberia_tas"); fcst = CFS_Iberia_tas #' data("NCEP_Iberia_tas"); obs = NCEP_Iberia_tas #' ## passing from daily data to seasonal averages diff --git a/R/calRPC.R b/R/calRPC.R index 2a2d300..5b6905d 100644 --- a/R/calRPC.R +++ b/R/calRPC.R @@ -38,6 +38,7 @@ #' @family calibration #' @examples{ #' ## loading seasonal forecasts (CFS) and observations (NCEP) of boreal winter temperature over Iberia +#' require(climate4R.datasets) #' data("CFS_Iberia_tas"); fcst = CFS_Iberia_tas #' data("NCEP_Iberia_tas"); obs = NCEP_Iberia_tas #' ## passing from daily data to seasonal averages diff --git a/man/calCCR.Rd b/man/calCCR.Rd index c59c993..5729915 100644 --- a/man/calCCR.Rd +++ b/man/calCCR.Rd @@ -4,8 +4,13 @@ \alias{calCCR} \title{Inflation calibration method for seasonal forecasts (a.k.a. climate conserving recalibration)} \usage{ -calCCR(fcst.grid, obs.grid, crossval = TRUE, apply.to = c("all", "sig"), - alpha = 0.1) +calCCR( + fcst.grid, + obs.grid, + crossval = TRUE, + apply.to = c("all", "sig"), + alpha = 0.1 +) } \arguments{ \item{fcst.grid}{climate4R grid. Forecasts to be calibrated (typically on a monthly/seasonal basis). At the moment, only gridded data are supported.} @@ -33,6 +38,7 @@ Ensemble Model Output Statistics (EMOS) methods use the correspondence between t \examples{ { ## loading seasonal forecasts (CFS) and observations (NCEP) of boreal winter temperature over Iberia +require(climate4R.datasets) data("CFS_Iberia_tas"); fcst = CFS_Iberia_tas data("NCEP_Iberia_tas"); obs = NCEP_Iberia_tas ## passing from daily data to seasonal averages @@ -60,10 +66,13 @@ spatialPlot(makeMultiGrid(climatology(obs), } } \seealso{ -Other calibration: \code{\link{calLM}}, - \code{\link{calMVA}}, \code{\link{calNGR}}, - \code{\link{calRPC}} +Other calibration: +\code{\link{calLM}()}, +\code{\link{calMVA}()}, +\code{\link{calNGR}()}, +\code{\link{calRPC}()} } \author{ R. Manzanas and V. Torralba. } +\concept{calibration} diff --git a/man/calLM.Rd b/man/calLM.Rd index fdfb93c..34da3fd 100644 --- a/man/calLM.Rd +++ b/man/calLM.Rd @@ -4,8 +4,13 @@ \alias{calLM} \title{Linear regression based calibration of seasonal climate forecasts} \usage{ -calLM(fcst.grid, obs.grid, crossval = TRUE, apply.to = c("all", "sig"), - alpha = 0.1) +calLM( + fcst.grid, + obs.grid, + crossval = TRUE, + apply.to = c("all", "sig"), + alpha = 0.1 +) } \arguments{ \item{fcst.grid}{climate4R grid. Forecasts to be calibrated (typically on a monthly/seasonal basis). At the moment, only gridded data are supported.} @@ -32,6 +37,7 @@ Ensemble Model Output Statistics (EMOS) methods use the correspondence between t \examples{ { ## loading seasonal forecasts (CFS) and observations (NCEP) of boreal winter temperature over Iberia +require(climate4R.datasets) data("CFS_Iberia_tas"); fcst = CFS_Iberia_tas data("NCEP_Iberia_tas"); obs = NCEP_Iberia_tas ## passing from daily data to seasonal averages @@ -52,10 +58,13 @@ spatialPlot(makeMultiGrid(climatology(obs), } } \seealso{ -Other calibration: \code{\link{calCCR}}, - \code{\link{calMVA}}, \code{\link{calNGR}}, - \code{\link{calRPC}} +Other calibration: +\code{\link{calCCR}()}, +\code{\link{calMVA}()}, +\code{\link{calNGR}()}, +\code{\link{calRPC}()} } \author{ R. Manzanas and J. Bhend. } +\concept{calibration} diff --git a/man/calMVA.Rd b/man/calMVA.Rd index 76d49a1..fa8e50d 100644 --- a/man/calMVA.Rd +++ b/man/calMVA.Rd @@ -25,6 +25,7 @@ It is based on the assumption that both the reference and predicted distribution \examples{ { ## loading seasonal forecasts (CFS) and observations (NCEP) of boreal winter temperature over Iberia +require(climate4R.datasets) data("CFS_Iberia_tas"); fcst = CFS_Iberia_tas data("NCEP_Iberia_tas"); obs = NCEP_Iberia_tas ## passing from daily data to seasonal averages @@ -51,10 +52,13 @@ spatialPlot(makeMultiGrid(climatology(obs), } } \seealso{ -Other calibration: \code{\link{calCCR}}, - \code{\link{calLM}}, \code{\link{calNGR}}, - \code{\link{calRPC}} +Other calibration: +\code{\link{calCCR}()}, +\code{\link{calLM}()}, +\code{\link{calNGR}()}, +\code{\link{calRPC}()} } \author{ R. Manzanas and V. Torralba. } +\concept{calibration} diff --git a/man/calNGR.Rd b/man/calNGR.Rd index f5dae19..e92d6d7 100644 --- a/man/calNGR.Rd +++ b/man/calNGR.Rd @@ -4,8 +4,14 @@ \alias{calNGR} \title{Non-homogeneous Gaussian Regression calibration for seasonal forecasts} \usage{ -calNGR(fcst.grid, obs.grid, crossval = TRUE, type = c("NGR", "ensNGR"), - apply.to = c("all", "sig"), alpha = 0.1) +calNGR( + fcst.grid, + obs.grid, + crossval = TRUE, + type = c("NGR", "ensNGR"), + apply.to = c("all", "sig"), + alpha = 0.1 +) } \arguments{ \item{fcst.grid}{climate4R grid. Forecasts to be calibrated (typically on a monthly/seasonal basis). At the moment, only gridded data are supported.} @@ -36,7 +42,7 @@ Ensemble Model Output Statistics (EMOS) methods use the correspondence between t \examples{ { ## loading seasonal forecasts (CFS) and observations (NCEP) of boreal winter temperature over Iberia -require(transformeR) +require(climate4R.datasets) data("CFS_Iberia_tas"); fcst = CFS_Iberia_tas data("NCEP_Iberia_tas"); obs = NCEP_Iberia_tas ## passing from daily data to seasonal averages @@ -63,10 +69,13 @@ spatialPlot(makeMultiGrid(climatology(obs), } } \seealso{ -Other calibration: \code{\link{calCCR}}, - \code{\link{calLM}}, \code{\link{calMVA}}, - \code{\link{calRPC}} +Other calibration: +\code{\link{calCCR}()}, +\code{\link{calLM}()}, +\code{\link{calMVA}()}, +\code{\link{calRPC}()} } \author{ R. Manzanas and J. Bhend. } +\concept{calibration} diff --git a/man/calRPC.Rd b/man/calRPC.Rd index 2b25615..2651b20 100644 --- a/man/calRPC.Rd +++ b/man/calRPC.Rd @@ -4,8 +4,13 @@ \alias{calRPC} \title{Calibration using the Ratio of Predictable Components for seasonal climate forecasts.} \usage{ -calRPC(fcst.grid, obs.grid, crossval = TRUE, apply.to = c("all", "sig"), - alpha = 0.1) +calRPC( + fcst.grid, + obs.grid, + crossval = TRUE, + apply.to = c("all", "sig"), + alpha = 0.1 +) } \arguments{ \item{fcst.grid}{climate4R grid. Forecasts to be calibrated (typically on a monthly/seasonal basis). At the moment, only gridded data are supported.} @@ -33,6 +38,7 @@ Ensemble Model Output Statistics (EMOS) methods use the correspondence between t \examples{ { ## loading seasonal forecasts (CFS) and observations (NCEP) of boreal winter temperature over Iberia +require(climate4R.datasets) data("CFS_Iberia_tas"); fcst = CFS_Iberia_tas data("NCEP_Iberia_tas"); obs = NCEP_Iberia_tas ## passing from daily data to seasonal averages @@ -58,10 +64,13 @@ spatialPlot(makeMultiGrid(climatology(obs), } } \seealso{ -Other calibration: \code{\link{calCCR}}, - \code{\link{calLM}}, \code{\link{calMVA}}, - \code{\link{calNGR}} +Other calibration: +\code{\link{calCCR}()}, +\code{\link{calLM}()}, +\code{\link{calMVA}()}, +\code{\link{calNGR}()} } \author{ R. Manzanas. } +\concept{calibration}