worldclim | R Documentation |
worldclim()
downloads the WorldClim V2.1 climate data for 1970–2000.
This includes monthly climate data for minimum, mean, and maximum temperature
and precipitation at a resolution of 0.5 minutes of a degree.
This function uses the geodata to download the worldclim tiles.
worldclim(output_dir, location, var = "all", ...)
output_dir |
Character (e.g., |
location |
A |
var, ... |
Arguments to |
worldclim()
is called for its side effects and returns NULL
.
Creates four subfolders named prec, tmax, tmin and tmean. Each folder
contains 12 GeoTiff (.tif) files, one for each month of the year for the time
period 1970–2000. Each of the files are downloaded at a spatial
resolution of 0.5 minutes of a degree. The precipitation folder contains
average monthly precipitation (mm). The tmax folder contains maximum monthly
temperature. The tmin folder contains minimum monthly
temperature. The tmean folder contains the average monthly temperature.
Temperature values are reported in °C.
James L. Tsakalos and Martin R. Smith
Fick, S.E. & Hijmans, R.J. (2017). WorldClim 2: new 1km spatial resolution climate surfaces for global land areas. International Journal of Climatology. 37, 4302–4315. \Sexpr[results=rd]{tools:::Rd_expr_doi("10.1002/joc.5086")}
Downloading from CHELSA chelsa()
or a more convenient
function for downloading other climate and elevation data ce_download()
.
# Download time will depend on the size of the area you wish to access
# climate data for and your internet connection speed.
# Make a polygon file
regents <- sf::st_polygon(
list(
cbind(
"lon" = c(51.537, 51.525, 51.523, 51.530, 51.534, 51.537),
"lat" = c(-0.150, -0.145, -0.156, -0.167, -0.163, -0.150)
)
)
)
# Create temporary file
temp_path <- tempfile()
# Download the WorldClim data
worldclim(
output_dir = temp_path,
location = regents
)
# Reset user options
unlink(file.path(temp_path))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.