View source: R/download_terraclimate.R
download_terraclimate | R Documentation |
This function will download the tmax and tmin images and will load a rasterstack according to the the region of interest (Region and sub_region). The images downloaded by this function are intended to be used for calculating the climatic zoning of crops. To calculate the climatic zoning of the crops, you first have to calculate the mean air temperature (function tmean) and the monthly air temperature (function tmean_monthly).
download_terraclimate(dir_out, variable, years, region, sub_region)
dir_out |
Directory where you want to save the raster images that you are goind to download. |
variable |
Variable to download. The variables can be the minimum (tmin) or maximum (tmax) air temperature of 'TerraClimate' (Rasterstack). |
years |
The period in years that the function should download. |
region |
Use the "brazil" shapefile to extract the Rasterstack (variable) for one state (Brazilian state), or use the "biomes_brazil" to extract the Rasterstack (variable) for one biome of Brazil. |
sub_region |
You have two options in this section, if you choice the brazil (in region parameter) you need to choice the Brazilian states, but if you choice the biomes_brazil (in region parameter) you must choice one of Brazilian biomes. |
Returns a Rasterstack of tmin (minimum air temperature) or tmax (maximum air temperature).
The images used in this package can be found in the paper: Abatzoglou, J.T., S.Z. Dobrowski, S.A. Parks, K.C. Hegewisch, 2018, Terraclimate, a high-resolution global dataset of monthly climate and climatic water balance from 1958-2015, Scientific Data.
## Not run:
### Downloading the minimum air temperature and maximum air temperature based on Brazil states.
see_brazil_states()
img <- download_terraclimate(
dir_out = "C:/teste/tmin/state", variable = "tmin",
years = c(2018:2019),
region = "brazil",
sub_region = 13
)
### Downloading the minimum air temperature and maximum air temperature based on Brazil states.
see_brazil_biomes()
img <- download_terraclimate(
dir_out = "C:/teste/tmin/biome", variable = "tmin",
years = c(2018:2019),
region = "biomes_brazil",
sub_region = 6
)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.