Skip to content

Comparison of greenhouse gas concentration forcings used in CMIP6 vs CMIP7

Notifications You must be signed in to change notification settings

climate-resource/CMIP6-vs-CMIP7-GHG-Concentrations

Repository files navigation

CMIP6 vs. CMIP7 GHG Concentrations

Comparison of GHG concentration forcings used in CMIP6 vs. CMIP7.

Status

  • prototype: the project is just starting up and the code is all prototype

Installation

We do all our environment management using poetry. To get started, you will need to make sure that poetry is installed (instructions here, we found that pipx and pip worked better to install on a Mac).

To create the virtual environment, run

# Tell poetry to put virtual environments in the project
poetry config virtualenvs.in-project true
poetry install --all-extras
poetry run pre-commit install

These steps are also captured in the Makefile so if you want a single command, you can instead simply run make virtual-enviroment.

Having installed your virtual environment, you can now run commands in your virtual environment using

poetry run <command>

For example, to run Python within the virtual environment, run

poetry run python

As another example, to run a notebook server, run

poetry run jupyter notebook

Analysis

The analysis lives in notebooks/. Run the notebooks in order. The notebooks aren't fully coupled (you can run some of the later ones without running all of the early ones). We don't document these dependencies at the moment because:

  1. they're changing over time
  2. the repository is simple, you'll figure it out by exploring

Happy analysis

Development

Install and run instructions are the same as the above (this is a simple repository, without tests etc. so there are no development-only dependencies).

Contributing

This is a very thin repository. There aren't any strict guidelines for contributing, partly because we don't know what we're trying to achieve (we're just exploring). If you would like to contribute, it is best to raise an issue to discuss what you want to do (without a discussion, we can't guarantee that any contribution can actually be used).

Repository structure

The repository is very basic. It imposes no structure on you so you can layout your Python files, notebooks etc. in any way you wish. We do have a basic Makefile which captures key commands in one place (for more thoughts on why this makes sense, see general principles: automation). For an introduction to make, see this introduction from Software Carpentry. Having said this, if you're not interested in make, you can just copy the commands out of the Makefile by hand and you will be 90% as happy for a simple repository like this.

Tools

In this repository, we use the following tools:

  • git for version-control (for more on version control, see general principles: version control)
  • Poetry for environment management (for more on environment management, see general principles: environment management)
    • there are lots of environment management systems. Poetry works and for simple projects like this there is no need to overcomplicate things
    • we track the poetry.lock file so that the environment is completely reproducible on other machines or by other people (e.g. if you want a colleague to take a look at what you've done)
  • pre-commit with some very basic settings to get some easy wins in terms of maintenance, specifically:
    • code formatting with black
    • basic file checks (removing unneeded whitespace, not committing large files etc.)
    • (for more thoughts on the usefulness of pre-commit, see general principles: automation
    • track your notebooks using jupytext (for more thoughts on the usefulness of Jupytext, see tips and tricks: Jupytext)
      • this avoids nasty merge conflicts and incomprehensible diffs

Original template

This project was generated from this template: basic python repository. copier is used to manage and distribute this template.

About

Comparison of greenhouse gas concentration forcings used in CMIP6 vs CMIP7

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published