Description Usage Arguments Value See Also Examples
Generates climate masks based on two climate variables, typically temperature and precipitation. Grid cells that satisfy both criteria are reclassified as 1; else, grid cells are reclassified as 0. Climate threshold values are lower bound inclusive.
1 2 | mask_climate(temp.stack, temp.threshold, precip.stack, precip.threshold,
filename = "", ...)
|
temp.stack |
Raster* object. Each layer corresponds to a different temporal window (e.g., month) for a temperature climate variable. Object may be single or multi-layer. |
temp.threshold |
Numeric. Threshold value (lower-bound inclusive) for temperature variable. |
precip.stack |
Raster* object. Each layer corresponds to a different temporal window (e.g., month) for a precipitation climate variable. Object may be single or multi-layer. |
precip.threshold |
Numeric. Threshold value (lower-bound inclusive) for precipitation variable. |
filename |
Character. Optional output root filename passed to
|
... |
Other arguments passed to |
RasterBrick. One output mask layer for each input layer. If filename is specified, output file format is GeoTiff with unsigned integer data type.
mask_grids, intersect_masks, overlay.
1 2 3 4 5 6 7 8 9 10 11 12 13 | # Load data for example
data(temp_NA) # mean monthly temperature (deg. C)
data(prec_NA) # mean monthly precipitation (mm)
# Specify Growing Season (GS) thresholds
GS_temp <- 5 # mean monthly temperature >= 5 deg. C
GS_prec <- 25 # mean monthly precipitation >= 25 mm
# Generate stack of monthly growing season masks
GS_masks <- mask_climate(temp_NA, GS_temp, prec_NA, GS_prec)
# Plot monthly growing-season masks
plot(GS_masks)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.