newhall_worldclim_cache()
: Uses the geodata package to download and cache data at the specified resolution.
newhall_worldclim_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_worldclim_subset():
Used to create a subset of the WorldClim data corresponding to the extent of an input spatial object x
.
newhall_worldclim_cache(
resolution = "10m",
version = "2.1",
overwrite = FALSE,
WORLDCLIM_PATH = file.path(newhall_data_dir("cache"), "WorldClim")
)
newhall_worldclim_rast(
resolution = "10m",
version = "2.1",
WORLDCLIM_PATH = file.path(newhall_data_dir("cache"), "WorldClim"),
tiffile = list.files(file.path(WORLDCLIM_PATH, paste0("wc", version, "_", resolution)),
pattern = "\\.tif$", recursive = TRUE)
)
newhall_worldclim_subset(
x,
resolution = "10m",
template = "EPSG:4326",
WORLDCLIM_PATH = file.path(newhall_data_dir("cache"), "WorldClim")
)
character. Either "10m"
, "5m"
, "2.5m"
or "30s"
. In minutes (or seconds) of degrees ("EPSG:4326"
).
character. Version number. Default: "2.1"
. See geodata::worldclim_global()
for details.
Force download of new cache files? Default: FALSE
.
Default: file.path(newhall_data_dir("cache"), "WorldClim")
Optional: custom vector of paths to files to use to build raster. Defaults to all .TIF 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: "EPSG:4326
character. Vector of file paths (to WorldClim .TIF files).
Fick, S.E. and R.J. Hijmans, 2017. WorldClim 2: new 1km spatial resolution climate surfaces for global land areas. International Journal of Climatology 37 (12): 4302-4315. https://www.worldclim.org/data/worldclim21.html