5 Data Download
This manual is still under development and may be subject to change.
This warning will be removed once the manual is finalized.
To simplify the process of downloading WorldClim data, we developed the worldclim_download() function along with the orbis R package (Vartanian, 2026). This function takes the job of accessing the WorldClim website, scraping the data, and organizing it for you just the way LogoClim needs it.
Here is a parameter overview:
worldclim_download(
series,
resolution = NULL,
variable = NULL,
model = NULL,
ssp = NULL,
year = NULL,
dir = here::here("data")
)The first thing you need to do is explore the WorldClim website to select the appropriate data for your needs. With this information, you simply specify the parameters for the worldclim_download() function.
For small areas, increase the data resolution to minimize losses from the conversion process. We perform tests using 1% relative tolerance for areas with at least 1,000 cells. We recommend following this guideline and using areas with at least 1,000 cells. See the Near-Equality Tests to learn more.
For example, to download precipitation data from the Historical Monthly Weather data series, between the years 2020 and 2024, at the 10-minute resolution, you could use the following code:
files <- worldclim_download(
series = "hmwd",
resolution = "10m",
variable = "prec",
year = "2020-2024"
)Refer to worldclim_download() documentation to learn more.
5.1 File Structure
The function downloads and organizes files into a structure required by LogoClim, so it is essential to preserve this structure. The organization follows this hierarchy:
data
├── historical-climate-data
├── historical-monthly-weather-data
├── future-climate-data
The structure above assumes that the data will be stored in a directory named data, but you can store it in any other directory as well. You will just need to configure the data path in the model settings accordingly.
The data files inside the folders also follows naming patterns that must be respected. Each series has its own naming convention:
- Historical Climate Data:
wc2.1 _ 10m _ tmin _ 1970-2000 - 01 .asc
_____ ___ _____ _________ ____
| | | | |
Prefix Resolution Variable Period Month
- Historical Monthly Weather Data:
wc2.1 _ cruts4.09 _ 10m _ prec _ 1951 - 01 .asc
______ __________ ____ _____ _____ ___
| | | | | |
Prefix CRU-TS Version Resolution Variable Year Month
- Future climate data:
wc2.1 _ 10m _ bioc _ ACCESS-CM2 _ ssp126 _ 2021-2040 _ 01. asc
______ ____ _____ __________ ______ ________ ___
| | | | | | |
Prefix Resolution Variable Model SSP Period Month
Note the separators. They can change from _ to - depending on the data series and its specific requirements.