Variables

Introduction

This document provides a comprehensive reference for all the environmental variables available in the envar R package and the sources from which they can be retrieved. Each section describes a data source, lists the available variables with their synonyms, provides usage examples, and includes proper citations. Sources are grouped based on the category to which they belong (e.g., land cover, climate, etc.). For each source, the available variables are listed alongside synonyms that can be used inside the vars argument interchangeably (except for the chelsa and worldclim functions that do not allow the use of synonyms and the exact codes must be used).

Load package

When executing this command, another package (dplyr) will be automatically loaded to ensure the full functionality of the package. However, other packages are often required for plotting and further analyses and we also load them here for later use.

require(envar)
require(terra)
require(sf)

Climate

CHELSA

This function downloads, processes, and extracts variables from the CHELSA (Climatologies at High Resolution for the Earth’s Land Surface Areas) dataset (Karger et al. 2017) and the CHELSA BIOCLIM+ dataset (Brun et al. 2022).

The following variables are available. Please note the distinction between “Monthly” time-series data and “Climatologies”. There is only one code-name for each variable and no working synonyms, differently from most other functions of the package, and in parentheses is the meaning. Climatologies are available for 30-year periods: 1981-2010, 2011-2040, 2041-2070, 2071-2100.

Available variables (67 total)

Monthly time-series (Available years: 1980 - 2018):

Cloud Cover climatologies:

Climate Moisture Index climatologies:

Relative humidity climatologies:

Potential evapotranspiration climatologies:

Solar radiation climatologies:

Wind speed climatologies:

Vapor pressure deficit climatologies:

Growing season characteristics (TREELIM model):

Growing Degree Days (GDD):

Snow and frost climatologies:

Biological productivity:

Climate classifications (Köppen-Geiger & others):

It is necessary to specify also the years as a distinct argument. If specified as a range (e.g. “1981-2010”) the average of those years is downloaded, otherwise if a single year is specified, the variables will refer to that year. With the argument “months” (numeric vector from 1 to 12) it is also possible to download data only for one or multiple specified months. If this is parameter is not specified, 12 months will be downloaded as 12 distinct layers. When downloading future variables across all possible CHELSA downloads, it is also necessary to specify the general circulation model(s) within the “gcm” argument, the representation concentration pathway(s) with “rcp”, and the shared socioeconomic pathway with the “ssp” argument. If the year(s) and gcm(s) and ssp(s) are not specified properly or not specified at all, the download will not work.

processed <- par_set(shape = Alps, crs = 3035) %>%
  chelsa(vars = c("pr"), years = 2018, months = 1)
plot(processed[[1]])
plot of chunk unnamed-chunk-5

plot of chunk unnamed-chunk-5

WorldClim

This function downloads, processes, and extracts variables from the WorldClim climate dataset (Fick & Hijmans 2017). Each variable corresponds to a global raster representing climate variables at approximately 1-km resolution. It supports both Historical (v2.1, 1970-2000) and Future (CMIP6) data.

Available variables (8 total)

Temperature:

Precipitation:

Physical:

Bioclimatic:

Historical:

Future:

processed <- par_set(shape = Alps, crs = 3035) %>% 
             worldclim(vars = c("bio1"), years = "1970-2000")

Climate zones

This function downloads, processes, and extracts variables from the High-resolution (1 km) Köppen-Geiger maps dataset (Beck et al. 2023). Each variable corresponds to a global GeoTIFF representing climate classification zones based on historical data or future CMIP6 projections.

Available variables (1 total)

Time periods (“years” argument):

Historical:

Future:

SSP Scenarios (“ssp” argument, required for future periods):

processed <- par_set(shape = Alps, crs = 3035) %>% 
  climatezones()
plot(processed[[1]])
plot of chunk unnamed-chunk-8

plot of chunk unnamed-chunk-8

Cloud cover

