Skip to main content

Rust Simple Climate Model (RSCM)

RSCM is a framework for building reduced-complexity climate models in Rust and Python. Models are assembled from components that are coupled through named variables, and solved on a common time axis. It is also a testbed for modularising MAGICC and reimplementing it in Rust.

Design goals

  • Fast
  • Easy to extend
  • Understandable by non-Rust developers
  • Can be driven from Python

What ships

  • A two-layer energy balance model (rscm.two_layer).
  • Example components for a one-box carbon cycle, CO2 forcing and four-box ocean heat uptake (rscm.components).
  • MAGICC7 components (rscm.magicc) for:
    • CH4, N2O and halocarbon chemistry.
    • The terrestrial carbon cycle with nitrogen limitation, ocean carbon, CO2 budget and permafrost.
    • GHG, ozone and aerosol forcing, and forcing aggregation with efficacies.
    • The upwelling-diffusion climate and sea level rise.
  • Emissions-driven and concentration-driven MAGICC models (rscm.magicc.emissions_driven, rscm.magicc.concentration_driven), with the rscm.magicc.magicc7 adapter to translate MAGICC7's configuration. They match MAGICC7 v7.5.3 on its SSP245 runs and on every member of its AR6 probabilistic ensemble.
  • A port of FaIR v2.2.5 (rscm.fair), with ensemble runs and conversion from a configured fair.FAIR.
  • Model specs (rscm.spec) to inspect and compare models, and runners that compile a model once and run many members in parallel (rscm.run_one, rscm.run_ensemble, rscm.calibrate.Runner).
  • Run records (Model.checkpoint, Model.restore, Model.branch) to resume a run or branch from it.
  • Input validation (rscm.validation) that reports every problem in a run's inputs before it starts.
  • TOML model configuration (rscm.config) and shared variable names (rscm.names).
  • MCMC calibration and point estimation (rscm.calibrate).

Quickstart

pip install rscm

The quickstart runs the two-layer model under a forcing ramp and plots its warming in about 20 lines. The documentation covers the MAGICC and FaIR models, coupling components and writing your own.

Development

This project comprises a Rust workspace in crates/ and a Python package (rscm) which includes a Python extension module to provide access to the Rust library.

Dependencies

The following dependencies are required to build the project:

  • Rust
  • uv (Python package management)

After these dependencies have been installed the local Python environment can be initialised using:

make virtual-environment

Rust is a compiled language, so the Python extension module must be recompiled after any changes to the Rust code. This can be done using:

make build-dev

Tests

Rust unit tests are embedded alongside the implementation files. The rscm crate holds the Python bindings, so it is excluded when running the Rust tests directly:

cargo test --workspace --exclude rscm

make test rebuilds the extension and runs both the Python and Rust test suites.

Documentation

A mkdocs-based documentation site is in the docs/ directory. These docs provide an overview of the whole project and provide reference documentation for the Python interface with some example notebooks.

These docs can be built using:

make docs

The documentation for the Rust codebase can be built using:

make docs-rust

Metadata

Release files for rscm 0.10.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for rscm 0.10.0
File Size Uploaded Provenance Actions
rscm-0.10.0.tar.gz 1.1 MB With provenance Details for rscm-0.10.0.tar.gz

Built distributions (wheels)

Table of built distributions (wheels) for rscm 0.10.0
File Actions
rscm-0.10.0-cp313-abi3-win_amd64.whl CPython 3.13 abi3 Windows x86-64 Details for rscm-0.10.0-cp313-abi3-win_amd64.whl
rscm-0.10.0-cp313-abi3-manylinux2014_x86_64.manylinux_2_17_x86_64.whl CPython 3.13 abi3 Linux glibc 2.17+ x86-64 Details for rscm-0.10.0-cp313-abi3-manylinux2014_x86_64.manylinux_2_17_x86_64.whl
rscm-0.10.0-cp313-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.whl CPython 3.13 abi3 Linux glibc 2.17+ ARM64 Details for rscm-0.10.0-cp313-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.whl
rscm-0.10.0-cp313-abi3-macosx_11_0_arm64.whl CPython 3.13 abi3 macOS 11.0+ ARM64 Details for rscm-0.10.0-cp313-abi3-macosx_11_0_arm64.whl
rscm-0.10.0-cp313-abi3-macosx_10_12_x86_64.whl CPython 3.13 abi3 macOS 10.12+ x86-64 Details for rscm-0.10.0-cp313-abi3-macosx_10_12_x86_64.whl

