calc_pft_cover: Calculate Plant Functional Type Cover Layers

Description Usage Arguments Value See Also Examples

Description

Generates plant functional type (PFT) cover layers, starting with an inital assumption of 100% "grassy world." If additional vegetation cover layers are provided by the user, total grass cover is adjusted by (1) subtracting the sum of the other vegetation layers from 100% grass cover, and (2) partitioning the remaining percent grass cover into C3 and C4 components by multiplying the C4 grass ratio (result of calc_C4_ratio). If C3/C4 crop cover layers are provided by the user, they are added to the C3/C4 grass cover layers, respectively.

Usage

1
2
3
calc_pft_cover(C4.ratio, GS.mask, veg.layers = NULL, C4.flag = NULL,
  herb.flag = NULL, scale.factor = 100, veg.weight = FALSE,
  filename = "", ...)

Arguments

C4.ratio

RasterLayer. C4 ratio of grass cover, result of calc_C4_ratio.

GS.mask

RasterBrick. Monthly mask of grid cells that meet growing season criteria, result of mask_climate.

veg.layers

Raster* object. Layers correspond to plant functional types that cannot be predicted directly from climate. Default value = NULL.

C4.flag

Numeric. Vector with length equal to number of layers in veg.layers object, with C4 vegetation flag = 1, C3 vegetation flag = 0. Default value = NULL

herb.flag

Numeric. Vector with length equal to number of layers in veg.layers object, with herbaceous vegetation flag = 1, woody vegetation flag = 0. Default value = NULL.

veg.weight

Logical. User may optionally specify to weight layers in veg.layers so that total per-pixel vegetation cover is constrained to 100%. Default value = FALSE.

filename

Character. Optional output root filename passed to writeRaster, default output file type is GeoTiff. If not specified, output is written to a temporary file.

...

Other arguments passed to writeRaster.

sale.factor

Numeric. Scale factor for vegetation cover. Default value = 100.

Value

RasterBrick. Each layer corresponds to percent vegetation cover, ordered as follows - Layer[[1]]: C4 herbaceous, Layer[[2]]: C3 herbaceous, Layer[[3]], ...: optional vegetation layer[s] provided by the user. C4/C3 herbaceous layers may combine C4/C3 grass + C4/C3 crop cover, if specified by user.

See Also

calc_C4_ratio, count_months, overlay.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
# Load additional vegetation cover layers for North America to use
#   in this example
data(woody_NA)    # percent woody vegetation cover
data(cropC3_NA)   # percent C3 crop cover
data(cropC4_NA)   # percent C4 crop cover

# Create raster stack of other (non-grass) vegetation layers
veg_layers <- stack(cropC4_NA, cropC3_NA, woody_NA)

# Vector to flag layers that correspond to C4 vegetation
C4_flag <- c(1, 0, 0)

# Vector to flag layers that correspond to herbaceous vegetation
herb_flag <- c(1, 1, 0)

# Generate plant functional type (PFT) vegetation layers
# C4 and Growing Season (GS) climate masks are results of mask_climate()
C4_ratio <- calc_C4_ratio(C4_mask, GS_mask)
pft_cover <- calc_pft_cover(C4_ratio, GS_mask, veg_layers, C4_flag, herb_flag)

# Plot annualized PFT vegetation cover layers
plot(pft_cover)

rebeccalpowell/grassmapr documentation built on June 20, 2019, 8:07 p.m.