As everyone knows GLDAS data in Google Earth Engine has 25 kilometers spatial resolution. Accordingly I called these data in code editor in order to change the pixel size from 25000m to 250m. I tested many resampling techniques but didn't work. Could anyone guide me please?

code link: https://code.earthengine.google.com/0ae03a390790053c17b717f84dc45637


var GLDAS24 = ee.ImageCollection("NASA/GLDAS/V021/NOAH/G025/T3H")

// resampling

var modis = ee.Image(ee.ImageCollection('MODIS/006/MOD13A1').first())
 var modisProjection = modis.projection();

var projection = GLDAS24.setDefaultProjection({
  crs: modisProjection,
  scale: 250


var GLDAS250 = projection
      reducer: ee.Reducer.mean(),
      maxPixels: 1024
      crs: modisProjection

  • 1
    What do you mean by "it didn't work" ? Is it that you don't see anything on the map ? Is the size of the pixels that seems the same ? do you get an error ? Jun 25, 2021 at 10:47

1 Answer 1


ReduceResolution is for aggregating pixels together, and setDefaultProjection only works on things that don't already have a projection (like composites).

You probably want resample(), followed by a reproject().

var result = GLDAS24.resample().reproject(modisProjection.atScale(250))

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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