I want to compute daily surface temperature over district level of india for last 5 year. but for this large feature collection it is not possible to compute it in one csv. because it sown an error as "User memory limit exceed" . So i am computing this one by one for each state and a single year...and this process took so much time...as there are 37 state an ut....SO is there any way to compute it once for all....here is my code sample.
var filter = table.filter(ee.Filter.eq("State_Name", 'ARUNACHAL PRADESH'))
var collection = ee.ImageCollection("ECMWF/ERA5_LAND/HOURLY")
.filterDate(startDate, endDate)
.filterBounds(filter)
.select('skin_temperature');
//Map.addLayer(collection,{},'collection')
var numberOfDays1 = endDate.difference(startDate, 'days');
var daily1 = ee.ImageCollection(
ee.List.sequence(0, numberOfDays1.subtract(1))
.map(function (dayOffset) {
var start = startDate.advance(dayOffset, 'days');
var end = start.advance(1, 'days');
return collection
.filterDate(start, end)
.mean()
.set('system:time_start', start.millis());
})
);
function maskimg(img){
return img.clip(filter)
.subtract(273.15)
.copyProperties(img, img.propertyNames());
}
var temp = ee.ImageCollection(daily1)
.filter(ee.Filter.date(startDate, endDate))
.select('skin_temperature').filterBounds(filter).map(maskimg);
//print ("skin_temperature", temp);
var bands = temp.toBands();
var zonal = bands.reduceRegions({
collection: filter,
reducer: ee.Reducer.mean(),
scale: 11132,
// tileScale: 8,
});
//Map.addLayer(temp,{},'temp')
Export.table.toDrive({
description:'ARUNACHAL_PRADESH',
collection: zonal,
folder : 'TEMP_DAILY_2022',
fileFormat: 'CSV',
fileName: 'ARUNACHAL_PRADESH'
});
i tried to do it one by one...changing the state name from feature collection....I just want to know that is there any way to do this process in a short way... like...looping the feature collection for each state and export csv for all state one by all.