This function downloads, processes, and extracts variables from the EarthEnv Global Cloud Cover dataset (Wilson & Jetz 2016). Each variable corresponds to a global Cloud-Optimized GeoTIFF (COG) representing cloud cover dynamics.

Available variables (21 total)

Metrics:

Seasonality:

Monthly means:

processed <- par_set(shape = Alps, crs = 3035) %>% 
  cloudcover(vars = c("mean annual"))
plot(processed[[1]])
plot of chunk unnamed-chunk-10

plot of chunk unnamed-chunk-10

Aridity

This function downloads, processes, and extracts variables from the Global Aridity Index and ET0 Database v3 (Zomer et al. 2022). Each variable corresponds to a global raster representing aridity index or potential evapotranspiration values.

Available variables (27 total)

Annual variables:

Monthly Aridity Index (ai_v3_01.tif to ai_v3_12.tif):

Monthly ET0 (et0_v3_01.tif to et0_v3_12.tif):

processed <- par_set(shape = Alps, crs = 3035) %>% 
  aridity(vars = c("aridity index annual", "et0 january"))
plot(processed[[1]])
plot of chunk unnamed-chunk-12

plot of chunk unnamed-chunk-12

Land cover

EarthEnv land cover

This function downloads, processes, and extracts variables from the EarthEnv Consensus Land Cover dataset (Tuanmu & Jetz 2014). Each variable corresponds to a global raster representing a specific land cover class at 1 km resolution.

Available variables (12 total)

processed <- par_set(shape = Alps, crs = 3035) %>% 
  earthenvlandcover(vars = c("snow ice"))
plot(processed[[1]])
plot of chunk unnamed-chunk-14

plot of chunk unnamed-chunk-14

Macroecological Land Cover

This function downloads, processes, and extracts variables from the Global 1 km Land Cover dataset (Lo Parrino et al. 2025). Each variable corresponds to a global raster representing a specific land cover class or diversity index derived from very high-resolution imagery.

Available variables (15 total)

processed <- par_set(shape = Alps, crs = 3035) %>% 
  melc(vars = c("tree", "water"))
plot(processed[[1]])
plot of chunk unnamed-chunk-16

plot of chunk unnamed-chunk-16

Hybrid land cover

This function downloads, processes, and extracts land cover variables from the Hybrid Global Annual 1-km IGBP Land Cover Maps dataset (Luo et al. 2024). The data covers the period from 2000 to 2020.

Available variables (1 total)

Note: If the vars argument is left empty, the function will default to downloading the land cover map. You must specify the year argument (integer between 2000 and 2020).

processed <- par_set(shape = Alps, crs = 3035) %>% 
  hybridlandcover(vars = "landcover", year = 2015)
plot(processed[[1]])
plot of chunk unnamed-chunk-18

plot of chunk unnamed-chunk-18

GeoSOS land cover

This function downloads, processes, and extracts variables from the Global Land-Use and Land-Cover Change Product (2010-2100) (Li et al. 2017). The dataset provides global 1 km resolution rasters based on different IPCC scenarios.

Land cover classification legend:

Available variables (1 total)

Available scenarios (for years > 2010; 2010 is from MODIS baseline landcover):

Available years:

processed <- par_set(shape = Alps, crs = 3035) %>% 
  geososlandcover(vars = "landcover", scenario = "A1B", year = 2050)
plot(processed[[1]])
plot of chunk unnamed-chunk-20

plot of chunk unnamed-chunk-20

PFT land cover

This function downloads, processes, and extracts land cover variables from the Global 7-land-types LULC projection dataset based on Plant Functional Types (PFT) with a 1-km resolution under socio-climatic scenarios (Chen et al. 2022b).

Available variables (1 total)

Note: If the vars argument is left empty, the function will default to downloading the land cover map.

Required arguments:

year: Integer. Available years: 2020 to 2100 in 5-year intervals (2020, 2025, 2030, …, 2100).

ssp: Integer or character. The SSP-RCP scenario code. Available values:

processed <- par_set(shape = Alps, crs = 3035) %>% 
  pftlandcover(vars = "landcover", year = 2050, ssp = 585)
