R/NewhallData.R
newhall_prism.Rd
newhall_prism_cache()
: Uses the prism package to download and cache data at the specified resolution. At this time only monthly grids for 30 year Normals (1991-2020) are supported.
newhall_prism_rast()
: Create a SpatRaster object. This object contains temperature and precipitation data for the specified data set, at the specified resolution, using the standard jNSM column naming scheme.
newhall_prism_subset():
Used to create a subset of the PRISM data corresponding to the extent of an input spatial object x
.
newhall_nad83_template()
: Empty SpatRaster
corresponding to the lower 48 United States PRISM data/extent at the specified resolution.
newhall_prism_cache(
resolution = "800m",
overwrite = FALSE,
PRISM_PATH = file.path(newhall_data_dir("cache"), "PRISM")
)
newhall_prism_rast(
resolution = "800m",
PRISM_PATH = file.path(newhall_data_dir("cache"), "PRISM"),
bilfile = list.files(file.path(PRISM_PATH, resolution), "\\.bil$", recursive = TRUE)
)
newhall_prism_subset(
x,
resolution = "800m",
template = newhall_nad83_template(resolution = resolution),
PRISM_PATH = file.path(newhall_data_dir("cache"), "PRISM")
)
newhall_nad83_template(resolution = "800m")
character. Either "800m"
(default) or "4km"
Force download of new cache files? Default: FALSE
.
Default: file.path(newhall_data_dir("cache"), "PRISM")
Optional: custom vector of paths to files to use to build raster. Defaults to all .BIL files in the specified cache directory and resolution.
A SpatVector, SpatRaster, SpatExtent, or any other object type suitable to use with terra::crop()
.
Template SpatRaster or target CRS specification for re-projection. Default: newhall_nad83_template()
character. Vector of file paths (to PRISM .BIL files).
Currently used only for matching the ISSR800 source to PRISM.
PRISM Climate Group, Oregon State University, https://prism.oregonstate.edu, data created 4 Feb 2014, accessed 22 Jul 2023.
newhall_nad83_template()
#> class : SpatRaster
#> dimensions : 3105, 7025, 28 (nrow, ncol, nlyr)
#> resolution : 0.008333333, 0.008333333 (x, y)
#> extent : -125.0208, -66.47917, 24.0625, 49.9375 (xmin, xmax, ymin, ymax)
#> coord. ref. : lon/lat NAD83
newhall_nad83_template("4km")
#> class : SpatRaster
#> dimensions : 621, 1405, 28 (nrow, ncol, nlyr)
#> resolution : 0.04166667, 0.04166667 (x, y)
#> extent : -125.0208, -66.47917, 24.0625, 49.9375 (xmin, xmax, ymin, ymax)
#> coord. ref. : lon/lat NAD83