Extracting XCO2-NASA data with XCODEX: a Python package designed for data extraction and structuration
摘要
Accurately monitoring atmospheric carbon dioxide (XCO2) is fundamental to advancing climate change research. However, the intricate netCDF4 data format used by NASA’s OCO-2 satellite complicates efficient data extraction and organization, limiting researchers’ ability to fully utilize these datasets. To address this challenge, we developed XCODEX, a user-friendly Python package that automates the retrieval and structuring of daily XCO2 measurements from OCO-2 data. XCODEX processes raw files by defining variables, matching dates, and extracting targeted data points for multiple geographic locations, while minimizing missing data through intelligent reprocessing. Validation against ground-based TCCON measurements and Mauna Loa observations demonstrated high accuracy and reliability, with adjusted R2 values above 0.97 and root mean square errors below 1 ppm. Additionally, a regional analysis of XCO2 concentrations was conducted across 10 sites worldwide, including locations in both the Northern Hemisphere and Southern Hemisphere. This analysis revealed significant regional differences with a consistent rising trend of approximately 2.4 ppm per year, aligned with global increases in atmospheric CO2 influenced by natural and anthropogenic factors. By streamlining data handling and providing results in accessible Pandas DataFrame formats, XCODEX empowers researchers to focus on analytical insights rather than data preprocessing challenges. This package represents a valuable tool for global carbon cycle studies and contributes to improved environmental monitoring and climate modeling.