plot(processed[[1]])
plot of chunk unnamed-chunk-22

plot of chunk unnamed-chunk-22

GCAM land cover

This function downloads, processes, and extracts simulated global land use and land cover (LULC) data for the period 2020-2100 (Gao et al. 2025).

The data represents 1 km resolution LULC maps with the following integer codes:

Available variables (1 total)

Available years:

Available SSPs (Shared Socioeconomic Pathways):

Note: The original data is in World Mercator projection and will be automatically reprojected to the CRS defined in par_set() (default: EPSG 4326).

processed <- par_set(shape = Alps, crs = 3035) %>% 
  gcamlandcover(ssp = 585, year = 2050)
plot(processed[[1]])
plot of chunk unnamed-chunk-24

plot of chunk unnamed-chunk-24

Landscape heterogeneity

This function downloads, processes, and extracts variables from the EarthEnv habitat heterogeneity dataset (1-km resolution) (Tuanmu & Jetz 2015). Each variable corresponds to a global Cloud-Optimized GeoTIFF (COG) representing different metrics of habitat heterogeneity derived from remote sensing data.

Available variables (14 total)

First-order statistics:

Second-order statistics (Texture metrics):

processed <- par_set(shape = Alps, crs = 3035) %>% 
  heterogeneity(vars = c("shannon", "cv"))
plot(processed[[1]])
plot of chunk unnamed-chunk-26

plot of chunk unnamed-chunk-26

Habitats

This function downloads, processes, and extracts variables from the IUCN Global Habitat Classification Fractions dataset (Jung et al. 2020). The data is available at Level 1 (broad) and Level 2 (detailed) classifications.

Available variables (Level 1 - 12 total)

Available variables (selection from Level 2 - check original paper for a more careful description and complete list)

Forests:

Savannas:

Shrublands:

Grasslands:

Wetlands:

Deserts:

Artificial:

processed <- par_set(shape = Alps, crs = 3035) %>% 
  habitat(vars = c("Forest", "Artificial"), level = 1)
plot(processed[[1]])
plot of chunk unnamed-chunk-28

plot of chunk unnamed-chunk-28

Soil characteristics

Harmonized World Soil Database

This function downloads, processes, and extracts variables from the Harmonized World Soil Database v2.0 (HWSD v2.0) (authors 2023). The variable corresponds to a global raster file at 1 km resolution representing soil types.

Available variables (1 total)

processed <- par_set(shape = Alps, crs = 3035) %>% 
  soil()
plot(processed[[1]])
plot of chunk unnamed-chunk-30

plot of chunk unnamed-chunk-30

Soil climate

This function downloads, processes, and extracts soil bioclimatic variables and monthly soil temperatures from the Global Soil Temperature dataset (Lembrechts et al. 2022).

Available variables (23 total)

Bioclimatic variables:

Monthly mean soil temperatures:

The depth argument defines the soil depth range in cm. Options are “0-5” (default) or “5-15”.

processed <- par_set(shape = Alps, crs = 3035) %>% 
  soilclimate(vars = c("SBIO1", "SBIO10"), depth = "5-15")
plot(processed[[1]])
plot of chunk unnamed-chunk-32

plot of chunk unnamed-chunk-32

Topography

This function downloads, processes, and extracts variables from the EarthEnv Topography dataset (Amatulli et al. 2018). This dataset provides global, cross-scale topographic variables suitable for biodiversity and ecosystem modeling.

Available variables (11 total)

Additional parameters:

processed <- par_set(shape = Alps, crs = 3035) %>% 
  topography(vars = c("elevation", "slope"))
plot(processed[[1]])
plot of chunk unnamed-chunk-34

plot of chunk unnamed-chunk-34

Freshwater environments

This function downloads, processes, and extracts variables from the near-global freshwater-specific environmental variables dataset (Domisch et al. 2015). These variables are available at a 1 km resolution and capture upstream catchment characteristics, including topography, land cover, soil, and climate.

