Machine Learning-Based Prediction of Ecosystem-Scale CO2 Flux Measurements

Jeffrey Uyekawa, John Leland, Darby D. Bergl, Yujie Liu, Andrew D. Richardson, Benjamín LucasLand 2025 · DOI

TL;DR

This paper demonstrates that machine learning, specifically Extreme Gradient Boosting (XGBoost), can accurately predict ecosystem-scale CO2 flux using environmental and site-specific data. This approach offers a robust method for filling gaps in existing flux data and potentially predicting fluxes at new sites, which is crucial for carbon accounting and natural climate solutions.

What Problem Does This Paper Address?

Ecosystems play a vital role in regulating atmospheric CO2 levels, and accurately measuring this exchange (CO2 flux) is essential for understanding climate change and developing mitigation strategies like Natural Climate Solutions (NCS). The primary source of such data is the AmeriFlux network, which comprises hundreds of tower-based measurement sites. However, this network faces significant challenges: frequent instrument downtime, data inconsistencies across sites due to varying measurement protocols, and a lack of standardization. These issues compromise the reliability and comparability of the data, making it difficult to accurately quantify carbon budgets on regional and continental scales. Existing process-based models often struggle with parameterization and exhibit significant errors, while previous machine learning upscaling efforts have primarily relied on remotely sensed data, neglecting valuable site-specific information. This paper aims to develop a consistent, robust, and explainable machine learning model to predict CO2 flux, addressing these data gaps and inconsistencies.

Methods

The researchers compared seven machine learning algorithms: Linear Regression, Stepwise Linear Regression, Decision Tree, Random Forest, Extreme Gradient Boosting (XGBoost), a single-layer Neural Network, and a Deep Neural Network. They employed two cross-validation strategies:

  1. 10-fold Cross-Validation: The data was randomly split into 10 folds. The model was trained on 9 folds and tested on the remaining fold, a process repeated 10 times to average performance. This assesses generalizability across different data subsets.
  2. Leave-One-Site-Out (L1SO) Cross-Validation: The data was partitioned by site, with the model trained on all but one site and then tested on the held-out site. This was repeated for each site, simulating a scenario where a site has no prior data and is crucial for evaluating the model's ability to predict fluxes at entirely new or unmonitored locations.

Performance was evaluated using Root Mean Squared Error (RMSE) and the Coefficient of Determination (R²). Feature importance analysis was conducted using XGBoost to identify key predictors.

Datasets

The study utilized data from the National Ecological Observatory Network (NEON) core terrestrial sites, which are part of the AmeriFlux archive. These sites offer standardized measurements across 44 locations, representing 19 out of 20 ecological domains across the continental United States and Puerto Rico. The environmental drivers (feature variables) used for model training were sourced from:

  • AmeriFlux/NEON: Site-specific measurements including time of day, soil temperature, photosynthetic photon flux density (PPFD), air temperature, vapor pressure deficit, soil water content, net radiation, friction velocity, and various soil properties.
  • Phenocam Network: Vegetation greenness indicators like Green Chromatic Coordinate (GCC) and Red Chromatic Coordinate (RCC).
  • MODIS Satellite Imagery: Vegetation indices such as Normalized Difference Vegetation Index (NDVI) and Enhanced Vegetation Index (EVI).

The preprocessed dataset, consisting of 961,340 observations, has been made publicly available.

Key Insights and Ideas

  • XGBoost Dominance: Extreme Gradient Boosting (XGBoost) consistently outperformed other algorithms in both 10-fold and L1SO cross-validation, highlighting its effectiveness in capturing complex, non-linear relationships in ecological data.
  • Site-Specific Data is Crucial: While remotely sensed data like EVI and NDVI were important, site-level characteristics, particularly vegetation type and soil properties, were identified as highly influential predictors. This underscores the value of in-situ measurements for accurate flux prediction.
  • Generalization Challenges: The model performed best on sites with ecological similarities to those in the training set. However, performance degraded significantly for unique ecosystems or those in vastly different climates (e.g., Puerto Rico), indicating a need for more diverse training data or domain adaptation techniques for such regions.
  • Annual Carbon Balance Prediction: The L1SO analysis showed promising results for predicting the multi-year mean carbon balance, with 66% of sites falling within a ±50 gCm⁻²y⁻¹ error margin, a significant achievement for carbon accounting.
  • Process-Based Models vs. ML: The study suggests that machine learning models can offer more skillful predictions than traditional process-based models, especially for longer time scales, which have historically been a challenge for the latter.

