plotglobalfieldsT: Plot a map of a single year's temperature for every generated...

Description Usage Arguments Details Author(s)

View source: R/plot.R

Description

Takes in a list of temperature fields (residual or full data), a year index, and the underlying temperature gridded data from a trained emulator, as well as a few arguments relevant to plotting.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
plotglobalfieldsT(
  fieldlist,
  yearindex,
  emulatorgriddata,
  minval = -3.5,
  maxval = 3.5,
  legendstr,
  palettestr = "RdYlBu",
  palettedir = -1
)

Arguments

fieldlist

List of residual

yearindex

Index of the year to be plotted. For example, in data ranging from 2006 to 2100, the yearindex for 2006 is 1.

emulatorgriddata

The griddataT structure returned in a trained emulator.

minval

Lower limit of the color scale. The default value was chosen to work well for fields of residuals from the mean temperature response.

maxval

Upper limit of the color scale. The default value was chosen to work well for fields of residuals from the mean temperature response.

legendstr

String to use for the title of the graph legend

palettestr

String with the name of the ggplot2 color palette to use. Defaults to 'RdYlBu'. Options are Diverging: 'BrBG', 'PiYG', 'PRGn', 'PuOr', 'RdBu', 'RdGy', 'RdYlBu', 'RdYlGn', 'Spectral'; Qualitative: 'Accent', 'Dark2', 'Paired', 'Pastel1', 'Pastel2', 'Set1', 'Set2', 'Set3'; Sequential: 'Blues', 'BuGn', 'BuPu', 'GnBu', 'Greens', 'Greys', 'Oranges', 'OrRd', 'PuBu', 'PuBuGn', 'PuRd', 'Purples', 'RdPu', 'Reds', 'YlGn', 'YlGnBu', 'YlOrBr', 'YlOrRd'.

palettedir

Numerical value, only accepts 1 or -1, determining the order of the color palette used. Defaults to -1.

Details

While the functions for plotting maps of temperature (plotglobalfieldsT) and precipitation (plotglobalfieldsP) are very similar and both rely on a call to plot_field, they each select a different portion of the matrix of values to plot. fldgen operates on matrices that are of dimensions: rows = Nears X Nrealizations columns = Ngrid X Nvariables In particular, the first 1:Ngrid columns contain temperature information, and Ngrid+1:2Ngrid contain precipitation information. These functions parse out the appropriate columns for you.

Author(s)

ACS May 2020


JGCRI/fieldgenr documentation built on July 22, 2020, 3:17 a.m.