ini_terraclimate | R Documentation |
Download TerraClimate netCDF data files to extract their data offline
ini_terraclimate(
from = "2019-09-01",
to = "2022-06-30",
clim_vars = c("ppt", "tmin", "tmax"),
data_path = "./data/",
timeout = 300
)
from |
Start date as a string in the 'YYYY-MM-DD' format. |
to |
End date as a string in the 'YYYY-MM-DD' format. |
clim_vars |
List of all climate variables to be imported. Valid list includes: aet, def, pet, ppt, q, soil, srad, swe, tmax, tmin, vap, ws, vpd, and PDSI. Default is NULL for all. |
data_path |
String contains the directory path where downloaded netCDF files exists (default is './data/') |
timeout |
Timeout in seconds to download each netCDF raster file (default is 300) |
Khaled Al-Shamaa, k.el-shamaa@cgiar.org
get_terraclimate
if(interactive()) {
remotes::install_github("icarda-git/QBMS")
library(QBMS)
ini_terraclimate('2018-09-01', '2019-06-30', c('ppt', 'tmin', 'tmax'))
x <- c(-6.716, 35.917, 76.884)
y <- c(33.616, 33.833, 23.111)
a <- get_terraclimate(y, x, '2018-09-01', '2019-06-30', c('ppt', 'tmin', 'tmax'))
a$climate[[1]]
a$biovars[[1]]
b <- get_terraclimate(y, x, '2018-09-01', '2019-06-30', c('ppt', 'tmin', 'tmax'), offline = TRUE)
b$climate[[1]]
b$biovars[[1]]
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.