| plotTEW | R Documentation |
The plotTEW() function allows plotting topographic exposure to wind products generated using
the computeTEW() function and stored in SpatRaster objects.
plotTEW(
sts,
rasterProduct,
dtm = NULL,
colorPalette = NULL,
main = NULL,
xlim = NULL,
ylim = NULL,
labels = FALSE,
by = 8,
pos = 3,
legends = "topright",
fan = FALSE,
dynamicPlot = FALSE
)
sts |
|
rasterProduct |
layer name in a
|
dtm |
|
colorPalette |
character vector. The color palette used to plot the raster layer.
If |
main |
character. Title of the plot. If |
xlim |
numeric vector. The x limits of the plot. |
ylim |
numeric vector. The y limits of the plot. |
labels |
logical. Whether (TRUE) or not (FALSE, default setting) to add labels with the name of the storm and the indices and ISO times of the observation. |
by |
numeric. If |
pos |
numeric. If |
legends |
character. Indicates where to plot the legend, |
fan |
logical. Whether (FALSE, default setting) or (TRUE) to add the range of wind direction along the storm. |
dynamicPlot |
logical. Whether (FALSE, default setting) or (TRUE) to plot the data dynamicaly using leaflet library |
A plot of the storm track data with the raster layer.
# Creating a stormsDataset
sds <- defStormsDataset()
# Getting storm track data for tropical cyclone Pam (2015)
pam <- defStormsList(sds = sds, loi = "Vanuatu", names = "PAM")
# Getting digital terrain model for PortVilla island
mnt <- terra::rast(system.file("extdata", "test_datadtm.tif", package = "StormR"))
# Plotting topographic exposure to wind (tew) for Pam (2015) near Vanuatu
pam.prof <- spatialBehaviour(pam, product = "Profiles", verbose = 0)
pam.tew <- computeTEW(pam.prof, pam, mnt, verbose = 0)
# Basic plot
plotTEW(pam, pam.tew)
# Plot with DTM-derived land mask for finer coastline
plotTEW(pam, pam.tew, dtm = mnt)
# Plotting with the range of wind direction
plotTEW(pam, pam.tew, fan = TRUE)
# dynamicPlot mode
plotTEW(pam, pam.tew, dynamicPlot = TRUE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.