gdess

gdess: A framework for evaluating simulated atmospheric CO₂ in Earth System Models - Published in JOSS (2022)

https://github.com/e3sm-project/gdess

Science Score: 95.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
    Found 11 DOI reference(s) in README and JOSS metadata
  • Academic publication links
    Links to: joss.theoj.org, zenodo.org
  • Committers with academic emails
    1 of 3 committers (33.3%) from academic institutions
  • Institutional organization owner
  • JOSS paper metadata
    Published in Journal of Open Source Software

Keywords

data-visualization earth-observation earth-system-model model-diagnostics python

Scientific Fields

Mathematics Computer Science - 84% confidence
Artificial Intelligence and Machine Learning Computer Science - 62% confidence
Last synced: 4 months ago · JSON representation

Repository

Tool for evaluating atmospheric carbon dioxide concentrations as simulated by Earth system models

Basic Info
Statistics
  • Stars: 8
  • Watchers: 7
  • Forks: 3
  • Open Issues: 0
  • Releases: 1
Topics
data-visualization earth-observation earth-system-model model-diagnostics python
Created about 5 years ago · Last pushed over 3 years ago
Metadata Files
Readme License

README.md

Greenhouse gas Diagnostics for Earth System Simulations

test status codecov Python 3.8|3.9 DOI DOI

