DOI: 10.5281/zenodo.14507267
title: The social costs of aviation CO2 and contrail cirrus - data & code

description: README

Overview

This repository contains the input data, processed output data, and code used to generate the figures in: Johansson et al. (2025) — The social costs of aviation CO₂ and contrail cirrus, Nature Communications, forthcoming.

The material is archived to ensure transparency and reproducibility of the results presented in the paper. The files are available in the zipped folder.

 

Code

Code – figure 1, 2 and 3-Zenodo-FINAL.py

Script to generate Figures 1–3. Reads M-DICE output and assumption files, processes the data, and generates figures.

Code  – figure 4-Zenodo-FINAL.py

Script to generate Figure 4. Uses the probabilistic contrail social cost estimates to calculate ratios, percentiles, and uncertainty bands, and outputs to generate figure.

Code – figure 5-Zenodo-FINAL.py

Script to generate Figure 5. Processes both Howard & Sterner and Nordhaus damage functions with contrail and CO₂ costs, applies penalties, and plots cumulative distributions with uncertainty ranges and generate figure.

Code – 1000 EF estimates per flight generator-Zenodo-FINAL.py

Script that applies SCC and SCEF values to per-flight emission and forcing data and produces 1000 probabilistic contrail cirrus social cost realizations per flight per discount rate, for use to generate figure 4 and figure 5.

 

Figure data

Data used for creating the figures are available in the zipped folder "Figure source data".

- figure1data.csv — Source data for Figure 1 

- figure2data.csv — Source data for Figure 2 

- figure3data.csv — Source data for Figure 3 

- figure4data.csv — Source data for Figure 4 

- figure5data/ — Folder with source data for Figure 5

 

External Data

To reproduce the figures, the following input files must be available in the working directory:

Final data for paper - DICE output-2020.xlsx

basic paper info.xlsx

2019_Ensembles_filtered.parquet

These contain M-DICE model outputs, basic assumptions, and flight ensemble emission and EF data, respectively.

 

Outputs

Running the scripts will produce:

Figures 1–5 as publication-ready .pdf files.

Corresponding processed CSV files with the numerical values underlying each figure.

In order for the output files to be saved you have to add a folder named "data" in the working directory.

 

Requirements

All scripts are written in Python 3.9+. Required packages: Numpy, pandas, matplotlib, seaborn, scipy, openpyxl.

 

Usage

Ensure input data files are in the correct relative paths (as referenced in the scripts).

Run the script "1000 EF estimates per flight generator-Zenodo-FINAL.py" before running code for figure 4 and figure 5.

If you want access to M-DICE which is used for calculating the social cost of CO2 and social cost of energy forcing contact daniel.johansson@chalmers.se.

 

License

The code and data provided here are made available under the Creative Commons Attribution 4.0 International License (CC BY 4.0).

 

Citation

If you use this code or data, please cite both the original article and this Zenodo repository:

Johansson, D.J.A., et al. (2025). The social costs of aviation CO₂ and contrail cirrus. Nature Communications.

Zenodo archive: [https://doi.org/10.5281/zenodo.14507267]