Total release size: 23.0 MB

Release files / rscm-0.10.0.tar.gz

Download URL rscm-0.10.0.tar.gz
Size 1.1 MB
Tags Source
SHA-256 checksum
How to use checksums
469b59d708223abd3878d6f44728dabfd44d4b6cf12962cc5bf10349533ef1e9
BLAKE2b-256 checksum
How to use checksums
41c6f1b1f8aaa9733e3c2e51b986189baa990f2a175871a206bf6650c1395222
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Dec 1, 2026.

Transparency log

Release files / rscm-0.10.0-cp313-abi3-win_amd64.whl

Download URL rscm-0.10.0-cp313-abi3-win_amd64.whl
Size 3.9 MB
Tags CPython 3.13 Windows x86-64 abi3
SHA-256 checksum
How to use checksums
e1324de6492f0b0eb4e202d849df74acd82ae720f3983f365d11238615f9c76f
BLAKE2b-256 checksum
How to use checksums
a307319a4c7d199b38fe8653e600f42079aaeef6f2ef27f0431b8c07e61703e1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Dec 1, 2026.

Transparency log

Release files / rscm-0.10.0-cp313-abi3-manylinux2014_x86_64.manylinux_2_17_x86_64.whl

Download URL rscm-0.10.0-cp313-abi3-manylinux2014_x86_64.manylinux_2_17_x86_64.whl
Size 4.5 MB
Tags CPython 3.13 Linux glibc 2.17+ x86-64 abi3
SHA-256 checksum
How to use checksums
1c055cffad8a2bad475bc44a9c8ccf3a597b80427318747f61fb61e7b865473e
BLAKE2b-256 checksum
How to use checksums
a34d2d76b1a728faa2cc099fca6f0d65995bc738c524b9d6de3e5ef6d6e947f9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Dec 1, 2026.

Transparency log

Release files / rscm-0.10.0-cp313-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.whl

Download URL rscm-0.10.0-cp313-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.whl
Size 4.9 MB
Tags CPython 3.13 Linux glibc 2.17+ ARM64 abi3
SHA-256 checksum
How to use checksums
1b98ac477c4fe195ebdcc5f4081fbc828b12af461e9966083be6e0a6e6d0b608
BLAKE2b-256 checksum
How to use checksums
04d3931c05b995015f6cd14b9e52bb1cc9b253cb0418fa4cf39a40e57d9471bf
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Dec 1, 2026.

Transparency log

Release files / rscm-0.10.0-cp313-abi3-macosx_11_0_arm64.whl

Download URL rscm-0.10.0-cp313-abi3-macosx_11_0_arm64.whl
Size 4.3 MB
Tags CPython 3.13 abi3 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
0a733202e5e9bef67b507500897335fff2fd6d2ede1971c346572a68bede1b65
BLAKE2b-256 checksum
How to use checksums
77b7a176adb4ee54e2343391b02156e9d246ee582997565ab7622ee629c37a66
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Dec 1, 2026.

Transparency log

Release files / rscm-0.10.0-cp313-abi3-macosx_10_12_x86_64.whl

Download URL rscm-0.10.0-cp313-abi3-macosx_10_12_x86_64.whl
Size 4.3 MB
Tags CPython 3.13 abi3 macOS 10.12+ x86-64
SHA-256 checksum
How to use checksums
807f671e666c91cbb66f5373958a3dad7cae01233566208b12e5a4e04c2206f2
BLAKE2b-256 checksum
How to use checksums
270c8af7602727cb1da3aedf43802d122b43bec6c79a96af3943f7e60d515680
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Dec 1, 2026.

Transparency log

Security for rscm 0.10.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.

Full provenance

All 6 files in this release have been uploaded with provenance metadata.

Select from 6 files

Attestation for rscm-0.10.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Dec 1, 2026.

Transparency log

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.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page