Learn R Programming

chooseGCM (version 1.0.2)

worldclim_data: Download WorldClim v2.1 Bioclimatic Data

Description

This function allows downloading data from WorldClim v2.1 (https://www.worldclim.org/data/index.html) for multiple GCMs, time periods, and SSPs.

Usage

worldclim_data(period = 'current', variable = 'bioc', year = '2030',
gcm = 'mi', ssp = '126', resolution = 10, path = NULL)

Value

This function does not return any value.

Arguments

period

Character. Can be 'current' or 'future'.

variable

Character. Specifies which variables to retrieve. Possible entries are: 'tmax', 'tmin', 'prec', and/or 'bioc'.

year

Character or vector. Specifies the year(s) to retrieve data for. Possible entries are: '2030', '2050', '2070', and/or '2090'.

gcm

Character or vector. Specifies the GCM(s) to consider for future scenarios. See the table below for available options.

ssp

Character or vector. SSP(s) for future data. Possible entries are: '126', '245', '370', and/or '585'.

resolution

Numeric. Specifies the resolution. Possible values are 10, 5, 2.5, or 30 arcseconds.

path

Character. Directory path to save the downloaded files. Default is NULL.

Author

Luíz Fernando Esser (luizesser@gmail.com) https://luizfesser.wordpress.com

Details

This function creates a folder in path. All downloaded data will be stored in this folder. Note: While it is possible to retrieve a large volume of data, it is not recommended to do so due to the large file sizes. For example, datasets at 30 arcseconds resolution can exceed 4 GB. If the function fails to retrieve large datasets, consider increasing the timeout by setting options(timeout = 600). This will increase the timeout to 10 minutes.

Available GCMs to be used in the gcm argument:

CODEGCM
acACCESS-CM2
aeACCESS-ESM1-5
bcBCC-CSM2-MR
caCanESM5
ccCanESM5-CanOE
ceCMCC-ESM2
cnCNRM-CM6-1
chCNRM-CM6-1-HR
crCNRM-ESM2-1
ecEC-Earth3-Veg
evEC-Earth3-Veg-LR
fiFIO-ESM-2-0
gfGFDL-ESM4
ggGISS-E2-1-G
ghGISS-E2-1-H
hgHadGEM3-GC31-LL
inINM-CM4-8
icINM-CM5-0
ipIPSL-CM6A-LR
meMIROC-ES2L
miMIROC6
mpMPI-ESM1-2-HR
mlMPI-ESM1-2-LR
mrMRI-ESM2-0
ukUKESM1-0-LL

References

https://www.worldclim.org/data/index.html

Examples

Run this code
# \donttest{
# download data from multiple periods:
year <- c("2050", "2090")
worldclim_data("future", "bioc", year, "mi", "126", 10, path=tempdir())

# download data from one specific period:
worldclim_data("future", "bioc", "2070", "mi", "585", 10, path=tempdir())
# }

Run the code above in your browser using DataLab