I have a code which coverts the MODIS Aqua dataset into monthly means. The code is here.
However, I'm want to do the same for a new data set, the NOAA/CDR/SST_WHOI/V2. However, rather than single daily values, this dataset has values 8 times a day. Is there a way of reducing this so it just collects one image per date, which I can then use the below code on?
var startyear = 2010;
var endyear = 2011;
var startmonth = 1;
var endmonth = 12;
var startdate = ee.Date.fromYMD(startyear, startmonth, 1);
var enddate = ee.Date.fromYMD(endyear , endmonth, 1);
var years = ee.List.sequence(startyear, endyear);
var months = ee.List.sequence(1, 12);
var monthlySST = ee.ImageCollection.fromImages(
years.map(function (y) {
return months.map(function(m) {
var w = UK_SST.filter(ee.Filter.calendarRange(y, y, 'year'))
.filter(ee.Filter.calendarRange(m, m, 'month'))
.mean();
return w.set('year', y)
.set('month', m)
.set('system:time_start', ee.Date.fromYMD(y, m, 1));
});
}).flatten()
);