1

I want to download the new (19) WorldClim Bioclimatic variables (version 2.1) for a specific region of the world, but it looks like you can only download the entire world, which is around 10 GB!

Around 8hrs to download with my internet connection.

I know there is a way to download tiles in R using the raster library. Here is the code:

library(raster)
getData('worldclim', var='bio', res=0.5, lon=-60, lat= -37, download = TRUE, path = "")

    *trying URL 'https://biogeo.ucdavis.edu/data/climate/worldclim/1_4/tiles/cur/bio_44.zip'
    Content type 'application/zip' length 5663180 bytes (5.4 MB)
    downloaded 5.4 MB*

As you can see, this works for worldclim version 1.4 (data are obsolete). Anyway to do the same but with worldclim 2.1?

4
  • I can't see any mention of the 30degree tiles on the web site for version 2, unlike for version 1.4. Have you tried worldclim's contact address? worldclim.org/about.html
    – Spacedman
    Commented Jul 21, 2020 at 16:09
  • The standard 30 second Bioclimatic variables for WorldClim version 2 can be downloaded at this link worldclim.org/data/worldclim21.html
    – Dan
    Commented Jul 21, 2020 at 17:27
  • Yes what I am talking about are the 30degree x 30 degree tiles (worldclim.org/data/v1.4/formats.html) which save you having to download the whole globe if you only need part. I can't see an equivalent for v2.x and have you tried contacting WorldClim about that?
    – Spacedman
    Commented Jul 21, 2020 at 21:58
  • I just wrote an email to [email protected] and [email protected].
    – Dan
    Commented Jul 22, 2020 at 13:23

2 Answers 2

1

This is the new version code with pacakge geodata

The following code will download 12 maps (each for one month) see WorldClim website for more info, Click here for a tutorial of map making.

library(geodata)
MAPPP<-worldclim_global('tavg', res=10 ,path='YOUR WORKING PATH HERE')
# if you dont want to download the whole world, use worldclim_tile() or worldclim_country()
southA<-crop(MAPPP,extent(-82,-34,-60,15))
# To focus on south America
plot(southA)
0

Check this out, I found it in another website.

"for quick and dirty solution you can replace the url that the getData() function reads for bioclim data. You can find the source code of the function here https://github.com/cran/raster/blob/master/R/getData.R#L277> . Note that there's if/else flow for different resolutions of climate data). From there you can make a custom function."

Also personally I used the code below here to download entire world data for V2 or V2.1 (basically any updated version). Replace the url and the file name in destfile and in unzip to the version and resolution you are using.

# Download 2.5 res worldclim V 2.1
P_url<- "https://biogeo.ucdavis.edu/data/worldclim/v2.1/base/wc2.1_2.5m_bio.zip"
download.file(P_url, destfile="wc2.1_2.5m_bio.zip")
unzip("wc2.1_2.5m_bio.zip")

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.