knitr::opts_chunk$set(echo = TRUE)
At the end of a hot and dry summer, the conditions were set for several large wildfires to spread across western Oregon. The purpose of this document is to demonstrate the RAWSmet package's data gathering and modeling capabilities by investigating the factors that allowed for the wildfires to spread.
First, we will use RAWSmet's wrcc_loadMeta()
and wrcc_loadMultiple()
functions
to gather recent data from all of the stations in Oregon. The following code
is executed to gather the necessary data between August 31st and September 14th,
approximately a week before and after the start of the wildfires in Holiday Farm.
library(RAWSmet) library(grid) # To avoid Error: 'could not find function "unit"' setRawsDataDir("~/Data/RAWS") # Load WRCC station metadata for Oregon or_meta <- wrcc_loadMeta(stateCode = "OR") filePath <- file.path(getRawsDataDir(), "stationList_OR.rda") # Load pre-generated data if it exists. If it does not exist, create it. if ( file.exists(filePath) ) { stationList_OR <- get(load(filePath)) } else { # Create required data stationList_OR <- wrcc_loadMultiple( wrccIDs = or_meta$wrccID, meta = or_meta, year = 2020, newDownload = FALSE, password = MY_PASSWORD ) %>% rawsList_filterDate( startdate = MazamaCoreUtils::parseDatetime(20200831, timezone = "America/Los_Angeles"), enddate = MazamaCoreUtils::parseDatetime(20200914, timezone = "America/Los_Angeles") ) # Save this data so it does not need to be generated again in the future save(stationList_OR, file = filePath) }
Across the state of Oregon there are 205 RAWS stations with data provided by the WRCC, however, only 134 of these stations have accessible data from the dates of the fires. The locations of these stations in addition to station metdata can be seen on the following map:
wrccIDs <- names(stationList_OR) meta <- or_meta %>% dplyr::filter(wrccID %in% wrccIDs) RAWSmet::meta_leaflet(meta)
With all of the necessary data assembled, we can now take a look at the wind patterns
around the dates of the wildfires. These maps, created with maps::map()
and
RAWSMet::rawsList_addWindBarbs()
, show the direction and speeds of wind gusts at
all of the available stations in Oregon.
Through these maps it is apparent that on September 6th at noon there is no irregular pattern in the wind that stands out. However, at midnight on the 6th, the eastern side of Oregon experienced strong winds coming from the north. Over the night and throughout the morning, these winds move and the western side of the Cascades is seen to have strong winds coming from the east.
library(maps) par(mfrow = c(2, 2)) maps::map('state', 'oregon', fill = FALSE, col = 'gray80') title("Sept. 6th at noon") rawsList_addWindBarbs( stationList_OR, observationTime = MazamaCoreUtils::parseDatetime(2020090612, timezone = "America/Los_Angeles"), skipMissing = TRUE, type = "gusts", circleSize = 0.5, circleFill = 'black', lineCol = 1, extraBarbLength = -0.2, lwd = 1.2 ) maps::map('state', 'oregon', fill = FALSE, col = 'gray80') title("Sept. 6th at midnight") rawsList_addWindBarbs( stationList_OR, observationTime = MazamaCoreUtils::parseDatetime(2020090700, timezone = "America/Los_Angeles"), skipMissing = TRUE, type = "gusts", circleSize = 0.5, circleFill = 'black', lineCol = 1, extraBarbLength = -0.2, lwd = 1.2 ) maps::map('state', 'oregon', fill = FALSE, col = 'gray80') title("Sept. 7th at noon") rawsList_addWindBarbs( stationList_OR, observationTime = MazamaCoreUtils::parseDatetime(2020090712, timezone = "America/Los_Angeles"), skipMissing = TRUE, type = "gusts", circleSize = 0.5, circleFill = 'black', lineCol = 1, extraBarbLength = -0.2, lwd = 1.2 ) maps::map('state', 'oregon', fill = FALSE, col = 'gray80') title("Sept. 7th at midnight") rawsList_addWindBarbs( stationList_OR, observationTime = MazamaCoreUtils::parseDatetime(2020090800, timezone = "America/Los_Angeles"), skipMissing = TRUE, type = "gusts", circleSize = 0.5, circleFill = 'black', lineCol = 1, extraBarbLength = -0.2, lwd = 1.2 )
Using openair's windRose()
plot, we can take a closer look at the wind
patterns in western Oregon. The following plots compare the winds at Goodwin Peak
in September 2020 to historical data for the winds in each September between 2005
and 2017. From the historical data it is clear that the winds in Goodwin Peak in
September typically come from the north. However, in September 2020, an unmistakable
majority of the winds come from the east.
par(mfrow = c(1, 2)) filePath <- file.path(getRawsDataDir(), "orOGOO_wrcc_0831-0919") # Load pre-generated data if it exists. If it does not exist, create it. if ( file.exists(filePath) ) { wrccData_orOGOO <- get(load(filePath)) } else { # Create data wrccData_orOGOO <- wrcc_loadYear(wrccID = "orOGOO", year = 2020, password = MY_PASSWORD) %>% raws_filterDate( startdate = MazamaCoreUtils::parseDatetime(20200901, timezone = "America/Los_Angeles"), enddate = MazamaCoreUtils::parseDatetime(20200930, timezone = "America/Los_Angeles") ) %>% raws_getData(forOpenair = TRUE) save(wrccData_orOGOO, file = filePath) } cefaData_orOGOO <- cefa_load(nwsID = "352545") %>% raws_getData(forOpenair = TRUE) %>% dplyr::filter(lubridate::month(datetime) == 9) cefaPlot <- openair::windRose(mydata = cefaData_orOGOO, ws = "windSpeed", wd = "windDirection", main = "Goodwin peak, September 2005-2017.") wrccPlot <- openair::windRose(mydata = wrccData_orOGOO, ws = "windSpeed", wd = "windDirection", main = "Goodwin peak, September 2020.")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.