gddprism {acdcR} | R Documentation |
Calculating GDDs by PRISM grids or Counties with PRISM raster
Description
The function calculates the growing season degree days (GDDs) by grids or counties directly from a PRISM raster.
Usage
gddprism(
minprism,
maxprism,
year,
tL,
tU,
method = c("stri", "ssin"),
out = NULL
)
Arguments
minprism |
A PRISM raster of the minimum temperature |
maxprism |
A PRISM raster of the maximum temperature |
year |
year of the PRIsM raster of minprism and maxprism |
tL |
Lower temperature threshold |
tU |
Upper temperature threshold |
method |
GDD calculation methods: single sine or single triangulation only (default = single sine method) |
out |
Output value type: GDDs by PRISM grids or Counties (default = Counties) |
Details
gddprism
is a function for calculating growing season degree days (GDDs) by PRISM grids or Counties directly from a PRISM raster.
Only single methods (single sine or single triangulation) are applicable by specifying method.
- method = 'stri'
: single triangulation method
- method = 'ssin'
: single sine method (default)
The out
is to specify the output values.
- out = 'grid'
: GDDs by PRISM grids projected on the NLCD map
- out = 'stco'
: GDDs by Counties of 2017 Agricultural Census (default)
If out
is not specified, 'stco' is set as default.
When out='stco'
is specified, the weights are applied as:
- year < 2004: agricultural areas in 2001 NLCD
- year = 2004 or 2005: agricultural areas in 2004 NLCD
- year = 2006 or 2007: agricultural areas in 2006 NLCD
- year = 2008, 2009, or 2010: agricultural areas in 2008 NLCD
- year = 2011 or 2012: agricultural areas in 2011 NLCD
- year = 2013, 2014, or 2015: agricultural areas in 2013 NLCD
- year = 2016, 2017, or 2018: agricultural areas in 2016 NLCD
- year >= 2019: agricultural areas in 2019 NLCD
To get a PRIMS raster, follow the instruction at https://prism.oregonstate.edu/documents/PRISM_downloads_FTP.pdf.
Value
A data.frame including GDDs (gdd), PRISM grid numbers (gridNum), or FIPS codes (stco)
See Also
Examples
#######################################################
## Note: Need PRISM rasters to run this code
#######################################################
## Not run:
## PRISM data import
maxdata <- raster('./PRISM_tmax_stable_4kmD1_19960701_bil.bil')
mindata <- raster('./PRISM_tmin_stable_4kmD1_19960701_bil.bil')
## Single Sine Methods over Counties
result1 <- gddprism(mindata,maxdata,1996,8,30,'ssin')
result2 <- gddprism(mindata,maxdata,1996,8,30,'ssin','stco')
## Single Sine Method over PRISM grids
result3 <- gddprism(mindata,maxdata,1996,8,30,'ssin','grid')
## Single Triangulation over Counties
result4 <- gddprism(mindata,maxdata,1996,8,30,'stri')
## End(Not run)