Skip to article frontmatterSkip to article content
Site not loading correctly?

This may be due to an incorrect BASE_URL configuration. See the MyST Documentation for reference.

Re-predict GEDI L4A AGBD from stored xvar using the revised R003 EBT_SA model

This notebook applies the revised R003 'EBT_SA' biomass model to a Version 3 (V003) GEDI L4A granule for South American (SA) forest strata, without re-deriving the model’s predictors (relative height, RH) from the Level L2A GEDI product.

There are two prediction strata that use the 'EBT_SA' model: 'EBT_SA' and 'DBT_SA'. The code below finds this from the granule’s own ANCILLARY/model_data (looking for model_name == 'EBT_SA') rather than hardcoding the pair.

Each GEDI shot already stores its fully-built (offset-applied, transformed) predictor design matrix in the xvar dataset, and the model actually applied when the granule was produced is recorded per prediction stratum in ANCILLARY/model_data. There is no need to go back to the L2A product for re-deriving the RH metrics and re-predicting AGBD with new model coefficients is just the following steps:

  1. Find all footprints where predict_stratum was 'EBT_SA' or 'DBT_SA' when the granule was produced.

  2. Confirm the predictor definition (rh_index, predictor_id, x_transform) for that stratum still matches the revised model — this is what makes reusing xvar valid instead of a coincidence.

  3. Re-apply agbd_t = [1, xvar] @ par_new, back-transform, and re-apply the bias correction.

Prerequisites

  • Granule file: this notebook expects the L4A .h5 granule in the same directory (see GRANULE_FILE below). Adjust the path if yours lives elsewhere.

  • Packages: h5py, numpy, matplotlib.

Read the granule and re-predict AGBD per beam

Only xvar, predict_stratum, agbd (old estimate), l4a_quality_flag_rel3, lat_lowestmode/lon_lowestmode, and ANCILLARY/model_data are needed.

Finding strata routed through the 'EBT_SA' model:
Granule: GEDI04_A_2022314110220_O22155_04_T02087_02_004_01_V003.h5
Bounding box: lon [-80.99, -51.52], lat [-34.14, 0.28]  (South America)
Total shots: 681626
Strata updated: ['DBT_SA', 'EBT_SA']

Effect of the revised estimators, by prediction stratum

Restricted to l4a_quality_flag_rel3 == 1 shots.

Quality shots: 13035 / 681626

stratum           n  mean_before   mean_after   mean_delta
DBT_SA          780         7.43         1.67       -5.758
EBT_SA        12255        82.75        74.35       -8.395

Overall mean AGBD before: 78.24 Mg/ha
Overall mean AGBD after:  70.00 Mg/ha

Distribution of the per-shot change

The histogram shows the per-shot AGBD change (after - before). The dashed line marks the mean. A distribution sitting mostly left of zero confirms the revision reduces biomass estimates across the quality-flagged shots, not just on average.

<Figure size 650x450 with 1 Axes>

Where in the distribution is the change?

The Q-Q plot compares the before/after AGBD distributions percentile-by-percentile against the 1:1 line. Points falling below the line mean the revised estimate is lower at that percentile; the growing gap toward the high end shows the reduction is largest for the highest-biomass shots.

<Figure size 550x550 with 1 Axes>