1

I am trying to extract MERRA2 columnar dust data from Google Earth Engine for a specific range of dates. I have to download it as daily data so I have converted it from hourly to daily. The image's resolution is 69375 meters * 55000 meters (As mentioned in the GEE catalog). However, when I download it through GEE, the resulting image doesn't have the same resolution. Here's my code for exporting the entire images (which I visualized in ArcGIS)

var dust = ee.ImageCollection('NASA/GSFC/MERRA/aer/2')
               .select('DUCMASS')
               // clip to your study area
               .map(function(image) {return image.clip(table)});
              
              
      var startDate = ee.Date('2009-06-18')
      var endDate = ee.Date('2009-06-28')

      var numberOfDays = endDate.difference(startDate, 'days')
      var daily = ee.ImageCollection(
      ee.List.sequence(0, numberOfDays.subtract(1))
      .map(function (dayOffset) {
        var start = startDate.advance(dayOffset, 'days')
        var end = start.advance(1, 'days')
         return dust
         .filterDate(start, end)
        .mean()
        .set('system:time_start', start.millis());
         })
         )
      Map.addLayer(daily.first().select(0), {
    min: 0,
    max: 1,
     palette: ['001137', '01abab', 'e7eb05', '620500'],
      });
   var merged = daily.toBands();
  Export.image.toDrive({ 
   image: merged,
   description: 'dust',
     region: table,
     });

Can anyone suggest how to tackle this issue?

1 Answer 1

1

You only need following lines en your code for exporting entire images with desired resolution:

.
.
.
var scale = dust.first().projection().nominalScale();
.
.
.
      .reproject('EPSG:4326', null, scale)
.
.
.

Complete code looks as follows:

var dust = ee.ImageCollection('NASA/GSFC/MERRA/aer/2')
               .select('DUCMASS')
               // clip to your study area
               .map(function(image) {return image.clip(table)});

var scale = dust.first().projection().nominalScale();

print("scale", scale);

var startDate = ee.Date('2009-06-18');
var endDate = ee.Date('2009-06-28');

var numberOfDays = endDate.difference(startDate, 'days');

var daily = ee.ImageCollection(ee.List.sequence(0, numberOfDays.subtract(1))
  .map(function (dayOffset) {
        var start = startDate.advance(dayOffset, 'days');
        var end = start.advance(1, 'days');
         return dust
         .filterDate(start, end)
         .mean()
         .reproject('EPSG:4326', null, scale)
         .set('system:time_start', start.millis());
        })
      );

scale = daily.first().projection().nominalScale();

print("scale", scale);
      
Map.addLayer(daily.first().select(0), imageVisParam, 'DUCMASS');
Map.centerObject(table, 7);
   
var merged = daily.toBands();

Export.image.toDrive({ 
   image: merged,
   description: 'dust',
   region: table,
});

Before including above lines, composite daily images have a resolution of 111319. However, when above code is running, it can be corroborated in following picture that both resolutions are identical.

enter image description here

By the way, I used an arbitrary table geometry in USA because your table is not available.

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.