[GIS] WorldClim 2.0 Solar Radiation data

climategeotiff-tiffrsolar radiation

I am trying to get Solar Radiation data from WorldClim version 2.0 in R,
However, I am using the library raster in R but it seems to not be possible to download this data. (since there is only functions for bioclimatic data, Temperature, altitude, and precipitation)

Does anyone know how to download this data from the website using R?

I have specific coordinates. And for my bioclimatic data I have used this code, which worked:

library(raster)
library(sp)

r <- getData("worldclim",var="bio",res=10) 
r <- r[[c(1,12)]]

names(r) <- c("Temp","Prec")

lats <- c(48.45435)
lons <- c(-2.04734)

coords <- data.frame(x=lons,y=lats)
points <- SpatialPoints(coords, proj4string = r@crs)
values <- extract(r,points)
df <- cbind.data.frame(coordinates(points),values)
df

Best Answer

getData() only downloads tmean, tmin, tmax, prec, bio and alt from WorldClim v1.4. Check lines 252 to 325.

You can download files with utils::download.file() function using WorlClim data URLs, but it will download a full file, not a specific tiles as getData() does.

Related Question