2

I am currently trying to export and obtain rasters of EVI for:

  1. Every month of the year across 2000 to 2018 ie. If January has two MODIS EVI images, I would like to take the mean of the images for January and export one image for January 2000, and January 2001 and so on.

  2. Similarly, I would like an averaged value of EVI for every month of the year across 2000 to 2018. In other words, a single EVI raster for January, a single EVI raster for February and so on.

I tried code provided in the answer here, but I am still unable to get a month by month as well as yearly average of EVI as needed above.

My code: https://code.earthengine.google.com/7c5c4eada7044b08d4c45342fd84d8d1

Vijay Ramesh
  • 1,332
  • 15
  • 46

1 Answers1

1

Ok, here's some code to solve your problem. Question 2 is addressed first with a 12-layer raster image being exported to your drive, then the second export is an example for a single year (example is with 2001).

Edit: wrong link. https://code.earthengine.google.com/5b44745d195c944c4c4de06ed68fe000

JepsonNomad
  • 2,146
  • 1
  • 14
  • 32
  • Thank you for the detailed code. This has been very helpful. A couple of questions: 1) If I would like to export the evi_img_2001 for 2002, 2003 and so on, do I have to manually enter dates in line 72 of your code? Change it each time to 2002, 2003 and so on? Or is there an easier way to loop through all months, one year at a time? – Vijay Ramesh Jan 18 '19 at 19:19
  • Please see above – Vijay Ramesh Jan 18 '19 at 19:20
  • There's probably a way to loop through by year but "easier" depends on your level of coding ability. Since MODIS only spans through 2018 it isn't a ton of work to just do it manually by year. – JepsonNomad Jan 18 '19 at 19:22
  • Sure, that's fair. I am still a beginner, but I am curious to learn if there is a better solution. But shall plog along for now. But, if you do have time, would like to know the other way to go ahead.. – Vijay Ramesh Jan 18 '19 at 19:25
  • 1
    I'm a beginner too - not sure how to automate the annual side of things. Hopefully someone else on this site can help with that. – JepsonNomad Jan 18 '19 at 19:31