View source: R/sidfex.osisaf.SIC2dev.R
sidfex.osisaf.SIC2dev | R Documentation |
This function creates a plot of the processed OSI SAF sea-ice concentration (see sidfex.osisaf.nc2rda
for more information on processing) with some input plot specifications. The plot is sent to a specific device (default: jpeg) and can be used later. The need for this came up in considerations on time saving in the plotting routines of the upcoming Shiny App for SIDFEx.
sidfex.osisaf.SIC2dev (sic.sic, sic.lonlati, projection="polar", polar.latbound=75, device="jpeg",
width=1600, sic.cols=c("steelblue", "white"), col.N=100, coast.col="red",
lon.distance=30, lat.distance=5,pole.hole=TRUE,grid.labels=TRUE,grid.labels.cex=2,
filename = paste0("~/sl.plot.",device))
indexTable.path |
|
sic.sic |
a 2D array of sea-ice concentration data |
sic.lonlati |
output of |
projection |
a character specifing the plot projection type. Currently possible projection is only |
polar.latbound |
a scalar in the range [0,90) specifying the latitude (post-rotation) at which the plot shall be truncated. Default is |
device |
a character specifying which graphics device to use. Default is |
width |
a scalar giving the width of the resulting figure. The height will be derived according to the chosen projection and other relevant plotting parameters. Only used if |
sic.cols |
either a list of (at least 2) RGB(alpha) tuples (length-3 or length-4 vectors in the range [0,1]) or a character vector of named colours and/or hexadecimal-coded RGB colours. Defines the basis colours of the colourbar. |
col.N |
number of colours the resulting colourbar shall contain. |
coast.col |
a colour or vector of colours to be used for any lines. |
lon.distance |
a scalar specifying the distance (degrees) between adjacent longitudes. |
lat.distance |
a scalar specifying the distance (degrees) between adjacent latitudes. |
pole.hole |
a logical value indicating whether or not to let longitudinal lines end at the last latitude(s) before the pole(s). |
grid.labels |
a logical value indicating whether or not to add longitude and latitude labels. Note that the placement of labels is determined automatically based on the lon-lat-grid, with some arguments to control the behaviour. Latitude labels are placed between lines of longitudes and vice versa. For more flexibility, use |
grid.labels.cex |
numeric character expansion factor for the labels; multiplied by |
filename |
a character specifying the output file. Default is |
Returns nothing, but creates the plot in the specified device.
It is strongly advised to use the output of sidfex.osisaf.nc2rda
or the saved .rda file from sidfex.osisaf.download.latestNhSIC
only as input for sic.sic
and sic.lonlati
, as these functions were developed together for the single purpose of automation and performance-enhancing of sea-ice concentration visualization in the SIDFEx Shiny App.
Also note that this function depends on the spheRlab package.
Simon Reifenberg, Helge Goessling
sidfex.osisaf.nc2rda
, sidfex.osisaf.download.latestNhSIC
, sl.lonlat2D.c2i
# if output of sidfex.osisaf.nc2rda exists (will be a variable called "dat"):
sidfex.osisaf.SIC2dev(sic.sic=dat[[1]], sic.lonlati = dat[[2]], polar.latbound = 72)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.