This is the CODECHECK repository for the publication: Can we achieve significant climate mitigation by optimising only for contrails?. The code used to generate the figures of the publication is available via the Technische Universiteit Delft (TU Delft) GitLab with a DOI from the 4TU.ResearchData archive:
TU Delft GitLab Repository: https://gitlab.tudelft.nl/jsmretschnig/jecats-paper-climate-mitigation
4TU.ResearchData Repository: https://doi.org/10.4121/cbdafa47-709d-45da-86e1-7fed28ec3582 DOI not yet active
This CODECHECK repository is a clone of the author's TU Delft GitLab repository associated with the publication. The CODECHECK report is published in Zenodo (https://doi.org/10.5281/zenodo.21932994).
All figures of the related publication were reproduced. The figures are generated by Jupyter notebooks. In order to reproduce the figures, two datasets are necessary. One dataset has been published by the author (DOI not yet active, awaiting acceptance at the 4TU.ResearchData). The other dataset is already public data. Regarding the code, the notebooks require an extension that is available upon request (not distributed within the code repository) and a visualization code already open-source available via GitHub.
The repository contains 17 Jupyter notebooks, from which 16 reproduce the figures of the related publication. One Jupyter notebook corresponds to a pipeline users can adapt to perform the same processing pipeline on a high-performance-computer (HPC) with their own datasets. This CODECHECK refers only to the notebooks reproducing the figures of the related publication (incl. the appendixes).
The codecheck was performed in Windows 11 Enterprise (OS: Windows 11 Enterprise 24H2 (x86_64)) and Git Bash (git version 2.49.0.windows.1), within VSCode (version 1.128.0 user setup) using python 3.11.15 and IPython 9.16.1. All notebooks were run with CPU Processor: Intel(R) Core(TM) i7-10610U @ 1.80 GHz.
The author provides detailed instructions for reproducing the figures, including a list of dependencies and guidance on how to install them (the repository provides a pyproject.toml).
The codechecker followed the directory structure suggested in the top-level README file, and placed the necessary datasets in a ./data/ directory and created a ./figures/ folder. Consequently, no modifications to the file paths in the notebooks were necessary. All figures generated during the codechecking procedure are stored in ./figures/.
In order to reproduce the figures, pycontrails-bada 0.7.7 and sankey.py are required. Both are not distributed in the code repository. Instructions on how to request access to pycontrails-bada 0.7.7 are specified in the README. In order to perform the CODECHECK, the codechecker got access to it. NOTE: The repository's pyproject.toml specifies pycontrails[complete]>=0.54.11. During the CODECHECK, this dependency was resolved to pycontrails 0.63.3. From pycontrails 0.63.3 changelog it is mentioned that DEFAULT_LOAD_FACTOR was removed. However pycontrails-bada 0.7.7 still imports it. As a result, running pycontrails-bada 0.7.7 with pycontrails 0.63.3 produces an import error. The codechecker then had to comment out line 22 of .venv/Lib/site-packages/pycontrails_bada/bada_model.py which imports DEFAULT_LOAD_FACTOR.
Regarding sankey.py, the author refers to the original repository where it can be downloaded from (pySankey) and specifies what needs to be commented out to reproduce Figure 9.
The notebooks have the instructions to print the figures in a ./figures/ directory. The figures themselves are not distributed in the repository, but are plotted within the Jupyter notebooks themselves.
In order to carry out the CODECHECK, the ./figures/ directory is distributed in this repository.
All figures were reproduced and can be found in ./figures/.
Only Figure 1 had issues when running the notebook. When running the notebook ./notebooks/figure-01.ipynb two issues appeared:
- The notebook displayed and printed only panels b and c. Not panel a.
- The numbers displayed at the top of the bars of panel b were different than in the related publication. It is important to note that the bar plot itself is identical to the one shown in the related publication; only the numerical labels above the bars differ.
After inspection:
- point 1) ended up being an issue with CartoPy's interaction with matplotlib (not an issue with the calculations).
- Point 2) resulted from a mistake in the logic of the instructions, and affected only the presentation of the figure (i.e. its graphical display), and not to its content (the values of the bar plots).
Hence after fixes (see the Zenodo report) Figure 1 was reproduced. The modified notebook is ./notebooks/[CODECHECK]figure-01.ipynb and the resulting figure is ./figures/[CODECHECK]fig01.png.
- Dr. Heather Andrews Mancilla (@HeatherAn,
0000-0002-6637-2830, H.E.AndrewsMancilla@tudelft.nl, Technische Universiteit Delft
This repository provides a Python pipeline for quantifying the net climate benefit of contrail avoidance accounting for the climate effects of CO${2}$, contrails, NO${x}$ and H$_{2}$O.
The pipeline is demonstrated through a real-world case study, analyzing 4112 flights traversing the Borealis region (Northern Europe) in 2023 published in Smretschnig et al. (2026) (see How to cite this repository). This repository contains Jupyter notebooks that reproduce the figures presented in Smretschnig et al. (2026). The data related to this case study has also been released publicly via the 4TU.ResearchData archive (see How to cite this repository).
Keywords: Sustainable aviation - Contrails - Contrail avoidance - Climate optimised trajectories - aCCF - CoCiP - pycontrails - Aerospace engineering
Funding: The project has been funded by CONCERTO under the SESAR 3 Joint Undertaking (Grant ID 101114785).
- Jakob Smretschnig (@jsmretschnig,
0009-0003-6446-3039, j.smretschnig@tudelft.nl, Technische Universiteit Delft, The Netherlands
The contents of this repository are licensed under a MIT license (see ./LICENSE.txt file).
Copyright notice:
Technische Universiteit Delft hereby disclaims all copyright interest in the program "Contrail Avoidance Non-CO2 Evaluation CANE" written by the Author(s). Henri Werij, Faculty of Aerospace Engineering, Technische Universiteit Delft.
Β© 2026, J. Smretschnig
Clone the repository:
git clone git@gitlab.tudelft.nl:jsmretschnig/jecats-paper-climate-mitigation.git
cd jecats-paper-climate-mitigationCreate a virtual environment and activate it:
uv venv --python 3.11
source .venv/bin/activate # or .venv/Scripts/activate on WindowsInstall in editable mode:
uv pip install -e .Activate the environment again and check if pip and uv point to the same .venv directory:
source .venv/bin/activate # .venv/Scripts/activate on Windows
which pip # should point to .venv/bin/pip (Unix) or .venv/Scripts/pip (Windows)Install pycontrails-bada 0.7.7 with pip. Be aware this is a private extension for which access must be requested at info@contrails.org. Once access is provided, follow the instructions specified in its documentation.
Once the installation is complete, run the ./notebooks/figure-*.ipynbnotebooks in numerical order to reproduce the figures presented in the related article. In order to run the notebooks:
- download the related data from the 4TU.ResearchData archive (see How to cite this repository) and store it in a
datadirectory located at the root (top-level) directory of this repository. - Download ERA5 tropopause data from FZ JΓΌlich (https://doi.org/10.26165/JUELICH-DATA/UBNGI2 [3]) and store in a
./data/juelichdirectory. Keep in mind: this dataset is large in size (~1.4 GB per file). The notebook./notebooks/Figure-06.ipynbuses only part of the dataset to reproduce the figure 6 of the related paper. - Modify the paths at the beginning of the notebooks accordingly if not using the default data locations suggested above (the default file paths are configured to look for data inside a folder named
datalocated at the root (top-level) directory of the repository). - Create a
./figuresfolder which is where the plots generated by the notebooks will be saved as png files. - The notebook
./notebooks/figure-09.ipynbrequires thesankey.pymodule, which is not included in this repository. To obtain it:- clone or download the pySankey repository.
- Copy the
pySankey/pysankey/sankey.pymodule (version commit 811a638) to your./src/cane/directory. - Apply the following modifications: comment out lines 123--126 (i.e. do not run the check_data_matches_labels() function for right labels)
To apply the pipeline to a different dataset, run ./notebooks/pipeline.ipynb.
Reminder: When using VS Code, make sure to select the venv's Python interpreter: Open the command palette (Cmd+Shift+P / Ctrl+Shift+P) β Python: Select Interpreter β choose the one pointing to .venv/bin/python (Unix) or .venv/Scripts/python (Windows).
.
βββ CITATION.cff
βββ LICENSE.txt
βββ README.md
βββ notebooks
βΒ Β βββ figure-*.ipynb
βΒ Β βββ pipeline.ipynb
βββ pyproject.toml
βββ scripts
βΒ Β βββ run_accfs.py
βΒ Β βββ run_cocip.py
βββ src
βββ cane
βββ airspaces
βΒ Β βββ borealis.py
βΒ Β βββ static
βΒ Β βββ Borealis_airspaces.json
βββ colors.py
βββ constants.py
βββ labels.py
βββ metrics
βΒ Β βββ __init__.py
βΒ Β βββ metrics.py
βΒ Β βββ static
βΒ Β βββ dahlmann-2025.csv
βββ models
βΒ Β βββ accf.py
βΒ Β βββ aircraft_performance.py
βΒ Β βββ cocip.py
βΒ Β βββ era5.py
βββ utils.py
The ./notebooks folder contains the Jupyter notebooks that reproduce the figures of Smretschnig et a. (2026). More specifically:
figure-*.ipynb: each notebook reproduces one figure of the related article.pipeline.ipynb: notebook with the processing pipeline, from aircraft performance to climate models on a high-performance-computer (HPC).
The ./scripts folder contains Bash scripts to run aCCFs and CoCiP on a High-Performance-Computer (HPC), such as DelftBlue.
The ./src folder contains the functions used by the pipeline. More specifically:
./cane/airspaces/*: functions to visualize the boundaries of the Borealis airspaces../cane/metrics/*: computation of the climate effect using different climate metrics../cane/models/accf.py: computation of algorithmic Climate Change Functions (aCCFs) for CO2, NOx, and H2O../cane/models/aircraft_performance.py: computation of fuel consumption with BADA3../cane/models/cocip.py: helper functionalities for the CoCiP configuration../cane/models/era5.py: functionality to download meteorological data from ERA5../cane/utils.py: helper functionalities regarding coloring, constants, friendly names, haul-type classification, etc.
When using this repository please cite this code repository, the related data repository and the related article. You can do so either using the ./CITATION.CFF file or by using the following information:
Code repository
J. Smretschnig, 2026, Contrail Avoidance Non-CO2 Evaluation (CANE). 4TU.ResearchData. Software. https://doi.org/10.4121/cbdafa47-709d-45da-86e1-7fed28ec3582
Data repository
Smretschnig, Jakob; ClΓ©ment, JoΓ«l; NΓΊΓ±ez Arribas, Sergio (2026): Filed and contrail-optimised flight trajectories in Northern Europe. Version 1. 4TU.ResearchData. Dataset. https://doi.org/10.4121/16ec2954-a493-41c8-b3f9-f17e9331c46b
Article
Smretschnig, J., Yin, F., Piontek, D., ClΓ©ment, J., NΓΊΓ±ez Arribas, S., Dahlmann, K., Castino, F., and Grewe, V.: Can we achieve significant climate mitigation by optimising only for contrails?, J. Env. Com. Air Transp. Sys. Discuss. [preprint], https://doi.org/10.5194/jecats-2026-13, in review, 2026.
[1] Copernicus Climate Change Service, Climate Data Store, (2023): ERA5 hourly data on pressure levels from 1940 to present. Copernicus Climate Change Service (C3S) Climate Data Store (CDS). DOI: 10.24381/cds.bd0915c6
[2] Copernicus Climate Change Service, Climate Data Store, (2023): ERA5 hourly data on single levels from 1940 to present. Copernicus Climate Change Service (C3S) Climate Data Store (CDS). DOI: 10.24381/cds.adbb2d47
[3] Hoffmann, L. and R. Spang, Reanalysis Tropopause Data Repository, DOI: 10.26165/JUELICH-DATA/UBNGI2, JΓΌlich DATA, V1, 2021.
algorithmic Climate Change Function (aCCF)
[4] Van Manen, J., and V. Grewe. βAlgorithmic Climate Change Functions for the Use in Eco-Efficient Flight Planning.β Transportation Research Part D: Transport and Environment 67 (February 2019): 388β405. https://doi.org/10.1016/j.trd.2018.12.016
[5] Yin, Feijia, Volker Grewe, Federica Castino, et al. βPredicting the Climate Impact of Aviation for En-Route Emissions: The Algorithmic Climate Change Function Submodel ACCF 1.0 of EMAC 2.53.β Geoscientific Model Development 16, no. 11 (2023): 3313β34. https://doi.org/10.5194/gmd-16-3313-2023
[6] DietmΓΌller, Simone, Sigrun Matthes, Katrin Dahlmann, et al. βA Python Library for Computing Individual and Merged Non-CO 2 Algorithmic Climate Change Functions: CLIMaCCF V1.0.β Geoscientific Model Development 16, no. 15 (2023): 4405β25. https://doi.org/10.5194/gmd-16-4405-2023
[7] Matthes, Sigrun, Simone DietmΓΌller, Katrin Dahlmann, et al. βUpdated Algorithmic Climate Change Functions (aCCF) V1.0A: Evaluation with the Climate-Response Model AirClim V2.0.β Preprint, Atmospheric sciences, 2023. https://doi.org/10.5194/gmd-2023-92
BADA3
[8] EUROCONTROL. User Manual for the Base of Aircraft Data (BADA) Revision 3.16. EIH Technical/Scientific Report No. 22/05/12-45. EUROCONTROL Experimental Centre (EEC), 2022.
CoCiP
[9] U. Schumann. βA Contrail Cirrus Prediction Model.β Geoscientific Model Development 5, no. 3 (2012): 543β80. https://doi.org/10.5194/gmd-5-543-2012.
Conversion factors
[10] Dahlmann, Katrin, Sigrun Matthes, and Volker Grewe. βConversion of Climate Metrics for Policy Applications.β Preprint, Zenodo, July 31, 2025. https://doi.org/10.5281/ZENODO.16355781.
FFM2
[11] DuBois, D. and Paynter*, G., "βFuel Flow Method2β for Estimating Aircraft Emissions," Non-Conference Specific Technical Papers - 2006, , https://doi.org/10.4271/2006-01-1987.
pyContrails
[12] Shapiro, Marc, Zeb Engberg, Roger Teoh, Marc Stettler, Tom Dean, and Tristan Abbott. Pycontrails: Python Library for Modeling Aviation Climate Impacts. V. v0.54.11. Zenodo, released July 2025. https://doi.org/10.5281/zenodo.16575452.
T4T2
[13] Teoh, Roger, Ulrich Schumann, Edward Gryspeerdt, et al. βAviation Contrail Climate Effects in the North Atlantic from 2016β2021.β Atmospheric Chemistry and Physics 22, no. 16 (2022): 10919--10935. https://doi.org/10.5194/acp-22-10919-2022.
[14] Teoh, Roger, Zebediah Engberg, Marc Shapiro, Lynnette Dray, and Marc E. J. Stettler. βThe High-Resolution Global Aviation Emissions Inventory Based on ADS-B (GAIA) for 2019β2021.β Atmospheric Chemistry and Physics 24, no. 1 (2024): 725β44. https://doi.org/10.5194/acp-24-725-2024.
