Script Library
ResearchForestAdvanced
GEDI L4A Above-Ground Biomass × ESA WorldCover
Stratifies GEDI biomass by land-cover class — publication-ready forest carbon stock estimates.
Pipeline (4 steps)
- GEDI L4A monthly biomass, quality_flag = 1
- Average per pixel across the record
- Cross with ESA WorldCover 2021
- Reduce by class → AGBD mean ± sd, total Mg C
Datasets
- gedi-canopy
- esa-worldcover
Simulated previewPaste the script in Earth Engine for live results
Outputs the script produces
map AGBD Mg ha⁻¹
table Class biomass table
chart AGBD histogram
export COG export
var gedi = ee.ImageCollection('LARSE/GEDI/GEDI04_A_002_MONTHLY')
.filterBounds(aoi)
.map(function(i){ return i.updateMask(i.select('l4_quality_flag').eq(1)); })
.select('agbd');
var biomass = gedi.mean().rename('AGBD');
var lc = ee.ImageCollection('ESA/WorldCover/v200').first().select('Map');
Map.centerObject(aoi, 8);
Map.addLayer(biomass, {min: 0, max: 300, palette: ['#fef3c7','#84cc16','#15803d','#064e3b']}, 'AGBD Mg/ha');
var byClass = biomass.addBands(lc.rename('class')).reduceRegion({
reducer: ee.Reducer.mean().combine({reducer2: ee.Reducer.stdDev(), sharedInputs: true}).group(1, 'class'),
geometry: aoi, scale: 100, bestEffort: true, tileScale: 4, maxPixels: 1e13
});
print('AGBD per land class:', byClass);
Export.image.toDrive({image: biomass.clip(aoi), description: 'GEDI_AGBD',
folder: 'gee_exports', region: aoi, scale: 100, maxPixels: 1e13,
fileFormat: 'GeoTIFF', formatOptions: {cloudOptimized: true}});import ee
ee.Initialize()