count_months: Count Number of Months in Climate Mask Layers

Description Usage Arguments Value See Also Examples

Description

Generates raster layer of counts corresponding to number of times (usually months) each grid cell satisfies climate criteria (e.g., growing-season or C4 climate).

Usage

1
count_months(climate.mask, filename = "", ...)

Arguments

climate.mask

Raster* object. Mask of grid cells that meet climate parameters, may be result of intersect_masks or mask_grids. Object should be multi-layer (i.e., multi-date).

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.

Value

RasterLayer. Values correspond to number of months (or other temporal unit) that grid cell meets minimum climate parameters.

See Also

mask_climate, mask_grids, intersect_masks, sum.

Examples

1
2
3
4
5
6
7
8
# Count number of months each grid cell meets C4 climate criteria

# For this example, annual stack of monthly C4 climate masks were generated
#   using mask_climate()
C4_month_total <- count_months(C4_mask)

# Plot monthly totals
plot(C4_month_total)

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