I'm using GRIDMET image collection in Google Earth Engine, which has daily climate data from ~1980 to present. I would like to create an image collection of monthly (May-September: each month) sum precipitation for each year (1986-2016). I've been trying to create a function to do so, but can't figure it out.
https://code.earthengine.google.com/ceba35ee52955ec5e174e0293cebb7b8