Available variables

The freshwater() function provides access to 324 near-global 1-km resolution layers. You can filter specific layers from within these collections using the month argument (for climatic variables) and algorithm argument (for topographic, soil, and aggregation methods).

Temperature (monthly)

Use the month argument (1–12) to select specific months.

Precipitation

Hydroclimatic

Topography

Land cover

Geology & soil

Quality control

Using the month argument

The month argument is used only for monthly variables (tmin, tmax, prec). Supplying one or several months filters the dataset to those corresponding monthly bands.

Using the algorithm argument

The algorithm argument filters specific statistical bands for topography, flow accumulation, soils, and land cover.

For elevation and slope layers, algorithms map to band order: * min – Band 1 * max – Band 2 * range – Band 3 * avg / mn – Band 4

Flow accumulation: * length – Band 1 (stream length) * acc – Band 2 (catchment accumulation)

For land cover and soil variables, the algorithm matches text patterns in filenames (e.g., “maximum”, “weighted”, “average”). When multiple variables are requested, the algorithm applies to the entire request, so multiple calls may be required if different algorithms are needed.

processed <- par_set(shape = Alps, crs = 3035) %>% 
freshwater(vars = c("elevation", "slope", "tmin"), algorithm = "mn", month=12)
plot(processed[[3]])
plot of chunk unnamed-chunk-36

plot of chunk unnamed-chunk-36

Marine environments

This function downloads, processes, and extracts variables from the Bio-ORACLE v3.0 dataset (Assis et al. 2024).

Available variables (24 total)

Additional parameters:

processed <- par_set(marine_ecoregion = "East African Coral Coast", res = 6) %>%
  biooracle(vars = "o2", realm = "surface", years = "2000-2010")
plot(processed[[1]])
plot of chunk unnamed-chunk-38

plot of chunk unnamed-chunk-38

Human impact

SPECTRE

This function downloads, processes, and extracts variables from the SPECTRE – Spatially Explicit ECosysTem ThREats dataset (Branco et al. 2024). Each variable corresponds to a global Cloud-Optimized GeoTIFF (COG) representing a different anthropogenic or climatic threat. When using this source, cite (Branco et al. 2024) and also the original source for each variable (check references in (Branco et al. 2024)).

Available variables (21 total)

Land use and human pressure:

Forest loss:

Light pollution:

Climate change:

processed <- par_set(shape = Alps, crs = 3035) %>% 
  spectre(vars = c("forest loss", "light at night"))
plot(processed[[1]])
plot of chunk unnamed-chunk-40

plot of chunk unnamed-chunk-40

Accessibility

This function downloads, processes, and extracts variables from the Global Accessibility Indicators dataset (Nelson et al. 2019). Each variable corresponds to a global raster representing the travelling time (in minutes) to cities or ports of specific sizes.

Available variables (17 total)

Cities:

Ports:

processed <- par_set(shape = Alps, crs = 3035) %>% 
  accessibility(vars = c("large cities", "ports1"))
plot(processed[[1]])
plot of chunk unnamed-chunk-42

plot of chunk unnamed-chunk-42

GDP past

This function downloads, processes, and extracts variables from the global 1km gridded revised real gross domestic product and electricity consumption dataset (1992–2019) (Chen et al. 2022a).

Available variables (2 total)

Economic metrics:

Energy metrics:

Years available: 1992 to 2019.

processed <- par_set(shape = Alps, crs = 3035) %>% 
  gdppast(vars = "gdp", year = c(2000, 2010))
plot(processed)
plot of chunk unnamed-chunk-44

plot of chunk unnamed-chunk-44

Population

This function downloads, processes, and extracts variables from the Global Population Projections dataset (Wang et al. 2022). It provides 1-km grid population distributions from 2020 to 2100 under five Shared Socioeconomic Pathways (SSPs).

Available variables (1 total)

Population Counts:

Use the arguments year and ssp to filter the specific data required.

