spreadPlot: Box plot for visualization of forecast skill of seasonal...

View source: R/spreadPlot.R

spreadPlotR Documentation

Box plot for visualization of forecast skill of seasonal climate predictions.

Description

Box plot for visualization of forecast skill of seasonal climate predictions. This function is prepared to plot the data sets loaded from the ECOMS User Data Gateway (ECOMS-UDG). See the loadeR.ECOMS R package for more details (http://meteo.unican.es/trac/wiki/udg/ecoms/RPackage).

Usage

spreadPlot(
  hindcast,
  forecast = NULL,
  year.target = NULL,
  detrend = FALSE,
  boxplot = TRUE,
  violin = FALSE,
  add.points = FALSE,
  pch = NULL
)

Arguments

hindcast

A multi-member list with the hindcast for verification. Daily values. See details.

forecast

A multi-member list with the forecasts. Daily values. Default is NULL.

year.target

Year within the hindcast period considered as forecast. Default is NULL.

detrend

Logical indicating if the data should be linear detrended. Default is FALSE.

boxplot

Logical flag indicating whether a boxplot should be added to the graph. Default is TRUE.

violin

Logical flag indicating whether a violin plot should be added to the graph instead of the boxplot. Default is FALSE.

add.points

Logical flag indicating whether crosses indicating the ensemble members should be added to the graph. Default is FALSE.

pch

Single character or an integer code for one of the set of R graphics symbols. Cross is the default symbol. Only consider if add.points is TRUE.

Details

For rectangular spatial domains (i.e., for fields), the spatial average is first computed (with a warning) to obtain a unique series for the whole domain. The climatology for the forecast period is computed. The shaded areas show the central tercile (dark shade) and the maximum and minimum (light shade). To avoid overinterpretation of daily peaks, the daily data has been smoothed by means of a (centered) moving average of 31 days. Therefore, at the location of the boxplots, the background shows the monthly mean forecast (the terciles and extremes being computed over members and years). Monthly means are calculated for each ensemble member. This information is included to the graph in a boxplot or a violin plot (to unveil multimodalities in the data) or/and the values of the ensemble members.

In case of multi-member fields or stations, they are spatially averaged to obtain one single time series for each member prior to data analysis, with a warning.

Note

The computation of climatological terciles requires a representative period to obtain meaningful results.

Author(s)

M.D. Frias mariadolores.frias@unican.es and J. Fernandez

See Also

Other visualization functions: bubblePlot(), cascadePlot(), climagram(), reliabilityCategories(), tercileBarplot(), tercilePlot()

Examples

## Not run: 
url1 <- "http://meteo.unican.es/work/visualizeR/data/tas.cfs.operative.dly.br.2016.rda"
temp_file <- tempfile()
download.file(url1, destfile = temp_file)
load(temp_file, .GlobalEnv, verbose = TRUE)
url2 <- "http://meteo.unican.es/work/visualizeR/data/tas.cfs.dly.br.rda"
temp_file <- tempfile()
download.file(url2, destfile = temp_file)
load(temp_file, envir = .GlobalEnv, verbose = TRUE)
Figure with box plots
spreadPlot(tas.cfs.dly.br, forecast = tas.cfs.operative.dly.br.2016)
# Added values of the members of the forecast
spreadPlot(tas.cfs.dly.br, forecast = tas.cfs.operative.dly.br.2016, add.points = TRUE, pch = 20)
# Violin plots
spreadPlot(tas.cfs.dly.br, forecast = tas.cfs.operative.dly.br.2016, violin = TRUE)

## End(Not run)


SantanderMetGroup/visualizeR documentation built on Oct. 28, 2023, 6:11 a.m.