cascadePlot: Cascade plot to visualize the climate change modelling...

View source: R/cascadePlot.R

cascadePlotR Documentation

Cascade plot to visualize the climate change modelling uncertainty cascade.

Description

Cascade plot to decompose modelling uncertainty down to individual future climate projections.

Usage

cascadePlot(
  x,
  factors,
  stages = NULL,
  labels = FALSE,
  label.names = NULL,
  colors = NULL,
  title = NULL,
  line.width = NULL,
  plot.density = TRUE,
  density.offset = 0,
  density.reverse = TRUE
)

Arguments

x

Numeric vector with the values of the individual projections.

factors

List with several factors classifying the data in x.

stages

String vector with the names of the factors to be plotted from bottom to top.

labels

Logical (default = FALSE). Whether to plot individual labels for each line. See label.names.

label.names

Character vector with the names to be given to each line. If NULL (default) names are taken from x.

colors

Color vector to be used in the last aggregating step and all lines leading to each main branch. If NULL (default) an appropriate rainbow scale is used. Its length should be length(levels(factors[[rev(stages)[1]]])).

title

Title of the plot

line.width

Width of the lines.

plot.density

Logical (default = TRUE). Add an estimate of the probability density function (PDF).

density.offset

A vector indicating how much the PDF should be shifted relative to the bottom part of the plot. Default is 0.

density.reverse

Logical (default = TRUE). If TRUE plot the PDF upside down.

Author(s)

J. Fernández jesus.fernandez@unican.es and M.D. Frías based on the visualization proposed by Ed Hawkins on his Climate Lab Book http://www.climate-lab-book.ac.uk/2014/cascade-of-uncertainty

References

Hawkins E. 2014. Climate Lab Book. http://www.climate-lab-book.ac.uk/2014/cascade-of-uncertainty

Fernández, J., Frías, M.D., Cabos, W.D. et al. 2018. Consistency of climate change projections from multiple global and regional model intercomparison projects. Clim Dyn. https://doi.org/10.1007/s00382-018-4181-8

See Also

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

Examples

## Not run: 
# This code reproduces Figure 4 (top) from Fernandez et al. (2018)
load(url("http://meteo.unican.es/work/visualizeR/data/multimip_sdelta_es.rda"), verbose=T)
cat(multimip.README)
filter.members <- multimip.factors[["Method"]]=="GCM" & ! multimip.factors[["GCM"]] %in% c("CNRM-CM5-r8", "EC-EARTH-r3")
sdeltas <- multimip.prtas.sdeltas["tas",filter.members]
factors <- lapply(multimip.factors, function(x) factor(x[filter.members]))
title <- "Delta T (K)"
cascadePlot(sdeltas, factors, multimip.stages, title=title, density.offset=2)

## End(Not run) 

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