Key Results

  • 10-Fold Cross-Validation: XGBoost achieved the lowest RMSE of 1.81 µmolm⁻²s⁻¹ and an R² of 0.86, outperforming other models, including deep neural networks.
  • L1SO Cross-Validation: XGBoost maintained superiority with a mean prediction RMSE of 2.45 µmolm⁻²s⁻¹. This error increased by 35% compared to the 10-fold CV, demonstrating the benefit of having site-specific data in the training set.
  • Site-Specific Performance Variation: RMSE varied significantly across sites in L1SO, from 0.66 µmolm⁻²s⁻¹ to 6.22 µmolm⁻²s⁻¹. Sites with similar vegetation types (e.g., Tundra) and smaller flux magnitudes generally showed better performance.
  • Annual Carbon Balance: For 29 out of 44 sites (66%), the L1SO-predicted multi-year mean carbon balance was within ±50 gCm⁻²y⁻¹ of the true value.
  • Feature Importance: The top two most important features for XGBoost were EVI and net radiation, followed by vegetation type and other environmental variables.

Limitations and Future Work

  • Data Quantity and Diversity: The model's performance is inherently limited by the quality and quantity of the training data. Unique ecosystems and regions with less data (e.g., Washington, Puerto Rico) showed poorer prediction accuracy. Future work should focus on acquiring more data from underrepresented regions and potentially employing domain adaptation techniques.
  • Site-Level Standardization: While NEON sites offer better standardization, the broader AmeriFlux network suffers from inconsistencies. Future research could explore data fusion techniques to leverage the abundance of less standardized AmeriFlux data with remotely sensed products.
  • Systematic Errors: While the model minimizes prediction error, there's a tendency to be conservative, predicting values closer to zero, which can lead to systematic errors, particularly in capturing extreme flux events. Future models could incorporate optimization criteria that specifically target and reduce systematic bias over longer time scales.
  • Broader CO2 Sources/Sinks: The current model focuses on site-level flux. Future work could expand to integrate other CO2 sources and sinks (e.g., power generation, land-use change) and explore ensemble approaches with dynamic global vegetation models.

Summary updated

Abstract

AmeriFlux is a network of hundreds of sites across the contiguous United States providing tower-based ecosystem-scale carbon dioxide flux measurements at 30 min temporal resolution. While geographically wide-ranging, over its existence the network has suffered from multiple issues including towers regularly ceasing operation for extended periods and a lack of standardization of measurements between sites. In this study, we use machine learning algorithms to predict CO2 flux measurements at NEON sites (a subset of Ameriflux sites), creating a model to gap-fill measurements when sites are down or replace measurements when they are incorrect. Machine learning algorithms also have the ability to generalize to new sites, potentially even those without a flux tower. We compared the performance of seven machine learning algorithms using 35 environmental drivers and site-specific variables as predictors. We found that Extreme Gradient Boosting (XGBoost) consistently produced the most accurate predictions (Root Mean Squared Error of 1.81 μmolm−2s−1, R2 of 0.86). The model showed excellent performance testing on sites that are ecologically similar to other sites (the Mid Atlantic, New England, and the Rocky Mountains), but poorer performance at sites with fewer ecological similarities to other sites in the data (Pacific Northwest, Florida, and Puerto Rico). The results show strong potential for machine learning-based models to make more skillful predictions than state-of-the-art process-based models, being able to estimate the multi-year mean carbon balance to within an error ±50 gCm−2y−1 for 29 of our 44 test sites. These results have significant implications for being able to accurately predict the carbon flux or gap-fill an extended outage at any AmeriFlux site, and for being able to quantify carbon flux in support of natural climate solutions.
BibTeX
@inproceedings{uyekawa2025machine,
  author = {Jeffrey Uyekawa and John Leland and Darby D. Bergl and Yujie Liu and Andrew D. Richardson and Benjamín Lucas},
  title = {{Machine Learning-Based Prediction of Ecosystem-Scale CO2 Flux Measurements}},
  booktitle = {Land},
  year = {2025},
  doi = {10.3390/land14010124},
}
Figure