This function reads the contents of local text files containing URLs for
CHELSA
climate data and extracts and saves their metadata (e.g., variable
name, climate model & scenario, time, and download URLs). It can optionally
download these links to desk, if requested.
Usage
CHELSA_Prepare(
EnvFile = ".env",
FromHPC = TRUE,
Download = FALSE,
NCores = 4,
Overwrite = FALSE,
Download_Attempts = 10,
Sleep = 5,
OtherVars = "npp",
BaseURL = paste0("https://os.zhdk.cloud.switch.ch/envicloud/",
"chelsa/chelsa_V2/GLOBAL/")
)
Arguments
- EnvFile
Character. Path to the environment file containing paths to data sources. Defaults to
.env
.- FromHPC
Logical indicating whether the work is being done from HPC, to adjust file paths accordingly. Default:
TRUE
.- Download
Logical, whether to download the CHELSA files. Defaults to
FALSE
.- NCores
Integer. Number of CPU cores to use for parallel processing. Defaults to 4.
- Overwrite
Logical, whether to re-download files that already exist. Defaults to
FALSE
.- Download_Attempts
Integer. The maximum number of download attempts. Defaults to 10.
- Sleep
Integer. Time in seconds to wait after each download attempt. Defaults to 5.
- OtherVars
Character. First letters of variables other than bioclimatic variables to be processed. Defaults to "npp", which means processing bioclimatic variables (bio1-19) and Net Primary Productivity will be processed. If
OtherVars
is set to "", only bioclimatic variables will be processed. See CHELSA_Vars for a detailed information on CHELSA climate variables.- BaseURL
String, the base URL for downloading CHELSA climate data.