Description Usage Arguments Details Author(s)
Takes in a list of precipitation fields (residual or full data), a year index, and the underlying precipitation gridded data from a trained emulator, as well as a few arguments relevant to plotting
1 2 3 4 5 6 7 8 9 10 | plotglobalfieldsP(
fieldlist,
yearindex,
emulatorgriddata,
minval = -1.5,
maxval = 1.5,
legendstr,
palettestr = "BrBG",
palettedir = 1
)
|
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 griddataP 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 precipitation response. |
maxval |
Upper limit of the color scale. The default value was chosen to work well for fields of residuals from the mean precipitation 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. |
#' 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.
ACS May 2020
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.