ab.gcbounds {AIGIS} | R Documentation |
Given an 1/8 degree gridcell and an area representing the area contained inside a hypothetical fire perimeter, calculate the upper and lower bounds on values that could be contained inside that perimeter. Assumes the fire occupied the highest and lowest density block groups respectively, and (at present) does not enforce contiguity requirements.
ab.gcbounds(iwtmat, area = 0.125^2, recarea = rbgarea, recvar = 1, recvals = bgvals, appdam = FALSE, dr = damrats)
iwtmat |
Index Weight Matrix. A two column matrix of zone indices and weights such as that output by a call arealw(target=thegridcell, zones=theappropriatezones, trimout=TRUE) . More likely it will be an element of data object gws , which contains precalculated matrices for 1/8 degree gridcells as targets and the California block groups as the zones. |
area |
The area of the hypothetical fire, expressed in lat/lon degrees area. |
recarea |
A vector of zone areas, ordered by their index in a matrix of recvals . |
recvar |
An integer indicating which column of the record value matrix to use. |
recvals |
A matrix of record values containing the data to be bounded. |
appdam |
CA Wildfire specific. A logical indicating whether or not to apply the empirically derived damage ratio. |
dr |
CA Wildfire specific. A vector giving precalculated damage ratios by block group. Only used if appdam=TRUE. |
The bounds are calculated in an extremely conservative way (similar to, but distinct from the method used by dp.interp
. In both cases, it orders block groups by density, and adds block group values in increasing or decreasing density order (for lower and upper bounds respectively) until the total area is reached. Furthermore, for the lower bound it is assumed that all zones crossing the target border have density zero (i.e., that their entire value is contained outside the cell). For the upper bound, it is assumed that all zones crossing the border have their entire value within the cell.
A vector of length two with a lower bound and an upper bound on possible values for a fire contained inside the grid.
Benjamin P. Bryant, bryant@prgs.edu
data(bgvals) data(damrats) data(gridgpc) data(gridinws) data(rbgarea) #What are the bounds on a 200 ha fire near San Diego? #First tranlate 200 ha into lat-lon degree^2: thearea <- .125^2*area2frac(cell=gridgpc[[1]][[2139]], area=200, units="ha", naive=TRUE) ab.gcbounds(iwtmat=gridinws[[2139]], area=thearea)