# Calculate total burn area using MODIS Burned Area Monthly Global 500m

I want to calculate the total area burnt in a specific region within a year. I am using MCD64A1.061 MODIS Burned Area Monthly Global 500m for this. Since the data is available on a monthly basis, I thought of summing all the images present in a particular year, which will give me the total burn area for that year.

Here's the code that I am using:

``````var clipToCol = function(image){
return image.clip(table);
};

var dataset = ee.ImageCollection('MODIS/061/MCD64A1')
.filter(ee.Filter.date('2012-01-01', '2012-12-31')).map(clipToCol);
var burnedArea = dataset.select('BurnDate').sum().multiply(500*500).divide(1000000);

var burnedAreaVis = {
min: 30.0,
max: 341.0,
palette: ['4e0400', '951003', 'c61503', 'ff1901'],
};

var statistics = burnedArea.reduceRegion({
reducer: ee.Reducer.sum(),
geometry: table,
scale: 500,
maxPixels: 1e9
});
var totalBurnedArea = statistics.get('BurnDate');
print('Total Burned Area (sq. km.):', total burned area);
``````

The value that I am obtaining from this seems a bit high; hence, I am not sure if there is something wrong with the code or if I should take another approach.

Any insights on this would be helpful.

The main problem I see with your approach is that you are summing the actual values of the `'BurnDate'` band, which has values from 1 to 366. Thus, that is probably the reason why you are obtaining very large values. Instead, I think you might be interested in summing the pixel area values. Here are some modifications I would do to the OP to get the desired output.

``````var clipToCol = function(image){
// Get an image where each pixel value represents the area occupied by
//each pixel and mask it with the 'BurnDate' band.
return ee.Image.pixelArea()
.clip(geometry);
};

// Reduce the image collection by pasing the first non null pixel value
// and rename the band
var burnedArea = dataset.reduce(ee.Reducer.firstNonNull())
.rename('BurnDate');

// Get the area value in m2 and convert it to km2
var totalBurnedArea = statistics.getNumber('BurnDate').divide(1000000);
``````
• Thank you @Jonathan V. Solorzano for sharing your insights. After modifying the code I am getting acceptable results.
– gis
Jun 8, 2023 at 9:43