/**
rain4pe: High-resolution gridded precipitation dataset for Peruvian and 
Ecuadorian watersheds (1981-2015)

Image properties: 
  - 'system:time_start' (Unix time)
Spatial resolution: 0.1° (or roughly 10km x 10km)


Google Earth Engine assets:
  - rain4pe monthly: "users/csaybar/rainpe/monthly"
  - rain4pe daily: "users/csaybar/rainpe/monthly" & "users/ryali93/rainpe/monthly"
  - rain4pe monthly climatology: "users/csaybar/rainpe/monthly_clim"
  - rain4pe annual mean: "users/csaybar/rainpe/annual"
  
More Information: https://dataservices.gfz-potsdam.de/pik/showshort.php?id=6f766e20-2d94-11eb-9603-497c92695674
*/

// 1. Load the pp ee.Image.
var rain4pe_ym = ee.Image("users/csaybar/rainpe/annual_mean")


// 2. Define an area of interest geometry.
var aoi = rain4pe_ym.geometry()
  
// 3. Display results.
var palette = ['000096','0064ff', '00b4ff', '33db80', '9beb4a', 'ffeb00', 'ffb300', 'ff6400', 'eb1e00', 'af0000'];
Map.centerObject(aoi)
Map.addLayer(rain4pe_ym, {min:0, max:5000, palette: palette})


// 4. Export ee.Image
Export.image.toDrive({
  image: rain4pe_ym,
  description: "rain4pe-pp-mean",
  fileNamePrefix: "rain4pe_pp_mean"
})