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

  • This code cannot be run by other users because your region of interest "WG" is stored on your personal account. – JepsonNomad Jan 16 at 21:19
  • @JepsonNomad That has been edited. Created a polygon to run it on. – Vijay Ramesh Jan 16 at 21:30
  • Looks like this is a duplicate question. See gis.stackexchange.com/q/258344/67264 for more details on the solution to your problem. – JepsonNomad Jan 16 at 21:54
  • @JepsonNomad I tried the solution in the other page, but I am still not getting an answer. – Vijay Ramesh Jan 17 at 18:53
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

  • 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 at 19:19
  • Please see above – Vijay Ramesh Jan 18 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 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 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 at 19:31

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.