I am trying to get daily estimates for AOD per Census tract in CA from the year 2000-2015. When I run the loop to filter to the daily level. I get the Error: Image.reduceRegions: Unable to find a crs
. I know this is because some of the images do not have bands. (I'm assuming this is from missing data of AOD measurements for that particular day). I'm not sure how to filter out these images within the loop in order to get it to run. Here is a link to my GEE code: https://code.earthengine.google.com/98a73c8ea6e71633c3e14258b39e759d:
var CACensus= ee.FeatureCollection('users/s1mcelroy1287/tl_2010_06_tract10');
var filtAOD01= AOD.filterDate('2001-01-01','2001-12-31');
var filtAOD00=AOD.filterDate('2000-03-01','2000-12-31');
//Creating function to get mean AOD per Census
var calcmeanAOD=function(image){
var AODpercensus=image.reduceRegions(
{
collection:CACensus,
reducer:ee.Reducer.mean(),
scale:1000,
})
return AODpercensus;
};
//Writing loop for daily AOD measurement per Census tract across the CA for 2001
var myList=ee.List([]);
for (var day=1; day<366; day++){
var data=filtAOD01.filter(ee.Filter.calendarRange(day,day,'day_of_year'));
var AOD01 = data.select('Optical_Depth_047').mean();
var AOD01Census=calcmeanAOD(AOD01);
AOD01Census=AOD01Census.set('day_of_year',day);
myList=myList.add(AOD01Census);
var myListFlat=myList.flatten();
var myList01=ee.FeatureCollection(myListFlat);
}
Export.table.toDrive(myList01,'AOD_Zcta_00');