ab.gmu {AIGIS}R Documentation

Find expected value for a random fires in all 1/8 degree gridcells

Description

For each 1/8 degree gridcell in California, estimate the expected value contained inside a fire perimeter of specified area. Operates by finding the total value inside the gridcell and multiplying by the appropriate fraction, determined by a call to area2frac.

Usage

ab.gmu(gridgpcobj = gridgpc, gws = gridinws, afracs = gfracs, recvar = 1, 
  recvals = bgvals, appdam = FALSE, trimmedin = TRUE, dr = damrats, 
  maskobj = MASK)

Arguments

gridgpcobj A list object containing gridcells in gpc form as well as indexing vectors. See help for the data object gridgpc for exact form.
gws Grid weights. A list of matrices giving zone indices and overlaps for each gridcell. For now gridinws is the appropriate companion object to gridgpc.
afracs A precalculated vector giving the fraction of land area in each gridcell occupied by a fire of a given area.
recvar An integer indicating which column of the record value matrix to use. That is, what variable is to be interpolated.
recvals A matrix containing the data to be interpolated, with rows corresponding to zones, and columns corresponding to different variables.
appdam CA Wildfire specific. A logical indicating whether or not to apply the empirically derived damage ratio.
trimmedin Whether the overlap weights are provided in matrix form. Must be true for this version.
dr CA Wildfire specific. A vector giving precalculated damage ratios by block group.
maskobj A matrix of ones and zeros noting which gridcells should be used and which omitted

Value

Returns a matrix of with nrow=nrow(MASK) and ncol=ncol(MASK), where entry value[i,j] corresponds to the expected value for a fire of given size in the gridcell corresponding to MASK[i,j].

Author(s)

Benjamin P. Bryant, bryant@prgs.edu

Examples


data(bgvals)
data(damrats)
data(gridgpc)
data(gridinws)
data(MASK)

#Find expected values on houses enclosed by a 200 ha fire.
#First, create the (reusable) vector of area fractions:

gfracs <- sapply(gridgpc[[1]],area2frac, area=200,units="ha", cap=TRUE)

theresult <- ab.gmu(gridgpcobj = gridgpc, gws = gridinws, afrac = gfracs,
 appdam=FALSE, recvar = 1)


[Package AIGIS version 1.0 Index]