Internal function to calculate bioclimatic variables using `terra` functions. It is designed for datasets that can fit into RAM.
bioclim_terra(
bios,
tmin = NULL,
tmax = NULL,
tavg = NULL,
prcp = NULL,
srad = NULL,
mois = NULL,
period_length = 3,
circular = TRUE,
gdal_opt = c("COMPRESS=DEFLATE", "PREDICTOR=3", "NUM_THREADS=ALL_CPUS"),
overwrite = FALSE,
output_dir = tempdir(),
verbose = TRUE,
...
)A `terra::SpatRaster` object pointing to the newly created files.
Numeric vector of variables to compute.
Integer, length of a calculation period.
Logical, whether to wrap periods.
Character vector of GDAL options for writing.
Logical, whether to overwrite existing files.
Character, path to save final rasters.
Logical, If `TRUE`, prints messages.
`SpatRaster` objects for climate variables (e.g., `tmin`, `tmax`) and static indices (e.g., `warmest_period`).
The user-facing wrapper function `derive_bioclim()`.