Get several bioclimatic variables
clima.Rd
The clima function generates bioclimatic variables commonly used in ecological and environmental analyses. This function builds upon the biovars function from the dismo package and adheres to the methodologies outlined in the ANUCLIM 6.1 manual and O’Donnell & Ignizio (2012). It calculates a comprehensive set of 35 bioclimatic variables based on input rasters for minimum temperature, maximum temperature, average temperature, precipitation, solar radiation, and moisture. Users can specify which bioclimatic variables to compute using the bios parameter. The function supports customizable temporal aggregation (e.g., quarters or semesters) and includes options for circular period calculations. Input consistency is validated to ensure matching extents, resolutions, and NA handling, making it robust for large-scale spatial applications. Outputs are returned as a SpatRaster object containing the selected bioclimatic layers, ready for downstream analysis.
Usage
clima(
bios,
tmin = NULL,
tmax = NULL,
tavg = NULL,
prcp = NULL,
srad = NULL,
mois = NULL,
period = 3,
circular = TRUE,
checkNA = TRUE,
stopNA = TRUE,
...
)
Arguments
- bios
Numeric vector with bios number
- tmin
spatRaster with minimum temperature
- tmax
spatRaster with maximum temperature
- tavg
spatRaster with average temperature. It could be NULL if tmin and tmax are provided
- prcp
spatRaster with precipitation
- srad
spatRaster with solar radiation
- mois
spatRaster with moisture
- period
numeric. Length of period to summarize data (e.g., quarters, semesters). If using monthly data, a quarter (3-months) will be used to calculate Bios 08, 09, 10, 11, 16, 17, 18, 19, 24, 25, 26, 27, 32, 33, 34, 35.
- circular
TRUE/FALSE. Calculate periods that include the first and last units. For example, if using mean monthly data and quarters, `circular=TRUE` will also calculate Nov-Dec-Jan and Dec-Jan-Feb.
- checkNA
TRUE/FALSE. Check for unexpected NA values in the input data.
- stopNA
TRUE/FALSE. Stop execution if unexpected NA values are detected.
- ...
Additional arguments to define spatRasters that define a static period or unit index for variables calculation could be useful to keep same index along a time series or define a static season of interest, including:
- warmest_period
Description of param1 (default: NULL)
- coldest_period
Description of param1 (default: NULL)
- wettest_period
Description of param1 (default: NULL)
- driest_period
Description of param1 (default: NULL)
- high_mois_period
Description of param1 (default: NULL)
- low_mois_period
Description of param1 (default: NULL)
- warmest_unit
Description of param1 (default: NULL)
- coldest_unit
Description of param1 (default: NULL)
- wettest_unit
Description of param1 (default: NULL)
- driest_unit
Description of param1 (default: NULL)
- high_rad_unit
Description of param1 (default: NULL)
- low_rad_unit
Description of param1 (default: NULL)
- high_mois_unit
Description of param1 (default: NULL)
- low_mois_unit
Description of param1 (default: NULL)
Value
An SpatRaster with 35 bioclimatic variables or a subset of them:
- bio01
Mean Temperature of Units
- bio02
Mean Diurnal Range
- bio03
Isothermality
- bio04
Temperature Seasonality
- bio05
Max Temperature of Warmest Unit
- bio06
Min Temperature of Coldest Unit
- bio07
Temperature Range of Units
- bio08
Mean Temperature of Wettest Period
- bio09
Mean Temperature of Driest Period
- bio10
Mean Temperature of Warmest Period
- bio11
Mean Temperature of Coldest Period
- bio12
Precipitation Sum
- bio13
Precipitation of Wettest Unit
- bio14
Precipitation of Driest Unit
- bio15
Precipitation Seasonality
- bio16
Precipitation of Wettest Period
- bio17
Precipitation of Driest Period
- bio18
Precipitation of Warmest Period
- bio19
Precipitation of Coldest Period
- bio20
Mean Radiation of Units
- bio21
Highest Radiation Unit
- bio22
Lowest Radiation Unit
- bio23
Radiation Seasonality
- bio24
Radiation of Wettest Period
- bio25
Radiation of Driest Period
- bio26
Radiation of Warmest Period
- bio27
Radiation of Coldest Period
- bio28*
Mean Moisture Content Of Units
- bio29*
Highest Moisture Content Unit
- bio30*
Lowest Moisture Content Unit
- bio31*
Moisture Content Seasonality
- bio32*
Mean Moisture Content of Most Moist Period
- bio33*
Mean Moisture Content of Least Moist Period
- bio34*
Mean Moisture Content of Warmest Period
- bio35*
Mean Moisture Content of Coldest Period
Note
*The original moisture variables proposed in the ANUCLIM manual are based on the Moisture Index (MI). However, this function allows users to calculate moisture-based bioclimatic variables using other moisture variables as soil moisture or climate moisture index as inputs, offering greater flexibility in input data usage.
References
O’Donnell, M. S., & Ignizio, D. A. (2012). Bioclimatic predictors for supporting ecological applications in the conterminous United States (Vol. 691). ANUCLIM 6.1 User Guide. Centre for Resource and Environmental Studies, The Australian National University. Hijmans, R. J., Phillips, S., Leathwick, J., & Elith, J. (2017). `dismo`: Species Distribution Modeling. R package version 1.1-4.