Global Rate of change of CO2 from Space-based Observations
Figure: Annual CO2 growth rates from OCO-2 satellite observations (blue) compared to NOAA ground-based measurements (red).
A Python package for calculating annual CO2 growth rates from OCO-2 satellite observations using the MIPV11 format and comparing with NOAA reference data.
This project analyzes OCO-2 satellite data to compute global annual CO2 growth rates and validates results against NOAA ground-based measurements. The analysis uses 10-second resolution OCO-2 data to calculate spatially-weighted global averages and apply seasonal detrending to isolate long-term trends.
- Python 3.7+
- Required packages:
numpy,pandas,xarray,matplotlib,scipy,python-dateutil
# Clone or download the project files
cd /path/to/project/
# Install dependencies (if not already available)
pip install numpy pandas xarray matplotlib scipy python-dateutil# Basic analysis with default settings (MIPV11 format)
python greso_analysis.py
# Analyze specific data type (OG, LNLG, or all)
python greso_analysis.py --data-type LNLGThe analysis supports two OCO-2 data formats:
-
MIPV11 Format (Default): Recommended format with improved calibration
- Uses
xco2_2019_scalevariable - NetCDF4 format (
.nc4files) - Download from: https://gml.noaa.gov/ccgg/OCO2_v11mip/download.php
- Direct file download: https://gml.noaa.gov/aftp/user/andy/OCO-2/OCO2_b11.2_10sec_GOOD_r2.nc4
- Uses
-
Legacy Standard Format: Original format for backward compatibility
- Uses
xco2variable - HDF5 format (
.h5files)
- Uses
# Example: Using MIPV11 format (default)
from greso_analysis import AnalysisConfig, CO2GrowthRateAnalyzer
config = AnalysisConfig()
config.data_file = "/path/to/OCO2_b11.2_10sec_GOOD_r3.nc4"
# file_format is "mipv11" by default
analyzer = CO2GrowthRateAnalyzer(config)
results = analyzer.process_oco_data(["all"])
# Example: Using legacy standard format
from greso_analysis import create_standard_config
config = create_standard_config("/path/to/OCO2_b11.2-lite_10sec_GOOD_140906-250430.h5")
analyzer = CO2GrowthRateAnalyzer(config)
results = analyzer.process_oco_data(["all"])OCO-2 Satellite Data (MIPV11 Format - Default):
- Recommended: MIPV11 format files (e.g.,
OCO2_b11.2_10sec_GOOD_r3.nc4) - Download: https://gml.noaa.gov/ccgg/OCO2_v11mip/download.php
- Format: NetCDF4 with 10-second resolution OCO-2 observations
- Variable: Uses
xco2_2019_scalefor improved calibration
Legacy Standard Format (Optional):
- File:
OCO2_b11.2-lite_10sec_GOOD_140906-250430.h5 - Format: HDF5 with 10-second resolution OCO-2 observations
- Variable: Uses
xco2
NOAA Reference Data:
- Source:
ftp://aftp.cmdl.noaa.gov/products/trends/co2/co2_gr_gl.txt - Global CO2 growth rates from ground-based measurements
- Automatically downloaded during analysis
The OCO-2 data should contain:
sounding_id: Unique identifier with embedded timestampxco2: Column-averaged CO2 concentration (ppm)xco2_uncertainty: Measurement uncertaintylatitude,longitude: Geographic coordinatesdata_type: Quality flags (6=OG, <3=LNLG)- Additional variables for filtering and analysis
Modify analysis parameters in the AnalysisConfig dataclass:
config = AnalysisConfig(
data_file="/path/to/your_data.nc4", # Path to your OCO-2 data file
lat_range=[-50, 50], # Latitude bounds for analysis
uncertainty_threshold=2.0, # Maximum allowed uncertainty
output_filename="annual_growth_rate.png" # Name for the output plot
)- OCODataProcessor: Handles data loading and preprocessing
- CO2GrowthRateAnalyzer: Performs growth rate calculations
- VisualizationManager: Creates plots and visualizations
annual_growth_rate.png: Plot showing annual growth rates- Console output: Tabular display of annual growth rates
- Log file: Detailed processing information
- Quality Filtering: Apply uncertainty and data type filters
- Spatial Filtering: Restrict to tropical/subtropical latitudes ([-50°, 50°])
- Temporal Processing: Convert sounding IDs to datetime objects
- Spatial Weighting: Area-weighted averaging by latitude
- Seasonal Detrending: Remove seasonal cycles using harmonic analysis
- Growth Rate Calculation: Compute annual growth rates from detrended data
- Spatial Coverage: Global analysis with tropical focus
- Temporal Resolution: 10-second observations aggregated to monthly means
- Detrending Method: Harmonic analysis to remove seasonal cycles
- Growth Rate Calculation: Annual differences in deseasonalized CO2
- Validation: Direct comparison with NOAA global mean growth rates
The analysis generates a plot comparing OCO-2 derived annual CO2 growth rates with NOAA reference data (shown at the top of this README).
============================================================
ANNUAL GROWTH RATES - ALL DATA
============================================================
Year | Growth Rate (ppm/yr) | NOAA Growth Rate (ppm/yr)
------------------------------------------------------------
2015 | 2.9885 | 2.9500
2016 | 2.7095 | 2.8400
2017 | 2.0508 | 2.1400
2018 | 2.4630 | 2.3900
2019 | 2.7487 | 2.5000
2020 | 2.3091 | 2.3300
2021 | 2.2961 | 2.3700
2022 | 1.9195 | 2.2900
2023 | 3.0562 | 2.7300
2024 | 3.2199 | 3.7300
------------------------------------------------------------
MEAN | 2.5046 | 2.5044
============================================================
- OCO-2 Mean Growth Rate: 2.5050 ppm/yr
- NOAA Mean Growth Rate: 2.5044 ppm/yr
- Difference: 0.0006 ppm/yr (excellent agreement)
greso_analysis.py # Main analysis script
utils.py # Utility functions and classes
README.md # This documentation file
annual_growth_rate.png # Generated plot
The codebase follows object-oriented design principles:
- AnalysisConfig: Configuration management
- OCODataProcessor: Data loading and preprocessing
- CO2GrowthRateAnalyzer: Core analysis logic
- VisualizationManager: Plotting and visualization
get_10Sec_data_baker(): Load and filter OCO-2 MIPV11 dataCO2GR: Main analysis class with binning and regional analysisdeseasonalize(): Remove seasonal cyclesmonthlyGrowthRate(): Calculate monthly growth ratesareaWeighted(): Spatial averaging with latitude weights
- File Not Found: Ensure OCO-2 data file is in correct location
- Memory Issues: Reduce dataset size or increase system memory
- Network Issues: NOAA data download may fail - retry or use cached data
- "No valid observations": Check data file path and quality filters
- "Interpolation failed": Reduce spatial/temporal filtering
- "Memory error": Process data in smaller chunks
- Validate results against known benchmarks
- Test with different data types (OG, LNLG, all)
- Verify spatial and temporal filtering
- Check edge cases (empty datasets, missing data)
This project is provided as-is for scientific research purposes. Please cite appropriately when using this code or results.
Primary Publication: Pandey, S., et al. (2024). Toward low-latency estimation of atmospheric CO₂ growth rates using satellite observations: Evaluating sampling errors of satellite and in situ observing approaches. AGU Advances, 5, e2023AV001145. https://agupubs.onlinelibrary.wiley.com/doi/full/10.1029/2023AV001145
- OCO-2 Science Team for satellite data
- NOAA Global Monitoring Laboratory for reference data
- NASA/JPL for mission support and data access
Primary Developer: Sudhanshu Pandey
Affiliation: NASA Jet Propulsion Laboratory / California Institute of Technology
Contact: [email protected]
Project: GRESO (Global Rate Estimates from Satellite Observations)
Development Date: August 2025
Please cite the primary publication above when using this code or results in publications:
Citation Format:
Pandey, S., Miller, J.B., Basu, S., Liu, J., Weir, B., Byrne, B., Chevallier, F., Bowman, K.W., Liu, Z., Deng, F. and O’dell, C.W., 2024. Toward low‐latency estimation of atmospheric CO2 growth rates using satellite observations: Evaluating sampling errors of satellite and in situ observing approaches. *AGU Advances*, 5, e2023AV001145. https://doi.org/10.1029/2023AV001145
