Computation code for fair national emissions allocations under various global conditions (imagepbl/EffortSharing: Version 1.0.0)
Creators
Description
Introduction
This code combines a variety of data sources to compute fair national emissions allocations, studies variability in these allocations and compares them with NDC estimates and cost-optimal scenario projections. We plan to make the code more accessible in terms of commenting and cleaning up old code over time. The output data of this code is publicly available on Zenodo (10.5281/zenodo.12188104).
Code structure
The main notebook you will be using is Main.ipynb
in the main directory. Each cell in that notebook loads in a particular class and then goes through all of its methods.
- The first one being called is the class in the file
class_datareading.py
. This class gathers all data from external sources, such as population, GDP, historical emissions, etc. on a country level, but also computes global pathways into the future. It does not do any effort sharing. The output is a file calledxr_dataread.nc
, which is your friend in case you need any country-specific data for debugging, for example. The main uncertainties / work from our side is around generating those future pathways under various circumstances (peak temperature, risk, non-CO2 assumptions, etc.). - The second class being called is the one from
class_allocation.py
. That one does all the effort-sharing. It loads inxr_dataread.nc
and its methods are named after the allocation rule being computed. The class requires an input: the region (ISO3) that is focused on (calledself.FocusRegion
inclass_allocation.py
). So inMain.ipynb
, you see that there is a loop over all countries and even some country groups (e.g., G20) in the world. The output are files in the form ofxr_alloc_XYZ.nc
where XYZ is the ISO3 code for a country, and they are saved to K:/ECEMF/T5.2/Allocations/. - The third and fourth classes (
class_allocation_combinedapproaches
andclass_tempalign
) are for future research. - The fifth class (
class_policyscens
) is for reading cost-optimal scenarios and NDCs - The final class (
class_variancedecomp
) conducts the variance decomposition (Sobol analysis)
One final important notebook is Aggregator.ipynb
. This script aggregates the country-individual files xr_alloc_XYZ.nc
. One output is the aggregation of those files into a single file for a single year, for example xr_alloc_2030.nc
. Useful for analysis purposes. Input variables can be changed in input.yml
.
Plotting scripts
The code contains plotting scripts for our paper and presentations.
Files
imagepbl/EffortSharing-v1.0.0.zip
Files
(9.1 MB)
Name | Size | Download all |
---|---|---|
md5:d4233a747f5c7814449973d84c157c16
|
9.1 MB | Preview Download |
Additional details
Related works
- Is supplement to
- Software: https://github.com/imagepbl/EffortSharing/tree/v1.0.0 (URL)