This function calculates the danger levels (VeryLow-Low-Moderate-High-VeryHigh-Extreme) for a given country.
get_fire_danger_levels(fire_index, ndays = 4)
RasterBrick containing the fire index to calculate the thresholds for. Please note that fire_index@z should contain dates.
Number of days per year in which a fire is expected to occur. By default this is 4 days.
A numeric vector listing the thresholds.
if (FALSE) {
# Generate dummy brick
set.seed(0)
r <- raster(nrows = 2, ncols = 2,
xmn = 0, xmx = 360, ymn = -90, ymx = 90, vals = 30)
# Simulate a long reanalysis record
b <- raster::brick(lapply(1:(365 * 3),
function(i) raster::setValues(r, runif(n = raster::ncell(r),
min = 0, max = 100))))
raster::setZ(b) <- seq.Date(from = as.Date("1993-01-01"),
to = as.Date("1995-12-31"),
by = "day")
# Generate danger levels
get_fire_danger_levels(fire_index = b)
}