Years available: 2020 to 2100 in 5-year intervals (e.g., 2020, 2025, 2030…, 2100).

SSP Scenarios:

processed <- par_set(shape = Alps, crs = 3035) %>% 
  population(vars = "population", year = 2050, ssp = 2)
plot(processed)
plot of chunk unnamed-chunk-48

plot of chunk unnamed-chunk-48

Protected areas

IUCN protected areas

This function downloads, processes, and extracts variables from the World Database of Protected Areas (WDPA) (Planet 2025). Each variable corresponds to a global raster representing different IUCN Management Categories of protected areas.

Available variables (8 total)

processed <- par_set(shape = Alps, crs = 3035) %>% 
  protection(vars = c("national park", "WDPA_ALL"))
plot(processed)
plot of chunk unnamed-chunk-50

plot of chunk unnamed-chunk-50

Conclusion

This tutorial provided an overview of all the available sources and functions. Remember to always cite the proper reference for the source used. For further details on the use of specific sources, check the function documentation here or from R after loading the package with ? (e.g., ?spectre).

Appendix: A runnable mini-example

Each source above is downloaded on demand, which needs network access, so those chunks are shown but not executed when the article is built through GitHub pages at each deploy. However, whatever the source, every variable comes back as a named layer in a SpatRaster. To show what that looks like offline, here we show a real WorldClim (Fick & Hijmans 2017) extract for Switzerland holding four such variables — mean annual temperature (bio1), annual precipitation (bio12), elevation and slope at ~9 km. The chunk below loads it in place of a download and inspects the variables it contains.

library(envar)

# A downloaded stack behaves exactly like this bundled one:
switzerland <- terra::rast(
  system.file("extdata", "switzerland.tif", package = "envar")
)

# The layer names are the variable names you requested via `vars = c(...)`:
names(switzerland)
## [1] "bio1"      "bio12"     "elevation" "slope"
# Per-variable summary statistics over the study area:
terra::global(switzerland, c("min", "mean", "max"), na.rm = TRUE)
##              min        mean     max
## bio1       -5.92    5.224702   11.05
## bio12     307.00 1235.081608 1994.00
## elevation 302.00 1304.183922 3337.00
## slope       0.05    1.612203    5.76
# Plot every variable layer:
terra::plot(switzerland)

References

