Learn R Programming

geodata (version 0.6-2)

worldclim: WorldClim climate data

Description

Download climate data from WorldClim version 2.1. See Details for variables and units.

Usage

worldclim_global(var, res, path, version="2.1", ...)
worldclim_country(country, var, path, version="2.1", ...)
worldclim_tile(var, lon, lat, path, version="2.1", ...)

Value

SpatRaster

Arguments

var

character. Valid variables names are "tmin", "tmax", "tavg", "prec", "wind", "vapr", and "bio"

res

numeric. Valid resolutions are 10, 5, 2.5, and 0.5 (minutes of a degree)

path

character. Path for storing the downloaded data. See geodata_path

country

character. Country name or code

lon

numeric. Longitude

lat

numeric. Latitude

version

character or numeric. WorldClim version number. Only "2.1" supported at the moment

...

additional arguments passed to download.file

Details

These are the WorldClim monthly average climate data.

VariableDescriptionUnit
tminminimum temperature°C
tmaxmaximum temperature°C
tavgaverage temperature°C
prectotal precipitationmm
sradincident solar radiationkJ m-2 day-1
windwind speed (2 m above the ground)m s-1
vaprvapor pressurekPa

See Also

Examples

Run this code
lux <- worldclim_country("Luxembourg", var="tmin", path=tempdir())

Run the code above in your browser using DataLab