I'm trying to calculate this formula in GEE:
∑ U(U-5)^2 (u is wind speed greater than 5)
when I use (.add) in my code it just give me a pixels that are greater than 5 in both of them at the same but maybe in first image in one pixel we don't have wind greater than 5 but in other we have, I want one image that have all of them at the same time:
var Windspeed = ee.ImageCollection('NASA/GLDAS/V021/NOAH/G025/T3H')
.filter(ee.Filter.date('2020-01-01'))
.select('Wind_f_inst')
.mean();
var gt = Windspeed.gt(5);
var u = Windspeed.mask(gt);
var Windspeed1 = ee.ImageCollection('NASA/GLDAS/V021/NOAH/G025/T3H')
.filter(ee.Filter.date('2020-01-02'))
.select('Wind_f_inst')
.mean();
var gt1 = Windspeed1.gt(5);
var u1 = Windspeed1.mask(gt1);
var windt = u.add(u1)
var WindVis = {
min: 46.05683272577041,
max: 101.32877871485076,
palette: ['1303ff', '42fff6', 'f3ff40', 'ff5d0f'],
};
Map.centerObject(table);
Map.addLayer(
windt.clip(table), WindVis,
'U2');