Description Usage Arguments Details Value Chunks Examples
View source: R/raster_aggregate.R
Combines multiple Bluesky model runs to produce a single RasterBrick object. Users can set the first run, the last run, the hourly spacing between model runs, and the chunk index for the section of each model's time axis to be used.
1 2 3 4 5 6 7 8 9 10 11 12 13 |
modelName |
Model identifier(s). |
firstModelRun |
Initialization datestamp of first model run as "YYYYmmddHH". |
lastModelRun |
Initialization datestamp of last model run as "YYYYmmddHH". |
modelMode |
Subdirectory path containing BlueSky output, i.e. 'forcast'. |
baseUrl |
Base URL for BlueSky output. |
xlim |
A vector of coordinate longitude bounds. |
ylim |
A vector of coordinate latitude bounds. |
clean |
Logical specifying removal of original model data after conversion to "v2" format. |
verbose |
Logical to display messages. |
spacing |
Time difference (hrs) between each model run – overrides default values. |
chunk |
The portion of the time (of width = 'spacing') to be chosen from
each model run. If |
Setting chunk = 1
results in grabbing the initial portion of each model
run. Setting chunk to higher numbers utilizes times further out in the the
forecast of each model run implying more uncertainty.
A RasterBrick object.
Suppose a model is run every 12 hours. For this model spacing = 12
.
In this case, chunk = 1
means we select the first 12 hours from each
model run – i.e. we work with the model data from as close to initialization
as possible. Setting chunk = 2
means we select the next 12 hours
(i.e. hours 13-24) from each model run. Setting chunk = 3
means we
select hours 25-48 from each model run and so on.
Chunking can be used to account for any inaccuracies in the data that may
be due to poor initial conditions. For example, older models only predicted
impacts from existing sources, and did not take into account any smoke that
may have already been present at the time of initialization. In this case,
setting chunk = 2
may produce better results.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 | library(AirFireModeling)
setModelDataDir('~/Data/BlueSky')
# Kincade fire
rasterBrick <- raster_aggregate(
modelName = "PNW-4km",
firstModelRun = 2020091300,
lastModelRun = 2020091700,
xlim = c(-123.5, -121.5),
ylim = c(44.0, 46.0)
)
raster_facet(
rasterBrick,
title = "Oregon Labor Day Fires -- 2020091300 through 2020091700",
ncol = 12,
palette = 'Spectral',
col_county = 'gray95',
direction = -1,
breaks = c(-Inf, 0, 12, 35, 55, 150, 250, 350, Inf)
)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.