I'm attempting to gap fill 9 datasets on Earth Engine. So far I've been able to reduce the daily dataset to monthly taking help of the site but I'm unable to apply focal mean to fill any possible nodata instances in the pixel values on the resultant collection. Need some help in this regard.
var bess = ee.ImageCollection("SNU/ESL/BESS/Rad/v1"),
aod = ee.ImageCollection("MODIS/006/MCD19A2_GRANULES"),
ndsi = ee.ImageCollection("MODIS/006/MYD10A1"),
ndwi = ee.ImageCollection("MODIS/MYD09GA_006_NDWI"),
evi = ee.ImageCollection("MODIS/061/MYD13A2"),
lst = ee.ImageCollection("MODIS/061/MYD11A1"),
erafi = ee.ImageCollection("ECMWF/ERA5_LAND/HOURLY"),
ele = ee.Image("CGIAR/SRTM90_V4"),
var vari = bess;
// function to generate monthly mean
var monmei = ee.List.sequence(0, 16*12).map(function(n) { // .sequence: number of years from starting year to present
var start = ee.Date('2021-01-01').advance(n, 'month'); // Starting date
var end = start.advance(1, 'month'); // Step by each iteration
return vari
.filterDate(start, end)
.select('RSDN_Daily')
.mean()
.set('system:time_start', start.millis());
});
print(monmei)
var fill = monmei.focal_mean(1, 'square', 'pixels', 20)
var full = fill.blend(monmei)
filvari = full