CNit
CNit (Carbon-Nitrogen Interactions in Terrestrial ecosystems) is a process-based terrestrial biogeochemistry model of coupled carbon and nitrogen cycles. It is the land component of MAGICC (Model for the Assessment of Greenhouse Gas Induced Climate Change), designed to represent terrestrial carbon–nitrogen feedbacks efficiently in integrated assessment and climate projection studies.
Features
- Three carbon pools (plant, litter, and soil) and four nitrogen pools (plant, litter, soil, and mineral).
- Bidirectional carbon–nitrogen coupling: nitrogen availability limits carbon uptake, while carbon uptake drives nitrogen demand and can stimulate biological fixation.
- Effects of atmospheric CO₂, temperature, nitrogen availability, and land use on ecosystem fluxes.
- Separate deforestation, afforestation, post-deforestation regrowth, and afforestation decay fluxes for land-use and carbon dioxide removal scenarios.
- Annual timesteps in the default examples, with support for evenly spaced subannual timesteps. Allocation fractions apply within each model timestep; supplied calibration files are based on an annual timescale.
Installation
Install CNit from PyPI:
pip install cnit
Quick Start
This example runs CNit with simple annual input series. See the Quickstart Guide for installation options, a notebook version, and further explanation.
import numpy as np
from cnit import CNitModel, CNitModelConfig, Q
# Create a model with default parameters.
model = CNitModel.from_config(CNitModelConfig())
# Set up annual time coordinates and input series.
time_axis = Q(np.arange(1850, 2101), "yr")
n_steps = len(time_axis)
dT_s = Q(np.linspace(0, 2, n_steps), "K")
CO2_s = Q(np.linspace(280, 560, n_steps), "ppm")
# Land-use emissions are zero for this simple example.
CemsLUnet_s = Q(np.zeros(n_steps), "GtC/yr")
CemsLUgrs_s = Q(np.zeros(n_steps), "GtC/yr")
NemsLUnet_s = Q(np.zeros(n_steps), "GtN/yr")
NemsLUgrs_s = Q(np.zeros(n_steps), "GtN/yr")
NemsLUmin_s = Q(np.zeros(n_steps), "GtN/yr")
# Nitrogen deposition and fertilizer inputs.
NflxAD_s = Q(np.linspace(0.05, 0.15, n_steps), "GtN/yr")
NflxFT_s = Q(np.linspace(0, 0.1, n_steps), "GtN/yr")
res = model.run(
time_axis=time_axis,
dT_s=dT_s,
CO2_s=CO2_s,
CemsLUnet_s=CemsLUnet_s,
CemsLUgrs_s=CemsLUgrs_s,
NflxAD_s=NflxAD_s,
NflxFT_s=NflxFT_s,
NemsLUnet_s=NemsLUnet_s,
NemsLUgrs_s=NemsLUgrs_s,
NemsLUmin_s=NemsLUmin_s,
)
print(f"Final plant carbon: {res['CplsP'].data[-1]} {res['CplsP'].units}")
print(f"Final plant nitrogen: {res['NplsP'].data[-1]} {res['NplsP'].units}")
print(f"Final NPP: {res['CflxNPP'].data[-1]} {res['CflxNPP'].units}")
Documentation
The CNit documentation covers the model overview, quickstart, detailed physics and configuration APIs, CMIP6 ESM and TRENDY DGVM emulation workflows, and calibration data and results.
References
If you use CNit in research, please cite the relevant publication(s):
Model description and calibration
- [CNit v1.0] Tang, G., Nicholls, Z., Norton, A., Zaehle, S., and Meinshausen, M.: Synthesizing global carbon–nitrogen coupling effects – the MAGICC coupled carbon–nitrogen cycle model v1.0, Geosci. Model Dev., 18, 2193–2230, doi:10.5194/gmd-18-2193-2025, 2025.
- [CNit v2.0] Tang, G., Zaehle, S., Nicholls, Z., Norton, A., Ziehn, T., and Meinshausen, M.: Understanding the drivers of carbon–nitrogen cycle variability in CMIP6 ESMs with MAGICC CNit v2.0: model and calibration updates, J. Adv. Model. Earth Syst., 18, e2025MS005270, doi:10.1029/2025MS005270, 2026.
- [CNit v2.1] Tang, G., Norton, A., Gasser, T., Nicholls, Z. R. J., Ziehn, T., Abrahão, G. M., and Meinshausen, M. A.: Reassessing the terrestrial carbon sink reveals stronger CO₂ fertilization, elevated climate sensitivity, and intensifying nitrogen limitation, ESS Open Archive, preprint, doi:10.22541/essoar.15006117/v2, 2026.
- [CMIP6 data] Tang, G., Nicholls, Z., Jones, C., Gasser, T., Norton, A., Ziehn, T., Romero-Prieto, A., and Meinshausen, M.: Investigating carbon and nitrogen conservation in reported CMIP6 Earth system model data, Geosci. Model Dev., 18, 2111–2136, doi:10.5194/gmd-18-2111-2025, 2025.
Climate and carbon-cycle application
- [MAGICC-CNit SSP projections] Tang, G., Nicholls, Z., Norton, A., Gasser, T., Ziehn, T., Zaehle, S., and Meinshausen, M.: Nitrogen limitation amplifies future warming by weakening terrestrial carbon cycle feedbacks and sink capacity, Commun. Earth Environ., 7, 760, doi:10.1038/s43247-026-03736-0, 2026.
See References for the complete bibliography.
Development
See Contributing for development setup and checks. The Changelog lists release history.
Authors and Contributors
Author, developer, and maintainer: Gang Tang
Contributors:
- Zebedee Nicholls — zebedee.nicholls@climate-energy-college.org
- Alexander Norton — alex.norton@csiro.au
- Sönke Zaehle — szaehle@bgc-jena.mpg.de
- Malte Meinshausen — malte.meinshausen@unimelb.edu.au
Related Projects
CNit is the carbon cycle component of MAGICC. See the MAGICC repository for the climate model.
License
CNit is distributed under the BSD 3-Clause License. See LICENSE.
Metadata
Release files for cnit 2.3.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| cnit-2.3.0.tar.gz | 90.5 kB | Without provenance | Details for cnit-2.3.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| cnit-2.3.0-py3-none-any.whl | Python 3 | none | any | Details for cnit-2.3.0-py3-none-any.whl |
Total release size: 173.9 kB
Release files / cnit-2.3.0.tar.gz
| Download URL | cnit-2.3.0.tar.gz |
|---|---|
| Size | 90.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
feecb92a6f7009dbd9368bc189d06ae3061dae5a94eab19302d15eda741820aa
|
|
BLAKE2b-256 checksum How to use checksums |
101f70e13e20abeedb0e210d2787a2423b8686a70118b4e64fe0f0e741e01397
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.10.15
|
Release files / cnit-2.3.0-py3-none-any.whl
| Download URL | cnit-2.3.0-py3-none-any.whl |
|---|---|
| Size | 83.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
7e11035c47649dc4300afae45f7fcdbd1adfbf96ba3e86586b97a222149a0656
|
|
BLAKE2b-256 checksum How to use checksums |
ed5d0f624f625e3832e099d8bf56b17855ec3722882fcfc2fd8cca9d307a57b1
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.10.15
|
Security for cnit 2.3.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.