### Description

This function will download the eto and ppt and will load a rasterstack according to the the region of interest (Region and sub_region).

### Usage

download_terraclimate(dir_out, variable, years, region, sub_region)


### Arguments

 dir_out Directory where you want to save the raster images that you are goind to download. variable Variable to download. This function will download the eto or ppt (Rasterstack). years The period in years that the function should download images. 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.

### Value

Download for the region of interest the ppt (Rainfall) or eto (reference evapotranspiration) rasterstack

### References

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.

### Examples

## Not run:

see_brazil_states()

years = c(2018:2019),
region = "brazil",
sub_region = 13)