Amatulli, G., Domisch, S., Tuanmu, M.N., Parmentier, B., Ranipeta, A., Malczyk, J. & Jetz, W. (2018). A suite of global, cross-scale topographic variables for environmental and biodiversity modeling. Scientific Data, 5, 180040.
Assis, J., Fernández Bejarano, S.J., Salazar, V.W., Schepers, L., Gouvêa, L., Fragkopoulou, E., Leclercq, F., Vanhoorne, B., Tyberghein, L. & Serrão, E.A. (2024). Bio-ORACLE v3.0. Pushing marine data layers to the CMIP6 earth system models of climate change research. Global Ecology and Biogeography, 33, e13813.
authors, M. (2023). Harmonized world soil database v2.0.
Beck, H.E., McVicar, T.R., Vergopolan, N., Berg, A., Lutsko, N.J., Dufour, A., Zeng, Z., Jiang, X., Dijk, A.I.J.M. van & Miralles, D.J. (2023). High-resolution (1 km) köppen-geiger maps for 1901-2099 based on constrained CMIP6 projections. Scientific Data, 10, 724.
Branco, V.V., Capinha, C., Rocha, J., Correia, L. & Cardoso, P. (2024). SPECTRE: Standardized global spatial data on terrestrial species and ecosystems threats. Global Ecology and Biogeography, 34, e13949.
Brun, P., Zimmermann, N.E., Hari, C., Pellissier, L. & Karger, D.N. (2022). A novel set of global climate-related predictors at kilometre-resolution. Earth System Science Data, 14, 5573–5603.
Chen, J., Gao, M., Cheng, S., Hou, W., Song, M., Liu, X. & Liu, Y. (2022a). Global 1 km × 1 km gridded revised real gross domestic product and electricity consumption during 1992–2019 based on calibrated nighttime light data. Scientific Data, 9, 202.
Chen, G., Li, X. & Liu, X. (2022b). Global land projection based on plant functional types with a 1-km resolution under socio-climatic scenarios. Scientific Data, 9, 125.
Domisch, S., Amatulli, G. & Jetz, W. (2015). Near-global freshwater-specific environmental variables for biodiversity analyses in 1 km resolution. Scientific Data, 2, 150073.
Fick, S.E. & Hijmans, R.J. (2017). WorldClim 2: New 1-km spatial resolution climate surfaces for global land areas. International Journal of Climatology, 37, 4302–4315.
Gao, Y., McJeon, H., Ou, Y., Chen, L., Lv, J., Fang, D., Wang, Y., Ye, S., Song, C. & Gao, P. (2025). Global land system maps at 1 km resolution for 1.5°c climate. Scientific Data, 12, 672.
Jung, M., Dahal, P.R., Butchart, S.H., Donald, P.F., De Lamo, X., Lesiv, M., Kapos, V., Rondinini, C. & Visconti, P. (2020). A global map of terrestrial habitat types. Scientific Data, 7, 256.
Karger, D.N., Conrad, O., Böhner, J., Kawohl, T., Kreft, H., Soria-Auza, R.W., Zimmermann, N.E., Linder, H.P. & Kessler, M. (2017). Climatologies at high resolution for the earth’s land surface areas. Scientific Data, 4, 170122.
Lembrechts, J.J., Hoogen, J. van den, Aalto, J., Ashcroft, M.B., De Frenne, P., Kemppinen, J., Kopecký, M., Luoto, M., Maclean, I.M. & Crowther, T.W. et al. (2022). Global maps of soil temperature. Global Change Biology, 28, 3110–3144.
Li, X., Chen, G., Liu, X., Liang, X., Wang, S., Chen, Y., Pei, F. & Xu, X. (2017). A new global land-use and land-cover change product at a 1-km resolution for 2010 to 2100 based on human–environment interactions. Annals of the American Association of Geographers, 107, 1040–1059.
Lo Parrino, E., Simoncini, A., Ficetola, G.F. & Falaschi, M. (2025). Global 1-km land cover for ecological modelling from very high resolution imagery. EcoEvoRxiv, in press.
Luo, Y., Zhu, Z., Zhao, W., Li, M., Chen, J., Zhao, P., Sun, L., Zhang, Y., Duanmu, Z. & Chen, J. (2024). Hybrid global annual 1-km IGBP land cover maps for the period 2000–2020. Journal of Remote Sensing, 4, 0122.
Nelson, A., Weiss, D.J., Etten, J. van, Cattaneo, A., McMenomy, T. & Koo, J. (2019). A suite of global accessibility indicators. Scientific Data, 6, 266.
Planet, P. (2025). World database of protected areas.
Tuanmu, M.N. & Jetz, W. (2014). A global 1-km consensus land-cover product for biodiversity and ecosystem modelling. Global Ecology and Biogeography, 23, 1031–1045.
Tuanmu, M.N. & Jetz, W. (2015). A global, remote sensing-based characterization of terrestrial habitat heterogeneity for biodiversity and ecosystem modelling. Global Ecology and Biogeography, 24, 1329–1339.
Wang, X., Meng, X. & Long, Y. (2022). Projecting 1 km-grid population distributions from 2020 to 2100 globally under shared socioeconomic pathways. Scientific Data, 9, 563.
Wilson, A.M. & Jetz, W. (2016). Remotely sensed high-resolution global cloud dynamics for predicting ecosystem and biodiversity distributions. PLoS Biology, 14, e1002415.
Zomer, R.J., Xu, J. & Trabucco, A. (2022). Version 3 of the global aridity index and potential evapotranspiration database. Scientific Data, 9, 409.