[comment]: <> ([![latest version](https://img.shields.io/badge/Current%20version-0.01a1-brightgreen.svg)](https://github.com/dkauf42/gdess/releases/tag/0.01b1))

Overview

GDESS facilitates comparison of simulated atmospheric CO2 against observational data. Specifically, it selects, loads, and parses the observational datasets and model simulations to be in a consistent structure and generates data visualizations for several diagnostic use cases. Three diagnostic recipes currently implemented examine multidecadal trends, seasonal cycles, and meridional gradients.

Motivation

Model intercomparisons and benchmarking is critical for Earth System Models. By comparing the values of variables, such as CO2, in these simulations against observed values, one can discover the needs and means for refining model components, and learn much about Earth system dynamics in the process.

Development of gdess was initiated by a need to evaluate atmospheric CO2 for the U.S. Department of Energy's Energy Exascale Earth System Model (E3SM) and its campaign focused on simulations of global biogeochemistry.

Problem to solve

Although there are existing diagnostic tools for Earth System Models (e.g. ESMValTool, ILAMB, BGC-val), they do not provide functionality specific for atmospheric CO2 concentrations.

See ./gdess/bin/gdess_cli.py --help for more command-line switches and the documentation for more usage examples.

Contents

Data requirements and availability

Observations - Globalview+ data - For parsing and running demo notebooks, one must first download the Obspack, which is available from the NOAA Global Monitoring Laboratory (GML) here: https://www.esrl.noaa.gov/gmd/ccgg/obspack/data.php - There is a sample file from NOAA GML included in this Git repository to enable the running of test cases.

Model Output - CMIP6 - CMIP6 data do not need to be downloaded before running recipes, as GDESS can use the intake-esm dependency to retrieve CMIP6 data programmatically while running. - It seems that recipes involving CMIP data won't work when on the PNNL VPN (presumably because the VPN blocks retrieval of the CMIP data catalog using a web URL, which is initiated by the intake package).

Model Output - E3SM - E3SM outputs do not need to be available to run recipes that compare Globalview+ and CMIP6 data. - For parsing and running recipes from E3SM Collection, one must have access to model output history as NetCDF file(s), and a script for post-processing E3SM output is provided in gdess/bin/.

Getting started

Installation

👥 Clone this repository to the location of your choice. shell script git clone https://github.com/E3SM-Project/gdess.git ~/gdess cd ~/gdess

🌍 Using conda, create a runtime or development environment and install dependencies. Note: Replace “myenv” with the preferred name of your environment, e.g. "gdess_env". From here on we’ll use “myenv” to refer to our environment.

shell script conda create -n myenv python=3.8 conda activate myenv conda config --add channels conda-forge conda install --file requirements.txt

💾 Install the package: shell script pip install .

(Optional) Retrieve the example data files used for running tests: shell git lfs install git lfs pull

Configuration

Instead of passing data filepaths to the recipe functions each time, you can define environment variables for the directory containing Globalview+ Obspack and CMIP model output.

On a Mac/Linux OS:
  • Specify the path to the repo on the first line of gdess/bin/set_path_vars.sh. For instance, by executing: export GDESS_REPO=${HOME}/gdess
  • Set paths to the test data by running the script at the command line: shell source ./gdess/bin/set_path_vars.sh
  • To use stored data other than the test data, modify the other data paths in the scripts. For example, to set the paths for every future terminal instance (and if you are running in a bash environment), set these paths in your ~/.bash_profile: bash export GDESS_CMIP_DATA=Path/to/Model/Output/NetCDF/Files export GDESS_GLOBALVIEW_DATA=Path/to/Obspack/NetCDF/Files
On a Windows OS:
  • Follow the instructions provided in ./gdess/bin/set_path_vars.bat

[comment]: <> (These variables are retrieved in the gdess/config/defaults.ini file.)

Example

  • The following steps generate this figure: components
  1. Install the gdess package according to the installation instructions
  2. Follow the configuration instructions to use the included example data files
  3. ./gdess/bin/gdess_cli.py --verbose seasonal --start_yr 1980 --end_yr 2015 --model_name BCC.esm-hist --cmip_load_method local --station_list smo
  • Other examples are given in the provided jupyter notebooks, which show recipe usage (trends_recipe.ipynb, seasonal_cycle_recipe.ipynb, and meridional_recipe.ipynb). To run them:
    1. Enable your conda environment via: python -m ipykernel install --user --name=myenv
    2. Start jupyter by entering: jupyter notebook
    3. Navigate within jupyter to gdess/notebooks/demo/

Usage description

Diagnostic recipes can be run from the command line or from within a Python kernel:

Command line - Use gdess/bin/gdess_cli.py followed by the recipe name and then recipe options. To see available commands, run, e.g. gdess/bin/gdess_cli.py --help or gdess/bin/gdess_cli.py seasonal --help
- To specify options from a file [recommended for repeated tests], use the @ symbol prefix for the filename. For example, using the provided file: gdess/bin/gdess_cli.py @recipe_options_example.txt

In a Python kernel - The diagnostic recipes can be called directly, with options passed as a Python dict object. - Check out the demonstration notebooks in gdess/notebooks/demo/. The notebooks show recipe usage.

Updating

To use the latest version of this repository: - Enter the gdess/ directory - Activate your desired environment - Run the commands:

git pull git checkout main pip install . --upgrade

Uninstalling

🚮 To remove this package from your environment:

pip uninstall gdess

Contributing

If you're interested in participating in the development of gdess, want to suggest features or report bugs, please leave us a message through the issue tracker.

Note that most work is done in the 'develop' branch, so please git checkout develop (or you can create a new branch) before modifying code.

Running the code tests

To run the built-in tests: shell pytest

Project structure

Components

components

Directory Tree

gdess │ ├── README.md <- Top-level README for users/developers of this project ├── requirements.txt <- Package dependencies ├── recipe_options_example.txt │ ├── notebooks <- Example jupyter notebooks to see diagnostic capabilities of gdess │ └──demo/ │ ├── gdess <- *Python package* for handling co2 diagnostics │ │ │ ├── bin │ │ ├── gdess_cli.py <- Run recipes from the command line │ │ ├── set_path_vars.sh <- Script to set up data file paths for running examples │ │ └── concat_and_remap_E3SM_co2.sh <- Script template for post-processing of E3SM output │ │ │ ├── recipes <- Generate repeatable diagnostics that span multiple data sources available as recipes │ │ ├── surface_trends.py │ │ ├── seasonal_cycles.py │ │ ├── meridional_gradient.py │ │ ├── recipe_utils.py │ │ └── ... │ │ │ ├── data_source <- Load, parse, and manipulate data from a particular source │ │ ├── models/ │ │ ├── observations/ │ │ ├── multiset.py │ │ └── ... │ │ │ ├── operations <- Manipulate datasets (e.g. spatially or temporally) │ │ ├── Confrontation.py │ │ ├── geographic.py │ │ ├── time.py │ │ ├── convert.py │ │ ├── datasetdict.py │ │ └── ... │ │ │ ├── formatters <- Manipulate formatting in desired ways │ │ ├── args.py │ │ ├── nums.py │ │ ├── strings.py │ │ └── ... │ │ │ ├── graphics <- Make repeated graphic actions available │ │ ├── comparison_plots.py │ │ ├── single_source_plots.py │ │ ├── utils.py │ │ └── ... │ │ │ ├── config <- Configuration options │ │ ├── defaults.ini │ │ ├── stations_dict.json │ │ └── log_config.json │ │ │ └── recipe_parsers.py │ ├── tests <- Unit and integration tests for development │ └── ... ├── ccgcrv <- Curve fitting code from NOAA GML (see credits in the README) │ └── ... ├── ci <- Environment specification for continuous integration │ └── ... ├── paper <- Manuscript for the Journal of Open Source Software (JOSS) │ └── ... │ ├── LICENSE ├── MANIFEST.in ├── setup.cfg └── setup.py

Credits

Dependencies

The full list of dependencies is in the requirements.txt file.

Additional acknowledgements

  • Although not a dependency, ideas were also drawn from xclim: Climate indices computations.
  • ccgcrv: The curve fitting code in the ccgcrv directory has been mildly modified — modified for improved code integration, i.e. the computational logic has not been changed — from the code made freely available by the NOAA Global Monitoring Laboratory. From their website, one can access the source code and read a description of its usage. Additional details regarding the curve fitting approach can be found in the following publications:

    • Thoning, K.W., P.P. Tans, and W.D. Komhyr, 1989, Atmospheric carbon dioxide at Mauna Loa Observatory, 2. Analysis of the NOAA/GMCC data, 1974 1985., J. Geophys. Res. ,94, 8549 8565. https://doi.org/10.1029/JD094iD06p08549
    • Sweeney, C., Karion, A., Wolter, S., Newberger, T., Guenther, D., Higgs, J.A., Andrews, A.E., Lang, P.M., Neff, D., Dlugokencky, E., Miller, J.B., Montzka, S.A., Miller, B.R., Masarie, K.A., Biraud, S.C., Novelli, P.C., Crotwell, M., Crotwell, A.M., Thoning, K., Tans, P.P., 2015. Seasonal climatology of CO 2 across North America from aircraft measurements in the NOAA/ESRL Global Greenhouse Gas Reference Network. J. Geophys. Res. Atmos. 120, 5155–5190. https://doi.org/10.1002/2014JD022591
  • The Mauna Loa (MLO), American Samoa (SMO), South Pole (SPO), and Barrow Observatory (BRW) dataset files used in the tests directory was provided via the Obspack (GLOBALVIEWplusv6.02020-09-11) by: C. D. Keeling, S. C. Piper, R. B. Bacastow, M. Wahlen, T. P. Whorf, M. Heimann, and H. A. Meijer, Exchanges of atmospheric CO2 and 13CO2 with the terrestrial biosphere and oceans from 1978 to 2000. I. Global aspects, SIO Reference Series, No. 01-06, Scripps Institution of Oceanography, San Diego, 88 pages, 2001.

Funding:

  • This work is made possible by the Pacific Northwest National Laboratory.
  • Data were obtained from the Energy Exascale Earth System Model project, sponsored by the U.S.Department of Energy, Office of Science, Office of Biological and Environmental Research.

Disclaimer

This is a work in progress. Bugs are expected.

Owner

  • Name: Energy Exascale Earth System Model Project
  • Login: E3SM-Project
  • Kind: organization

Repositories associated with the E3SM Project

JOSS Publication

gdess: A framework for evaluating simulated atmospheric CO₂ in Earth System Models
Published
August 28, 2022
Volume 7, Issue 76, Page 4326
Authors
Daniel E. Kaufman ORCID
Joint Global Change Research Institute, Pacific Northwest National Laboratory, College Park, MD, USA
Sha Feng ORCID
Atmospheric Sciences and Global Change Division, Pacific Northwest National Laboratory, Richland, WA, USA
Katherine V. Calvin ORCID
Joint Global Change Research Institute, Pacific Northwest National Laboratory, College Park, MD, USA
Bryce E. Harrop ORCID
Atmospheric Sciences and Global Change Division, Pacific Northwest National Laboratory, Richland, WA, USA
Susannah M. Burrows ORCID
Atmospheric Sciences and Global Change Division, Pacific Northwest National Laboratory, Richland, WA, USA
Editor
David Hagan ORCID
Tags
Earth system model atmospheric carbon dioxide model evaluation diagnostics

GitHub Events

Total
Last Year

Committers

Last synced: 5 months ago

All Time
  • Total Commits: 700
  • Total Committers: 3
  • Avg Commits per committer: 233.333
  • Development Distribution Score (DDS): 0.003
Past Year
  • Commits: 0
  • Committers: 0
  • Avg Commits per committer: 0.0
  • Development Distribution Score (DDS): 0.0
Top Committers
Name Email Commits
kauf418 d****2@g****m 698
dkauf42 k****8@c****v 1
Sylwester Arabas s****s@u****l 1
Committer Domains (Top 20 + Academic)

Issues and Pull Requests

Last synced: 4 months ago

All Time
  • Total issues: 4
  • Total pull requests: 9
  • Average time to close issues: 3 days
  • Average time to close pull requests: 1 day
  • Total issue authors: 2
  • Total pull request authors: 2
  • Average comments per issue: 2.5
  • Average comments per pull request: 0.44
  • Merged pull requests: 9
  • Bot issues: 0
  • Bot pull requests: 0
Past Year
  • Issues: 0
  • Pull requests: 0
  • Average time to close issues: N/A
  • Average time to close pull requests: N/A
  • Issue authors: 0
  • Pull request authors: 0
  • Average comments per issue: 0
  • Average comments per pull request: 0
  • Merged pull requests: 0
  • Bot issues: 0
  • Bot pull requests: 0
Top Authors
Issue Authors
  • bpbond (3)
  • simonom (1)
Pull Request Authors
  • dkauf42 (8)
  • slayoo (1)
Top Labels
Issue Labels
Pull Request Labels

Packages

  • Total packages: 1
  • Total downloads: unknown
  • Total dependent packages: 0
  • Total dependent repositories: 0
  • Total versions: 1
  • Total maintainers: 1
pypi.org: gdess

Comparison of simulated atmospheric CO2 against observational data

  • Versions: 1
  • Dependent Packages: 0
  • Dependent Repositories: 0
  • Downloads: 0
Rankings
Dependent packages count: 4.8%
Dependent repos count: 6.3%
Forks count: 15.8%
Average: 19.8%
Stargazers count: 20.5%
Downloads: 51.4%
Maintainers (1)
Last synced: 4 months ago

Dependencies

requirements.txt pypi
  • adjustText *
  • cartopy *
  • cftime *
  • dask *
  • datacompy *
  • gcsfs *
  • git-lfs *
  • intake *
  • intake-esm *
  • jupyter *
  • matplotlib *
  • numpy *
  • pandas *
  • pytest *
  • scikit-learn *
  • setuptools *
  • tqdm *
  • xarray *
.github/workflows/lint_and_test.yml actions
  • EndBug/add-and-commit v9 composite
  • actions/cache v1 composite
  • actions/checkout v2 composite
  • codecov/codecov-action v1 composite
  • conda-incubator/setup-miniconda v2 composite
  • mxschmitt/action-tmate v3 composite
setup.py pypi
ci/environment.yml conda
  • adjusttext >=0.7.3
  • cartopy >=0.18
  • cftime >=1.4
  • dask >=2021
  • datacompy >=0.7.2
  • gcsfs >=0.8
  • intake >=0.6
  • intake-esm >=2021
  • matplotlib >=3.3
  • numpy >=1.20
  • pandas >=1.1
  • pillow
  • python >=3.7
  • scipy >=1.5
  • xarray >=0.17