0

I want to resample the mean of 48 images of GPM with 10000m to MODIS in GEE. My code works perfectly for one image but the result for the mean or median of 48 images (or any number) does not correct.

The code:

var GPM = ee.ImageCollection('NASA/GPM_L3/IMERG_V06').filterDate(startdate, enddate).filterBounds(roi).select('probabilityLiquidPrecipitation').median().clip(roi);
var modis = ee.ImageCollection('MODIS/006/MOD10A1').filterDate(startdate, enddate).filterBounds(roi).first().select('NDSI').clip(roi);
var modisProjection = ee.Image(modis).projection();
var crs=modisProjection.getInfo()['crs'];
// 10,000m GPM resampled to modis 500m
var GPM_500m=GPM.resample('bicubic').reproject({'crs':modisProjection,'scale':500});
Map.addLayer(GPM_500m.clip(roi).select('probabilityLiquidPrecipitation'),{min:50, max:95,palette:palette }, 'Resampeled GPM',true); 

How can I do this?

1 Answer 1

0

I used the following code instead of simple 'mean()':

var stack=GPM.toBands();

var mean_bands = stack.reduce('mean').clip(roi);

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.