The ranking is applied to a forecast map r and provides percentiles of occurrence of the values based on a given climatology (see b).

ranking(r, b)

Arguments

r

is the RasterLayer to compare to the climatology.

b

RasterBrick/Stack containing the historical observations or a proxy (typically a reanalysis) that is used to derive the climatological information.

Value

The function returns a RasterLayer with extent, resolution and land-sea mask matching those of r. Values are the percentiles of occurrence of the values.

Details

The objects r and b should be comparable: same resolution and extent. More information on ranking is available here: https://bit.ly/2Qvekz4. To estimate fire climatology one can use hindcast or reanalysis data. Examples of the latter are available from Zenodo: https://zenodo.org/communities/wildfire.

Examples

if (FALSE) {
  # Generate dummy RasterLayer
  r <- raster(nrows = 1, ncols = 1,
              xmn = 0, xmx = 360, ymn = -90, ymx = 90, vals = 0.3)
  raster::setZ(r) <- as.Date("2018-01-01")
  # Generate dummy RasterBrick
  b <- raster::brick(lapply(1:(365 * 3),
                  function(i) raster::setValues(r, runif(raster::ncell(r)))))
  raster::setZ(b) <- seq.Date(from = as.Date("1993-01-01"),
                              to = as.Date("1995-12-31"),
                              by = "day")
  # Compute ranking
  x <- ranking(r, b)

  # This plots nicely using rasterVis::levelplot(), see example on GWIS
  # (\url{https://gwis.jrc.ec.europa.eu}
  rasterVis::levelplot(x, col.regions = c("green", "yellow", "salmon",
                                          "orange", "red", "black"))
}