Description Usage Arguments Value Examples
View source: R/raster_toMonitor.R
Time series associated with multiple grid cells are converted
into a PWFSLSmoke ws_monitor. The monitorID
associated
with each location is generated with:
1 | MazamaLocationUtils::location_createID(x, y)
|
1 2 3 4 5 6 7 8 9 |
raster |
A Raster* object. |
longitude |
Target longitude from which the radius will be calculated. |
latitude |
Target latitude from which the radius will be calculated. |
radius |
Distance (km) of radius from target location. |
count |
Number of grid cells within radius to return. |
rasterName |
Optional string prepended to monitorIDs. |
verbose |
Logical to display messages. |
A PWFSLSmoke ws_monitor object representing a single monitor.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 | library(AirFireModeling)
setModelDataDir('~/Data/BlueSky')
# Load model data
rasterList <- raster_load(
modelName = c("PNW-1.33km", "PNW-4km"),
modelRun = c(2020091300),
xlim = c(-125, -115),
ylim = c(42, 50)
)
# MazamaSpatialUtils are needed to determine timezone and state
library(MazamaSpatialUtils)
PWFSLSmoke::initializeMazamaSpatialUtils()
model_Portland <- raster_toMonitor(
rasterList,
longitude = -122.68,
latitude = 45.52,
radius = 5
)
PWFSLSmoke::monitor_timeseriesPlot(
model_Portland[[1]],
type = 'l', col = 'salmon'
)
PWFSLSmoke::monitor_timeseriesPlot(
model_Portland[[2]],
type = 'l', col = 'dodgerblue', add = TRUE
)
legend(
x = "topright",
legend = names(model_Portland),
lwd = c(1, 1),
col= c("salmon", "dodgerblue")
)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.