diff --git a/.Rbuildignore b/.Rbuildignore index 7559a09be99ec2f3ebaae7f50ac935622f3e3d09..aa8227b142f77c731283cc23cb40abe0e7fdc490 100644 --- a/.Rbuildignore +++ b/.Rbuildignore @@ -9,4 +9,3 @@ README\.md$ \..*\.RData$ vignettes .gitlab-ci.yml -^inst/doc$ diff --git a/R/ACC.R b/R/ACC.R index aeabc0796950d180691a8e4fc6abd5c5e5309c59..a00bacf71d7f2f5df67b08cc9c3c1480c1d5c433 100644 --- a/R/ACC.R +++ b/R/ACC.R @@ -77,7 +77,9 @@ #'ano_exp <- Ano(sampleData$mod, clim$clim_exp) #'ano_obs <- Ano(sampleData$obs, clim$clim_obs) #'acc <- ACC(Mean1Dim(ano_exp, 2), Mean1Dim(ano_obs, 2)) +#' \donttest{ #'PlotACC(acc$ACC, startDates) +#' } #'@references Joliffe and Stephenson (2012). Forecast Verification: A #' Practitioner's Guide in Atmospheric Science. Wiley-Blackwell. #'@keywords datagen diff --git a/R/AnimateMap.R b/R/AnimateMap.R index 0f4d4b38d50731a796d329c20aeaaeb19577090b..83667d2a2199029677094018d6a4ed248450d795 100644 --- a/R/AnimateMap.R +++ b/R/AnimateMap.R @@ -148,11 +148,13 @@ #'dim_to_mean <- 2 # Mean along members #'rms <- RMS(Mean1Dim(season_means_mod, dim_to_mean), #' Mean1Dim(season_means_obs, dim_to_mean)) +#' \donttest{ #'AnimateMap(rms, sampleData$lon, sampleData$lat, toptitle = #' "RMSE decadal prediction", sizetit = 1, units = "degree", #' monini = 1, freq = 1, msk95lev = FALSE, brks = seq(0, 0.8, 0.08), #' intlon = 10, intlat = 10, filled.continents = TRUE, #' fileout = 'rmse_dec.gif') +#' } #'@importFrom grDevices postscript dev.off #'@export AnimateMap <- function(var, lon, lat, toptitle = rep("", 11), sizetit = 1, diff --git a/R/Ano.R b/R/Ano.R index 657e7f9b8816f00680c6d337f5ca84872833ce24..1c8ffee9059e29aac9b9c20496424b234d917263 100644 --- a/R/Ano.R +++ b/R/Ano.R @@ -31,9 +31,11 @@ #'dim_to_smooth <- 4 # Smooth along lead-times #'smooth_ano_exp <- Smoothing(ano_exp, runmean_nb_months, dim_to_smooth) #'smooth_ano_obs <- Smoothing(ano_obs, runmean_nb_months, dim_to_smooth) +#' \donttest{ #'PlotAno(smooth_ano_exp, smooth_ano_obs, startDates, #' toptitle = paste('smoothed anomalies'), ytitle = c('K', 'K', 'K'), #' legends = 'ERSST', biglab = FALSE, fileout = 'tos_ano.eps') +#' } #'@export Ano <- function(var, clim) { # diff --git a/R/Ano_CrossValid.R b/R/Ano_CrossValid.R index e42941f256f3fcb85859c430d64317c56bc43e66..954a08144565c42e76ec80eb5e3b996fbd822149 100644 --- a/R/Ano_CrossValid.R +++ b/R/Ano_CrossValid.R @@ -26,9 +26,11 @@ #'# Load sample data as in Load() example: #'example(Load) #'anomalies <- Ano_CrossValid(sampleData$mod, sampleData$obs) +#' \donttest{ #'PlotAno(anomalies$ano_exp, anomalies$ano_obs, startDates, #' toptitle = paste('anomalies'), ytitle = c('K', 'K', 'K'), #' legends = 'ERSST', biglab = FALSE, fileout = 'tos_ano_crossvalid.eps') +#' } #'@export Ano_CrossValid <- function(var_exp, var_obs, memb = TRUE) { # diff --git a/R/Clim.R b/R/Clim.R index 8a390ad4a96b6f57821e094f57c47f759ff41d21..8445e46277bcba517dd1256d957dbe3347c1b0fb 100644 --- a/R/Clim.R +++ b/R/Clim.R @@ -41,10 +41,12 @@ #'# Load sample data as in Load() example: #'example(Load) #'clim <- Clim(sampleData$mod, sampleData$obs) +#' \donttest{ #'PlotClim(clim$clim_exp, clim$clim_obs, #' toptitle = paste('sea surface temperature climatologies'), #' ytitle = 'K', monini = 11, listexp = c('CMIP5 IC3'), #' listobs = c('ERSST'), biglab = FALSE, fileout = 'tos_clim.eps') +#' } #'@export Clim <- function(var_exp, var_obs, memb = TRUE, kharin = FALSE, NDV = FALSE) { # diff --git a/R/Consist_Trend.R b/R/Consist_Trend.R index 827440fc8fedb0b093c6055686df6c65d88acca5..2a82fd9c021ab1028379515fb94bbef325ffd3ff 100644 --- a/R/Consist_Trend.R +++ b/R/Consist_Trend.R @@ -57,6 +57,7 @@ #' Mean1Dim(smooth_ano_obs, dim_to_mean), #' years_between_startdates) #' +#' \donttest{ #'PlotVsLTime(trend$trend, toptitle = "trend", ytitle = "K/(5 years)", #' monini = 11, limits = c(-0.8, 0.8), listexp = c('CMIP5 IC3'), #' listobs = c('ERSST'), biglab = FALSE, hlines = c(0), @@ -64,6 +65,7 @@ #'PlotAno(InsertDim(trend$detrendedmod,2,1), InsertDim(trend$detrendedobs,2,1), #' startDates, "Detrended tos anomalies", ytitle = 'K', #' legends = 'ERSST', biglab = FALSE, fileout = 'tos_detrended_ano.eps') +#' } #' #'@export Consist_Trend <- function(var_exp, var_obs, interval = 1) { diff --git a/R/Corr.R b/R/Corr.R index 18ae9b1455f4445a5112b0ba462d64bad7a3974c..419002305586a9920628244c6445ee7f7ef20774 100644 --- a/R/Corr.R +++ b/R/Corr.R @@ -86,10 +86,12 @@ #' compROW = required_complete_row, #' limits = c(ceiling((runmean_months + 1) / 2), #' leadtimes_per_startdate - floor(runmean_months / 2))) +#' \donttest{ #'PlotVsLTime(corr, toptitle = "correlations", ytitle = "correlation", #' monini = 11, limits = c(-1, 2), listexp = c('CMIP5 IC3'), #' listobs = c('ERSST'), biglab = FALSE, hlines = c(-1, 0, 1), #' fileout = 'tos_cor.eps') +#' } #' #'# The following example uses veriApply combined with .Corr instead of Corr #' \dontrun{ diff --git a/R/Filter.R b/R/Filter.R index 42c847f91cd017086576b2d0d423600d94afb5aa..474c9c597b33a4a83f38f0aed7b12e1dea06879c 100644 --- a/R/Filter.R +++ b/R/Filter.R @@ -30,8 +30,10 @@ #' } #' } #'} +#' \donttest{ #'PlotAno(InsertDim(ensmod, 2, 1), sdates = startDates, fileout = #' 'filtered_ensemble_mean.eps') +#' } #' #'@importFrom stats lm #'@export diff --git a/R/Histo2Hindcast.R b/R/Histo2Hindcast.R index cb93ae8606ce81bbd32b69b4883e290e025ad732..7693319cc9ecfd053761e068f24793494386eb48 100644 --- a/R/Histo2Hindcast.R +++ b/R/Histo2Hindcast.R @@ -58,9 +58,11 @@ #' start_dates_out, leadtimes_per_startdate) #'observational_data <- Histo2Hindcast(sampleData$obs, startDates[1], #' start_dates_out, leadtimes_per_startdate) +#' \donttest{ #'PlotAno(experimental_data, observational_data, start_dates_out, #' toptitle = paste('anomalies reorganized into shorter chunks'), #' ytitle = 'K', fileout='tos_histo2hindcast.eps') +#' } #' #'@export Histo2Hindcast <- function(varin, sdatesin, sdatesout, nleadtimesout) { diff --git a/R/NAO.R b/R/NAO.R index c0d7c94d10ec2bb96d7109508081cb0d777917f2..bab4d3e0a4a56dabbc8a8c258f89e67ffb613ea8 100644 --- a/R/NAO.R +++ b/R/NAO.R @@ -111,8 +111,10 @@ #'# example data is not the full NAO area: NAO() will raise a warning. #'nao <- NAO(ano$ano_exp, ano$ano_obs, sampleData$lon, sampleData$lat) #'# Finally plot the NAO index +#' \donttest{ #'PlotBoxWhisker(nao$NAO_exp, nao$NAO_obs, "NAO index, DJF", "NAO index (PC1) TOS", #' monini = 12, yearini = 1985, freq = 1, "Exp. A", "Obs. X") +#' } #' #'@export NAO <- function(ano_exp = NULL, ano_obs = NULL, lon, lat, ftime_average = 2:4, obsproj = TRUE) { diff --git a/R/Plot2VarsVsLTime.R b/R/Plot2VarsVsLTime.R index c5d5abcf88420044f33e426e834889365df23bda..1e2fc6d9081b33a4ecae72395e6b052ab4c535f0 100644 --- a/R/Plot2VarsVsLTime.R +++ b/R/Plot2VarsVsLTime.R @@ -76,10 +76,12 @@ #'smooth_ano_exp_m_sub <- smooth_ano_exp - InsertDim(Mean1Dim(smooth_ano_exp, 2, #' narm = TRUE), 2, dim(smooth_ano_exp)[2]) #'spread <- Spread(smooth_ano_exp_m_sub, c(2, 3)) +#' \donttest{ #'Plot2VarsVsLTime(InsertDim(rms[, , , ], 1, 1), spread$sd, #' toptitle = 'RMSE and spread', monini = 11, freq = 12, #' listexp = c('CMIP5 IC3'), listvar = c('RMSE', 'spread'), #' fileout = 'plot2vars.eps') +#' } #' #'@importFrom grDevices png jpeg postscript pdf svg bmp tiff postscript dev.cur dev.new dev.off #'@importFrom stats ts diff --git a/R/PlotACC.R b/R/PlotACC.R index bff6511ad2bb0d556221b15aaf5b8dfd04103296..872327f15830093f9de97fd9bac33d15008edd6b 100644 --- a/R/PlotACC.R +++ b/R/PlotACC.R @@ -85,8 +85,10 @@ #'ano_obs <- Ano(sampleData$obs, clim$clim_obs) #'acc <- ACC(Mean1Dim(sampleData$mod, 2), #' Mean1Dim(sampleData$obs, 2)) +#' \donttest{ #'PlotACC(acc$ACC, startDates, toptitle = "Anomaly Correlation Coefficient") #' +#' } #'@importFrom grDevices dev.cur dev.new dev.off #'@importFrom stats ts #'@export diff --git a/R/PlotAno.R b/R/PlotAno.R index cc897a923c11844a09ac28a6eeaf8bd1469f9dc6..922806aa227ec5ab9993a87212f110cb718f9561 100644 --- a/R/PlotAno.R +++ b/R/PlotAno.R @@ -66,9 +66,11 @@ #'dim_to_smooth <- 4 # Smooth along lead-times #'smooth_ano_exp <- Smoothing(ano_exp, runmean_nb_months, dim_to_smooth) #'smooth_ano_obs <- Smoothing(ano_obs, runmean_nb_months, dim_to_smooth) +#' \donttest{ #'PlotAno(smooth_ano_exp, smooth_ano_obs, startDates, #' toptitle = paste('smoothed anomalies'), ytitle = c('K', 'K', 'K'), #' legends = 'ERSST', biglab = FALSE, fileout = 'tos_ano.eps') +#' } #' #'@importFrom grDevices dev.cur dev.new dev.off #'@importFrom stats ts diff --git a/R/PlotBoxWhisker.R b/R/PlotBoxWhisker.R index 1574522c0a102c7723506669ddd8de3de68b255f..46c5335507e395c5dd281d31e7ea7664c809668a 100644 --- a/R/PlotBoxWhisker.R +++ b/R/PlotBoxWhisker.R @@ -95,8 +95,10 @@ #'ano <- Ano_CrossValid(sampleData$mod, sampleData$obs) #'nao <- NAO(ano$ano_exp, ano$ano_obs, sampleData$lon, sampleData$lat) #'# Finally plot the nao index +#' \donttest{ #'PlotBoxWhisker(nao$NAO_exp, nao$NAO_obs, "NAO index, DJF", "NAO index (PC1) TOS", #' monini = 12, yearini = 1985, freq = 1, "Exp. A", "Obs. X") +#' } #' #'@importFrom grDevices dev.cur dev.new dev.off #'@importFrom stats cor diff --git a/R/PlotClim.R b/R/PlotClim.R index e7e6ac313ebc5df09a2701b2e4451dbfeecfe89b..a002429f5f80d1a11692ec1624a58d225f08d083 100644 --- a/R/PlotClim.R +++ b/R/PlotClim.R @@ -49,9 +49,11 @@ #'# Load sample data as in Load() example: #'example(Load) #'clim <- Clim(sampleData$mod, sampleData$obs) +#' \donttest{ #'PlotClim(clim$clim_exp, clim$clim_obs, toptitle = paste('climatologies'), #' ytitle = 'K', monini = 11, listexp = c('CMIP5 IC3'), #' listobs = c('ERSST'), biglab = FALSE, fileout = 'tos_clim.eps') +#' } #' #'@importFrom grDevices dev.cur dev.new dev.off #'@importFrom stats ts diff --git a/R/PlotVsLTime.R b/R/PlotVsLTime.R index e3f7b7f758fc9a82f661fdbcae4927084e3b994e..8920438ca315a4be531eb9ba72584df8b33dfb1d 100644 --- a/R/PlotVsLTime.R +++ b/R/PlotVsLTime.R @@ -90,10 +90,12 @@ #' compROW = required_complete_row, #' limits = c(ceiling((runmean_months + 1) / 2), #' leadtimes_per_startdate - floor(runmean_months / 2))) +#' \donttest{ #'PlotVsLTime(corr, toptitle = "correlations", ytitle = "correlation", #' monini = 11, limits = c(-1, 2), listexp = c('CMIP5 IC3'), #' listobs = c('ERSST'), biglab = FALSE, hlines = c(-1, 0, 1), #' fileout = 'tos_cor.eps') +#' } #' #'@importFrom grDevices dev.cur dev.new dev.off #'@importFrom stats ts diff --git a/R/RMS.R b/R/RMS.R index bb3dd3890a800a3a0ec0f3c132a6b66998a0791a..c83b478256da2cb21359e330f2032caf15238507 100644 --- a/R/RMS.R +++ b/R/RMS.R @@ -78,10 +78,12 @@ #' compROW = required_complete_row, #' limits = c(ceiling((runmean_months + 1) / 2), #' leadtimes_per_startdate - floor(runmean_months / 2))) +#' \donttest{ #'PlotVsLTime(rms, toptitle = "Root Mean Square Error", ytitle = "K", #' monini = 11, limits = NULL, listexp = c('CMIP5 IC3'), #' listobs = c('ERSST'), biglab = FALSE, hlines = c(0), #' fileout = 'tos_rms.eps') +#' } #'# The following example uses veriApply combined with .RMS instead of RMS #' \dontrun{ #'require(easyVerification) diff --git a/R/RMSSS.R b/R/RMSSS.R index 16623b3262762ccab1673a296e57601d5d0ed7a0..0ffe36f687f684d3f5d32f3569d79a7a0cd9f866 100644 --- a/R/RMSSS.R +++ b/R/RMSSS.R @@ -56,10 +56,12 @@ #'rmsss_plot <- array(dim = c(dim(rmsss)[1:2], 4, dim(rmsss)[4])) #'rmsss_plot[, , 2, ] <- rmsss[, , 1, ] #'rmsss_plot[, , 4, ] <- rmsss[, , 2, ] +#' \donttest{ #'PlotVsLTime(rmsss_plot, toptitle = "Root Mean Square Skill Score", ytitle = "", #' monini = 11, limits = c(-1, 1.3), listexp = c('CMIP5 IC3'), #' listobs = c('ERSST'), biglab = FALSE, hlines = c(-1, 0, 1), #' fileout = 'tos_rmsss.eps') +#' } #'# The following example uses veriApply combined with .RMSSS instead of RMSSS #' \dontrun{ #'require(easyVerification) diff --git a/R/RatioSDRMS.R b/R/RatioSDRMS.R index ec16bc3b43483ef891c08c98181360047b5ea33e..62fe3ebcfd1934c9d67d8e31ebdc2af0388d0ca1 100644 --- a/R/RatioSDRMS.R +++ b/R/RatioSDRMS.R @@ -50,10 +50,12 @@ #'rsdrms_plot <- array(dim = c(dim(rsdrms)[1:2], 4, dim(rsdrms)[4])) #'rsdrms_plot[, , 2, ] <- rsdrms[, , 1, ] #'rsdrms_plot[, , 4, ] <- rsdrms[, , 2, ] +#' \donttest{ #'PlotVsLTime(rsdrms_plot, toptitle = "Ratio ensemble spread / RMSE", ytitle = "", #' monini = 11, limits = c(-1, 1.3), listexp = c('CMIP5 IC3'), #' listobs = c('ERSST'), biglab = FALSE, siglev = TRUE, #' fileout = 'tos_rsdrms.eps') +#' } #' #'# The following example uses veriApply combined with .RatioSDRMS instead of RatioSDRMS #' \dontrun{ diff --git a/R/Season.R b/R/Season.R index d9f95a51cd33a77d4a2f29079a21ca3a5d2f49d3..baa19bbc016bb4d7baa0396769b3f8ae4f15da67 100644 --- a/R/Season.R +++ b/R/Season.R @@ -32,9 +32,11 @@ #' mean_start_month, mean_stop_month) #'season_means_obs <- Season(sampleData$obs, leadtimes_dimension, initial_month, #' mean_start_month, mean_stop_month) +#' \donttest{ #'PlotAno(season_means_mod, season_means_obs, startDates, #' toptitle = paste('winter (DJF) temperatures'), ytitle = c('K'), #' legends = 'ERSST', biglab = FALSE, fileout = 'tos_season_means.eps') +#' } #'@export Season <- function(var, posdim = 4, monini, moninf, monsup) { while (monsup < moninf) { diff --git a/R/Smoothing.R b/R/Smoothing.R index 65aac018e861d6956ea012cfc40f341907ac18c4..baf7edd24203bdf644e7a2520a22684015787f27 100644 --- a/R/Smoothing.R +++ b/R/Smoothing.R @@ -28,9 +28,11 @@ #'dim_to_smooth <- 4 # Smooth along lead-times #'smooth_ano_exp <- Smoothing(ano_exp, runmean_months, dim_to_smooth) #'smooth_ano_obs <- Smoothing(ano_obs, runmean_months, dim_to_smooth) +#' \donttest{ #'PlotAno(smooth_ano_exp, smooth_ano_obs, startDates, #' toptitle = "Smoothed Mediterranean mean SST", ytitle = "K", #' fileout = "tos_smoothed_ano.eps") +#' } #'@import plyr #'@export Smoothing <- function(var, runmeanlen = 12, numdimt = 4) { diff --git a/R/Spectrum.R b/R/Spectrum.R index bb9b2ca6623f3e3b48dbd243c65c6ca268c108e4..48f3823b24f3ba6f7a37e9be9ce96d2986ec415b 100644 --- a/R/Spectrum.R +++ b/R/Spectrum.R @@ -31,8 +31,10 @@ #' } #' } #'} +#' \donttest{ #'PlotAno(InsertDim(ensmod, 2, 1), sdates = startDates, fileout = #' 'filtered_ensemble_mean.eps') +#' } #' #'@importFrom stats spectrum cor rnorm sd quantile #'@export diff --git a/R/Spread.R b/R/Spread.R index 5a8e01896237b882672b8ab69aa76db64b740565..f69aa1b848eb591929a29c7bbcf1a0ffd755d665 100644 --- a/R/Spread.R +++ b/R/Spread.R @@ -58,6 +58,7 @@ #'smooth_ano_exp_m_sub <- smooth_ano_exp - InsertDim(Mean1Dim(smooth_ano_exp, 2, #' narm = TRUE), 2, dim(smooth_ano_exp)[2]) #'spread <- Spread(smooth_ano_exp_m_sub, c(2, 3)) +#' \donttest{ #'PlotVsLTime(spread$iqr, #' toptitle = "Inter-Quartile Range between ensemble members", #' ytitle = "K", monini = 11, limits = NULL, @@ -75,6 +76,7 @@ #' ytitle = "K", monini = 11, limits = NULL, #' listexp = c('CMIP5 IC3'), listobs = c('ERSST'), biglab = FALSE, #' hlines = c(0), fileout = 'tos_mad.eps') +#' } #' #'@importFrom stats IQR sd mad runif quantile #'@export diff --git a/R/ToyModel.R b/R/ToyModel.R index f0c9a22dfeee70e38ba98424cb45e3ff5294bb70..4b06facf23208e31dfbe24aaf9b121e1d181fb9a 100644 --- a/R/ToyModel.R +++ b/R/ToyModel.R @@ -97,9 +97,11 @@ #' #'toyforecast <- ToyModel(alpha = a, beta = b, gamma = g, nmemb = nm, #' obsini = sampleData$obs, nstartd = 5, nleadt = 60) +#' \donttest{ #'PlotAno(toyforecast$mod, toyforecast$obs, startDates, #' toptitle = c("Synthetic decadal temperature prediction"), -#' fileout = "ex_toymodel.eps") +#' fileout = "ex_toymodel.eps") +#' } #' #'@importFrom stats rnorm #'@export diff --git a/R/Trend.R b/R/Trend.R index d8bfc6014b4be5d19c6224d967f0b18b52e79cad..ba35b4d7d7f4b2038b0fc9df783aadcd8a28f327 100644 --- a/R/Trend.R +++ b/R/Trend.R @@ -49,6 +49,7 @@ #'example(Load) #'months_between_startdates <- 60 #'trend <- Trend(sampleData$obs, 3, months_between_startdates) +#' \donttest{ #'PlotVsLTime(trend$trend, toptitle = "trend", ytitle = "K / (5 year)", #' monini = 11, limits = c(-1,1), listexp = c('CMIP5 IC3'), #' listobs = c('ERSST'), biglab = FALSE, hlines = 0, @@ -56,6 +57,7 @@ #'PlotAno(trend$detrended, NULL, startDates, #' toptitle = 'detrended anomalies (along the startdates)', ytitle = 'K', #' legends = 'ERSST', biglab = FALSE, fileout = 'tos_detrended_obs.eps') +#' } #' #'@rdname Trend #'@export diff --git a/man/ACC.Rd b/man/ACC.Rd index 17e2d7cf0369e6a2f3a6b1f6a4bf98e0f566e415..e3db377ff89f82c9d4d3cab82033aa487320b6b1 100644 --- a/man/ACC.Rd +++ b/man/ACC.Rd @@ -93,7 +93,9 @@ clim <- Clim(sampleData$mod, sampleData$obs) ano_exp <- Ano(sampleData$mod, clim$clim_exp) ano_obs <- Ano(sampleData$obs, clim$clim_obs) acc <- ACC(Mean1Dim(ano_exp, 2), Mean1Dim(ano_obs, 2)) + \donttest{ PlotACC(acc$ACC, startDates) + } } \author{ History:\cr diff --git a/man/AnimateMap.Rd b/man/AnimateMap.Rd index 85eb04a9609b368928d8ca85d4db9ce1870eb9be..96074b01680e82364e133050b4853fbf54e374ee 100644 --- a/man/AnimateMap.Rd +++ b/man/AnimateMap.Rd @@ -179,11 +179,13 @@ AnimateMap(Mean1Dim(season_means_mod, 2)[1, 1, , , ], sampleData$lon, dim_to_mean <- 2 # Mean along members rms <- RMS(Mean1Dim(season_means_mod, dim_to_mean), Mean1Dim(season_means_obs, dim_to_mean)) + \donttest{ AnimateMap(rms, sampleData$lon, sampleData$lat, toptitle = "RMSE decadal prediction", sizetit = 1, units = "degree", monini = 1, freq = 1, msk95lev = FALSE, brks = seq(0, 0.8, 0.08), intlon = 10, intlat = 10, filled.continents = TRUE, fileout = 'rmse_dec.gif') + } } \author{ History:\cr diff --git a/man/Ano.Rd b/man/Ano.Rd index a2deb37384718231f72d51fdbe0c1602b846903d..6143be88a1d78f87901e0dc6c7774f26dd4e4055 100644 --- a/man/Ano.Rd +++ b/man/Ano.Rd @@ -37,9 +37,11 @@ runmean_nb_months <- 12 dim_to_smooth <- 4 # Smooth along lead-times smooth_ano_exp <- Smoothing(ano_exp, runmean_nb_months, dim_to_smooth) smooth_ano_obs <- Smoothing(ano_obs, runmean_nb_months, dim_to_smooth) + \donttest{ PlotAno(smooth_ano_exp, smooth_ano_obs, startDates, toptitle = paste('smoothed anomalies'), ytitle = c('K', 'K', 'K'), legends = 'ERSST', biglab = FALSE, fileout = 'tos_ano.eps') + } } \author{ History:\cr diff --git a/man/Ano_CrossValid.Rd b/man/Ano_CrossValid.Rd index bb2be436f59096d452240bae72da7698805de64c..85d1badbe8213a7c3bd5f275d09f36a3d254ce27 100644 --- a/man/Ano_CrossValid.Rd +++ b/man/Ano_CrossValid.Rd @@ -31,9 +31,11 @@ with a cross-validation technique and a per-pair method. # Load sample data as in Load() example: example(Load) anomalies <- Ano_CrossValid(sampleData$mod, sampleData$obs) + \donttest{ PlotAno(anomalies$ano_exp, anomalies$ano_obs, startDates, toptitle = paste('anomalies'), ytitle = c('K', 'K', 'K'), legends = 'ERSST', biglab = FALSE, fileout = 'tos_ano_crossvalid.eps') + } } \author{ History:\cr diff --git a/man/Clim.Rd b/man/Clim.Rd index 3b11fe25276104183b94c85f00ca06009728dc63..1ef5e3dabb76b6bf4fc7b5b3956351de2ef2f265 100644 --- a/man/Clim.Rd +++ b/man/Clim.Rd @@ -50,10 +50,12 @@ all the data (model and obs) are excluded when computing the climatologies. # Load sample data as in Load() example: example(Load) clim <- Clim(sampleData$mod, sampleData$obs) + \donttest{ PlotClim(clim$clim_exp, clim$clim_obs, toptitle = paste('sea surface temperature climatologies'), ytitle = 'K', monini = 11, listexp = c('CMIP5 IC3'), listobs = c('ERSST'), biglab = FALSE, fileout = 'tos_clim.eps') + } } \author{ History:\cr diff --git a/man/Consist_Trend.Rd b/man/Consist_Trend.Rd index a2911c6407fdcb730d5b6a07bb88cfb2b6b3f94f..d067dcd7069e1fe2ee1b28bb612aba1668761f3c 100644 --- a/man/Consist_Trend.Rd +++ b/man/Consist_Trend.Rd @@ -63,6 +63,7 @@ trend <- Consist_Trend(Mean1Dim(smooth_ano_exp, dim_to_mean), Mean1Dim(smooth_ano_obs, dim_to_mean), years_between_startdates) + \donttest{ PlotVsLTime(trend$trend, toptitle = "trend", ytitle = "K/(5 years)", monini = 11, limits = c(-0.8, 0.8), listexp = c('CMIP5 IC3'), listobs = c('ERSST'), biglab = FALSE, hlines = c(0), @@ -70,6 +71,7 @@ PlotVsLTime(trend$trend, toptitle = "trend", ytitle = "K/(5 years)", PlotAno(InsertDim(trend$detrendedmod,2,1), InsertDim(trend$detrendedobs,2,1), startDates, "Detrended tos anomalies", ytitle = 'K', legends = 'ERSST', biglab = FALSE, fileout = 'tos_detrended_ano.eps') + } } \author{ diff --git a/man/Corr.Rd b/man/Corr.Rd index fcaf149adf0f3193beb8373462f48e42f09ef64f..e311813de042355a4499b46d3dd6d9d6fb11c1f9 100644 --- a/man/Corr.Rd +++ b/man/Corr.Rd @@ -104,10 +104,12 @@ corr <- Corr(Mean1Dim(smooth_ano_exp, dim_to_mean), compROW = required_complete_row, limits = c(ceiling((runmean_months + 1) / 2), leadtimes_per_startdate - floor(runmean_months / 2))) + \donttest{ PlotVsLTime(corr, toptitle = "correlations", ytitle = "correlation", monini = 11, limits = c(-1, 2), listexp = c('CMIP5 IC3'), listobs = c('ERSST'), biglab = FALSE, hlines = c(-1, 0, 1), fileout = 'tos_cor.eps') + } # The following example uses veriApply combined with .Corr instead of Corr \dontrun{ diff --git a/man/Filter.Rd b/man/Filter.Rd index 3ee7df89e18fde582ed2f6e951736a60e5169f0b..3e40f105c3e557f1fcb68516e019e1845d705c1a 100644 --- a/man/Filter.Rd +++ b/man/Filter.Rd @@ -36,8 +36,10 @@ for (jstartdate in 1:3) { } } } + \donttest{ PlotAno(InsertDim(ensmod, 2, 1), sdates = startDates, fileout = 'filtered_ensemble_mean.eps') + } } \author{ diff --git a/man/Histo2Hindcast.Rd b/man/Histo2Hindcast.Rd index af494f1a481e798005cc3d33719739c6a799247d..7000628a8ca108cd47e8fee055300871ec6ea695 100644 --- a/man/Histo2Hindcast.Rd +++ b/man/Histo2Hindcast.Rd @@ -66,9 +66,11 @@ experimental_data <- Histo2Hindcast(sampleData$mod, startDates[1], start_dates_out, leadtimes_per_startdate) observational_data <- Histo2Hindcast(sampleData$obs, startDates[1], start_dates_out, leadtimes_per_startdate) + \donttest{ PlotAno(experimental_data, observational_data, start_dates_out, toptitle = paste('anomalies reorganized into shorter chunks'), ytitle = 'K', fileout='tos_histo2hindcast.eps') + } } \author{ diff --git a/man/NAO.Rd b/man/NAO.Rd index 2767f7e857f6b0806d3559c41484a94d336265e8..24d58830e7363fee6ed12b2e9aa70a63eb6dd475 100644 --- a/man/NAO.Rd +++ b/man/NAO.Rd @@ -107,8 +107,10 @@ ano <- Ano_CrossValid(sampleData$mod, sampleData$obs) # example data is not the full NAO area: NAO() will raise a warning. nao <- NAO(ano$ano_exp, ano$ano_obs, sampleData$lon, sampleData$lat) # Finally plot the NAO index + \donttest{ PlotBoxWhisker(nao$NAO_exp, nao$NAO_obs, "NAO index, DJF", "NAO index (PC1) TOS", monini = 12, yearini = 1985, freq = 1, "Exp. A", "Obs. X") + } } \author{ diff --git a/man/Plot2VarsVsLTime.Rd b/man/Plot2VarsVsLTime.Rd index e79fb34edfae731da6e1409f6365726b6db3f01b..8ba44e4ee8838e58042d9bb6d0fa39cc306433e1 100644 --- a/man/Plot2VarsVsLTime.Rd +++ b/man/Plot2VarsVsLTime.Rd @@ -106,10 +106,12 @@ rms <- RMS(Mean1Dim(smooth_ano_exp, dim_to_mean), smooth_ano_exp_m_sub <- smooth_ano_exp - InsertDim(Mean1Dim(smooth_ano_exp, 2, narm = TRUE), 2, dim(smooth_ano_exp)[2]) spread <- Spread(smooth_ano_exp_m_sub, c(2, 3)) + \donttest{ Plot2VarsVsLTime(InsertDim(rms[, , , ], 1, 1), spread$sd, toptitle = 'RMSE and spread', monini = 11, freq = 12, listexp = c('CMIP5 IC3'), listvar = c('RMSE', 'spread'), fileout = 'plot2vars.eps') + } } \author{ diff --git a/man/PlotACC.Rd b/man/PlotACC.Rd index 3427f652e8d76ff3a93ec9295f2cf47497237092..fc66200a0388b94d810c868be5335b9dcf1c18fe 100644 --- a/man/PlotACC.Rd +++ b/man/PlotACC.Rd @@ -111,8 +111,10 @@ ano_exp <- Ano(sampleData$mod, clim$clim_exp) ano_obs <- Ano(sampleData$obs, clim$clim_obs) acc <- ACC(Mean1Dim(sampleData$mod, 2), Mean1Dim(sampleData$obs, 2)) + \donttest{ PlotACC(acc$ACC, startDates, toptitle = "Anomaly Correlation Coefficient") + } } \author{ History:\cr diff --git a/man/PlotAno.Rd b/man/PlotAno.Rd index 8a42d9fe53aab7e156a2125b56b50cc58a8f5945..dd05931046ca62108d5b8916ba2c5f6f13e92054 100644 --- a/man/PlotAno.Rd +++ b/man/PlotAno.Rd @@ -96,9 +96,11 @@ runmean_nb_months <- 12 dim_to_smooth <- 4 # Smooth along lead-times smooth_ano_exp <- Smoothing(ano_exp, runmean_nb_months, dim_to_smooth) smooth_ano_obs <- Smoothing(ano_obs, runmean_nb_months, dim_to_smooth) + \donttest{ PlotAno(smooth_ano_exp, smooth_ano_obs, startDates, toptitle = paste('smoothed anomalies'), ytitle = c('K', 'K', 'K'), legends = 'ERSST', biglab = FALSE, fileout = 'tos_ano.eps') + } } \author{ diff --git a/man/PlotBoxWhisker.Rd b/man/PlotBoxWhisker.Rd index 31b7d4d42fdcf4b22f2c264ab33dc2f334a7a8ce..a536686be6087cfb54b8c967ef4bfbbe80a37e3b 100644 --- a/man/PlotBoxWhisker.Rd +++ b/man/PlotBoxWhisker.Rd @@ -114,8 +114,10 @@ attr(sampleData$lat, 'last_lat') <- 80 ano <- Ano_CrossValid(sampleData$mod, sampleData$obs) nao <- NAO(ano$ano_exp, ano$ano_obs, sampleData$lon, sampleData$lat) # Finally plot the nao index + \donttest{ PlotBoxWhisker(nao$NAO_exp, nao$NAO_obs, "NAO index, DJF", "NAO index (PC1) TOS", monini = 12, yearini = 1985, freq = 1, "Exp. A", "Obs. X") + } } \author{ diff --git a/man/PlotClim.Rd b/man/PlotClim.Rd index 38c916cbe20c6bac672337c0ff775bf93bc62bd8..7ee001ee198eb506524cde9c967557dc3ec9ebc1 100644 --- a/man/PlotClim.Rd +++ b/man/PlotClim.Rd @@ -74,9 +74,11 @@ c(nobs, nmemb, nltime) or c(nobs, nltime) for the observational data # Load sample data as in Load() example: example(Load) clim <- Clim(sampleData$mod, sampleData$obs) + \donttest{ PlotClim(clim$clim_exp, clim$clim_obs, toptitle = paste('climatologies'), ytitle = 'K', monini = 11, listexp = c('CMIP5 IC3'), listobs = c('ERSST'), biglab = FALSE, fileout = 'tos_clim.eps') + } } \author{ diff --git a/man/PlotVsLTime.Rd b/man/PlotVsLTime.Rd index e908e57b2ce6c8bd8b0810d266316ca9f3e2491b..2c71e9fac1915afa9d9fcba50006d360da2a44c7 100644 --- a/man/PlotVsLTime.Rd +++ b/man/PlotVsLTime.Rd @@ -117,10 +117,12 @@ corr <- Corr(Mean1Dim(smooth_ano_exp, dim_to_mean), compROW = required_complete_row, limits = c(ceiling((runmean_months + 1) / 2), leadtimes_per_startdate - floor(runmean_months / 2))) + \donttest{ PlotVsLTime(corr, toptitle = "correlations", ytitle = "correlation", monini = 11, limits = c(-1, 2), listexp = c('CMIP5 IC3'), listobs = c('ERSST'), biglab = FALSE, hlines = c(-1, 0, 1), fileout = 'tos_cor.eps') + } } \author{ diff --git a/man/RMS.Rd b/man/RMS.Rd index cf26c75cb7c8dbfb48b5182c73b521bc0f61d916..715f84d10e82bf233cf2e6016668006a965067ea 100644 --- a/man/RMS.Rd +++ b/man/RMS.Rd @@ -94,10 +94,12 @@ rms <- RMS(Mean1Dim(smooth_ano_exp, dim_to_mean), compROW = required_complete_row, limits = c(ceiling((runmean_months + 1) / 2), leadtimes_per_startdate - floor(runmean_months / 2))) + \donttest{ PlotVsLTime(rms, toptitle = "Root Mean Square Error", ytitle = "K", monini = 11, limits = NULL, listexp = c('CMIP5 IC3'), listobs = c('ERSST'), biglab = FALSE, hlines = c(0), fileout = 'tos_rms.eps') + } # The following example uses veriApply combined with .RMS instead of RMS \dontrun{ require(easyVerification) diff --git a/man/RMSSS.Rd b/man/RMSSS.Rd index 234170b86f376b2e4bc993324b930e82e7d172d5..f602702bf715d5adca99971942cb90a4facd47b3 100644 --- a/man/RMSSS.Rd +++ b/man/RMSSS.Rd @@ -70,10 +70,12 @@ rmsss <- RMSSS(Mean1Dim(ano_exp, 2), Mean1Dim(ano_obs, 2)) rmsss_plot <- array(dim = c(dim(rmsss)[1:2], 4, dim(rmsss)[4])) rmsss_plot[, , 2, ] <- rmsss[, , 1, ] rmsss_plot[, , 4, ] <- rmsss[, , 2, ] + \donttest{ PlotVsLTime(rmsss_plot, toptitle = "Root Mean Square Skill Score", ytitle = "", monini = 11, limits = c(-1, 1.3), listexp = c('CMIP5 IC3'), listobs = c('ERSST'), biglab = FALSE, hlines = c(-1, 0, 1), fileout = 'tos_rmsss.eps') + } # The following example uses veriApply combined with .RMSSS instead of RMSSS \dontrun{ require(easyVerification) diff --git a/man/RatioSDRMS.Rd b/man/RatioSDRMS.Rd index bb5848a5c71ca3f04d93a0ae66d7d4114072d47c..0948474075c4bc25f572dafd0ab3180373ba0d6a 100644 --- a/man/RatioSDRMS.Rd +++ b/man/RatioSDRMS.Rd @@ -61,10 +61,12 @@ rsdrms <- RatioSDRMS(sampleData$mod, sampleData$obs) rsdrms_plot <- array(dim = c(dim(rsdrms)[1:2], 4, dim(rsdrms)[4])) rsdrms_plot[, , 2, ] <- rsdrms[, , 1, ] rsdrms_plot[, , 4, ] <- rsdrms[, , 2, ] + \donttest{ PlotVsLTime(rsdrms_plot, toptitle = "Ratio ensemble spread / RMSE", ytitle = "", monini = 11, limits = c(-1, 1.3), listexp = c('CMIP5 IC3'), listobs = c('ERSST'), biglab = FALSE, siglev = TRUE, fileout = 'tos_rsdrms.eps') + } # The following example uses veriApply combined with .RatioSDRMS instead of RatioSDRMS \dontrun{ diff --git a/man/Season.Rd b/man/Season.Rd index 08487256eea4cb2072078adbc9cdaf1e7b1158fd..cc97941c4dcf956e61c2e3c6442275949ec87ae0 100644 --- a/man/Season.Rd +++ b/man/Season.Rd @@ -42,9 +42,11 @@ season_means_mod <- Season(sampleData$mod, leadtimes_dimension, initial_month, mean_start_month, mean_stop_month) season_means_obs <- Season(sampleData$obs, leadtimes_dimension, initial_month, mean_start_month, mean_stop_month) + \donttest{ PlotAno(season_means_mod, season_means_obs, startDates, toptitle = paste('winter (DJF) temperatures'), ytitle = c('K'), legends = 'ERSST', biglab = FALSE, fileout = 'tos_season_means.eps') + } } \author{ History:\cr diff --git a/man/Smoothing.Rd b/man/Smoothing.Rd index 77a23cc996ee0c0f5f6ad8469da529f119c4af05..4fa9c596f8ff9cb7272922b85b67a1dc1966d3da 100644 --- a/man/Smoothing.Rd +++ b/man/Smoothing.Rd @@ -32,9 +32,11 @@ runmean_months <- 12 dim_to_smooth <- 4 # Smooth along lead-times smooth_ano_exp <- Smoothing(ano_exp, runmean_months, dim_to_smooth) smooth_ano_obs <- Smoothing(ano_obs, runmean_months, dim_to_smooth) + \donttest{ PlotAno(smooth_ano_exp, smooth_ano_obs, startDates, toptitle = "Smoothed Mediterranean mean SST", ytitle = "K", fileout = "tos_smoothed_ano.eps") + } } \author{ History:\cr diff --git a/man/Spectrum.Rd b/man/Spectrum.Rd index cd2dad7a269fb4e395bd199946c0647bb04ef7e0..de5a2e5efa5acf10a5f6b15174269247778cf02d 100644 --- a/man/Spectrum.Rd +++ b/man/Spectrum.Rd @@ -36,8 +36,10 @@ for (jstartdate in 1:3) { } } } + \donttest{ PlotAno(InsertDim(ensmod, 2, 1), sdates = startDates, fileout = 'filtered_ensemble_mean.eps') + } } \author{ diff --git a/man/Spread.Rd b/man/Spread.Rd index bc14fa7a0d58fcc04859105b48e453c73b5d4c6a..f84cecf3e1219702108a872ed42021c05fa072ff 100644 --- a/man/Spread.Rd +++ b/man/Spread.Rd @@ -66,6 +66,7 @@ smooth_ano_exp <- Smoothing(ano_exp, runmean_months, dim_to_smooth) smooth_ano_exp_m_sub <- smooth_ano_exp - InsertDim(Mean1Dim(smooth_ano_exp, 2, narm = TRUE), 2, dim(smooth_ano_exp)[2]) spread <- Spread(smooth_ano_exp_m_sub, c(2, 3)) + \donttest{ PlotVsLTime(spread$iqr, toptitle = "Inter-Quartile Range between ensemble members", ytitle = "K", monini = 11, limits = NULL, @@ -83,6 +84,7 @@ PlotVsLTime(spread$mad, toptitle = "Median Absolute Deviation of the members", ytitle = "K", monini = 11, limits = NULL, listexp = c('CMIP5 IC3'), listobs = c('ERSST'), biglab = FALSE, hlines = c(0), fileout = 'tos_mad.eps') + } } \author{ diff --git a/man/ToyModel.Rd b/man/ToyModel.Rd index da07596095086e4ef17463aa8c33b44902ea3e6a..ca47b4498808f86c340cfb70b6bdb0670560a0fa 100644 --- a/man/ToyModel.Rd +++ b/man/ToyModel.Rd @@ -112,9 +112,11 @@ nm <- 10 toyforecast <- ToyModel(alpha = a, beta = b, gamma = g, nmemb = nm, obsini = sampleData$obs, nstartd = 5, nleadt = 60) + \donttest{ PlotAno(toyforecast$mod, toyforecast$obs, startDates, toptitle = c("Synthetic decadal temperature prediction"), - fileout = "ex_toymodel.eps") + fileout = "ex_toymodel.eps") + } } \author{ diff --git a/man/Trend.Rd b/man/Trend.Rd index 71d2e1bed2c0b78c96116274cbcc02449b7a0cbc..3b7f7bfdd541cac1246494570807500ac8718caa 100644 --- a/man/Trend.Rd +++ b/man/Trend.Rd @@ -60,6 +60,7 @@ as input (exp). example(Load) months_between_startdates <- 60 trend <- Trend(sampleData$obs, 3, months_between_startdates) + \donttest{ PlotVsLTime(trend$trend, toptitle = "trend", ytitle = "K / (5 year)", monini = 11, limits = c(-1,1), listexp = c('CMIP5 IC3'), listobs = c('ERSST'), biglab = FALSE, hlines = 0, @@ -67,6 +68,7 @@ PlotVsLTime(trend$trend, toptitle = "trend", ytitle = "K / (5 year)", PlotAno(trend$detrended, NULL, startDates, toptitle = 'detrended anomalies (along the startdates)', ytitle = 'K', legends = 'ERSST', biglab = FALSE, fileout = 'tos_detrended_obs.eps') + } } \author{