pratmo
pratmo rewrites the original Fortran 77 model in Rust and exposes it through
a command-line runner and a typed Python/NumPy interface. The project aims to
preserve the original model structure while making the code easier to test,
inspect, and embed. It also adds an experimental inorganic iodine mechanism
that is not present in PRATMO v6.0.
Implementation tests and selected numerical comparisons with the compiled Fortran program are included, but these are software consistency checks—not scientific validation of the Rust rewrite, its inputs, or its predictions.
Features
- Rust model core with structured CTM steady-state and full DIURN-cycle APIs.
- Python package named
pratmo, with typed configuration objects and NumPy arrays for profiles, grids, coordinates, time series, and diagnostics. - 40 implicit gas-phase species and 19 long-lived species or chemical families.
- Experimental inorganic iodine chemistry, including ten iodine species, iodine photolysis, higher iodine oxides, and heterogeneous recycling.
- Standard atmospheres, custom atmospheric profiles, configurable aerosol and sea-salt surface areas, and observation-constrained NO2 workflows.
- Compatibility paths for the original fixed-format inputs and legacy CLI outputs, plus opt-in tooling for numerical comparisons with Fortran.
- Runnable CTM, DIURN, iodine, custom-atmosphere, and OMPS batch examples.
The iodine mechanism's assumptions and known omissions are documented in Iodine chemistry.
Python quickstart
The published distribution and import name are both pratmo. To install a
released wheel:
python -m pip install "pratmo[plot]"
For development, build the extension into the project environment:
uv sync --dev
uv run maturin develop --release
Run a CTM altitude profile with runnable, validated defaults:
from pratmo import Model
from pratmo.plotting import plot_profile
model = Model()
output = model.ctm(latitude=60.0, day="2026-03-16")
print(output.altitude_km)
print(output.species_profile("o3")) # cm^-3
print(output.long_lived_profile("noy")) # dimensionless mixing ratio
plot_profile(output, ["o3", "no2", "oh"]).show()
Atmosphere accepts pressure, temperature, altitude, ozone, and aerosol
profiles with explicit units. Helpers such as ppmv(5), ppbv(300),
pressure(values, "Pa"), and number_density(values, "m-3") keep conversions
visible. Suspicious values emit PratmoWarning; inconsistent profiles raise
ValueError before integration.
The lower-level PratmoModel, CtmConfig, and DiurnConfig API remains
available. The package also exposes IMPLICIT_SPECIES_NAMES,
LONG_LIVED_NAMES, and JVALUE_NAMES for discovery. See the
rendered Python guide and
examples for CTM, DIURN,
custom-atmosphere, and observation-constrained workflows.
Rust and CLI
cargo build --workspace
cargo run -p pratmo-cli -- --input-dir fortran
pratmo-core provides the structured Rust API. pratmo-cli preserves the
original file-based workflow and writes Fortran-compatible output files into
the selected input directory.
Development verification
These checks test software behavior and selected Fortran agreement. Passing them does not mean that the model is scientifically validated.
Run the normal development checks with:
cargo fmt --all -- --check
cargo clippy --workspace --all-targets --all-features -- -D warnings
cargo test --workspace
cargo test --workspace --all-features
uv run pytest
uv run sphinx-build -W --keep-going -b html docs docs/_build/html
GitHub Actions runs these Rust checks, the Python tests, a strict documentation
build, and the complete cross-platform wheel build on every push and pull
request. Built distributions are retained as workflow artifacts. The publish
job runs only for release tags matching v* and uses PyPI Trusted Publishing.
The extension uses PyO3's Python 3.9 stable ABI, so each platform build produces
one cp39-abi3 wheel compatible with Python 3.9 and newer.
The clean-room compiled-Fortran differential is available separately:
scripts/fortran_differential.sh
The detailed numerical comparisons, parity policy, and unsupported legacy modes are tracked in STATUS.md and FORTRAN_PARITY.md. Release procedures and archived implementation notes are separated under developer documentation.
Current boundaries
DERIVSsensitivity mode andPZSTDconversion are rejected explicitly.- The original multi-case Fortran driver loop is not implemented.
- Full CTM climatology-grid coverage remains broader than the comparison fixture.
- The iodine extension has mechanism-level tests but no Fortran reference and has not been scientifically validated.
License
pratmo is available under the MIT License.
Metadata
Release files for pratmo 0.3.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| pratmo-0.3.1.tar.gz | 642.0 kB | Details |
Built distributions (wheels)
Total release size: 17.3 MB
Release files / pratmo-0.3.1.tar.gz
| Download URL | pratmo-0.3.1.tar.gz |
|---|---|
| Size | 642.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
6d60149d2a27fb5dd0e3aadd02b591f72d2f9c0a63e177e9f8f27e34b1466a48
|
|
BLAKE2b-256 checksum How to use checksums |
5c3cb87e5460440e606b09c82e54b2977aca342bba75e3656f55750a619f96f2
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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 Sep 8, 2026.
Transparency logRelease files / pratmo-0.3.1-cp39-abi3-win_arm64.whl
| Download URL | pratmo-0.3.1-cp39-abi3-win_arm64.whl |
|---|---|
| Size | 872.9 kB |
| Tags | CPython 3.9 Windows ARM64 abi3 |
|
SHA-256 checksum How to use checksums |
82fa788586023f876113eee2c889e83cc688d18483fd9e9b2ecb82b27879023e
|
|
BLAKE2b-256 checksum How to use checksums |
2d3899bab3025f280a986b1fb132d6df4d2ab7dae1037f6d175be98dc495c00b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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 Sep 8, 2026.
Transparency logRelease files / pratmo-0.3.1-cp39-abi3-win_amd64.whl
| Download URL | pratmo-0.3.1-cp39-abi3-win_amd64.whl |
|---|---|
| Size | 887.2 kB |
| Tags | CPython 3.9 Windows x86-64 abi3 |
|
SHA-256 checksum How to use checksums |
0b0b28f8d39a1c6edc136401e7c75c5ae7ec3f5f9342b6583e2f6c45b952ea83
|
|
BLAKE2b-256 checksum How to use checksums |
1947998da9b864d9cffc63d65ca020c82bc4bd68873df46ce24a5553b3803a78
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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 Sep 8, 2026.
Transparency logRelease files / pratmo-0.3.1-cp39-abi3-win32.whl
| Download URL | pratmo-0.3.1-cp39-abi3-win32.whl |
|---|---|
| Size | 847.6 kB |
| Tags | CPython 3.9 Windows x86-32 abi3 |
|
SHA-256 checksum How to use checksums |
c7f63b6813cf1e3bfa1ebead225c86a821e8f4ea1b2e294b138859cc0be450f8
|
|
BLAKE2b-256 checksum How to use checksums |
598f45f0fc1802218c36d1321e8455366a41c46cdf469d9d272a2b871a9aa8b5
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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 Sep 8, 2026.
Transparency logRelease files / pratmo-0.3.1-cp39-abi3-musllinux_1_2_x86_64.whl
| Download URL | pratmo-0.3.1-cp39-abi3-musllinux_1_2_x86_64.whl |
|---|---|
| Size | 1.3 MB |
| Tags | CPython 3.9 Linux musl 1.2+ x86-64 abi3 |
|
SHA-256 checksum How to use checksums |
d624a598fc20094dc4eac24c9f002859b5f8ce3ae3e185b8aeaa9a28b00b806b
|
|
BLAKE2b-256 checksum How to use checksums |
98e8b9cea8a8199dbf0489a38aceb8108e645ed1fced18beb8340532a9e178ae
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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 Sep 8, 2026.
Transparency logRelease files / pratmo-0.3.1-cp39-abi3-musllinux_1_2_i686.whl
| Download URL | pratmo-0.3.1-cp39-abi3-musllinux_1_2_i686.whl |
|---|---|
| Size | 1.3 MB |
| Tags | CPython 3.9 Linux musl 1.2+ x86-32 abi3 |
|
SHA-256 checksum How to use checksums |
c51ad22d9dbc8275287d0a10bd9b2a6562810e3cda817e5cc33d5ccf01125f6c
|
|
BLAKE2b-256 checksum How to use checksums |
abd93b7bae3fbce28ebad3575ddf524dc4ec0209af32f7acdfbb66eb89367bde
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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 Sep 8, 2026.
Transparency logRelease files / pratmo-0.3.1-cp39-abi3-musllinux_1_2_armv7l.whl
| Download URL | pratmo-0.3.1-cp39-abi3-musllinux_1_2_armv7l.whl |
|---|---|
| Size | 1.4 MB |
| Tags | CPython 3.9 Linux musl 1.2+ ARMv7l abi3 |
|
SHA-256 checksum How to use checksums |
0840e45797e4fca97067c9be6086e1e64a256fcf74ed4b2a195f9898f7a23eac
|
|
BLAKE2b-256 checksum How to use checksums |
f6aa8af0d2ac29d53c288ff337f89be517b07080443e793761dfedb60600948d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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 Sep 8, 2026.
Transparency logRelease files / pratmo-0.3.1-cp39-abi3-musllinux_1_2_aarch64.whl
| Download URL | pratmo-0.3.1-cp39-abi3-musllinux_1_2_aarch64.whl |
|---|---|
| Size | 1.3 MB |
| Tags | CPython 3.9 Linux musl 1.2+ ARM64 abi3 |
|
SHA-256 checksum How to use checksums |
e9e66240fc3b346c80f5438b3c8f22bc7e27c7d3b0ca29036a33dfb269ca33bc
|
|
BLAKE2b-256 checksum How to use checksums |
c507ea06cc71454af4c4072897a0595a80a592f5604e5909c014e2891b959412
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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 Sep 8, 2026.
Transparency logRelease files / pratmo-0.3.1-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
| Download URL | pratmo-0.3.1-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl |
|---|---|
| Size | 1.1 MB |
| Tags | CPython 3.9 Linux glibc 2.17+ x86-64 abi3 |
|
SHA-256 checksum How to use checksums |
6f83717939d7c0bf5afdafc40e0b3a428bff1aa86a792ac1f8d1857513ee8167
|
|
BLAKE2b-256 checksum How to use checksums |
5d9119dd24ec64476d7840587c7c0cf13665d5bfdad9fbe41268981135e9e11f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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 Sep 8, 2026.
Transparency logRelease files / pratmo-0.3.1-cp39-abi3-manylinux_2_17_s390x.manylinux2014_s390x.whl
| Download URL | pratmo-0.3.1-cp39-abi3-manylinux_2_17_s390x.manylinux2014_s390x.whl |
|---|---|
| Size | 1.1 MB |
| Tags | CPython 3.9 Linux glibc 2.17+ IBM System/390x abi3 |
|
SHA-256 checksum How to use checksums |
19bb65bf4bac38f01763dcf80033416db15a9e05b5476607983915e1088c2396
|
|
BLAKE2b-256 checksum How to use checksums |
539996761f1abfc1581bbf74fca4c71c94c5c79bad9182ae5a59af534434fc81
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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 Sep 8, 2026.
Transparency logRelease files / pratmo-0.3.1-cp39-abi3-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl
| Download URL | pratmo-0.3.1-cp39-abi3-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl |
|---|---|
| Size | 1.2 MB |
| Tags | CPython 3.9 Linux glibc 2.17+ PowerPC 64-le abi3 |
|
SHA-256 checksum How to use checksums |
39191a7bd69b0dc7ffb32e778b68fab44f3c9b5ff7f601cb31ac9c37898d9891
|
|
BLAKE2b-256 checksum How to use checksums |
4dde888b0b08ac7ec64588716cda7e7865e398d5413b3a9b1259d5d6b9c1ee39
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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 Sep 8, 2026.
Transparency logRelease files / pratmo-0.3.1-cp39-abi3-manylinux_2_17_i686.manylinux2014_i686.whl
| Download URL | pratmo-0.3.1-cp39-abi3-manylinux_2_17_i686.manylinux2014_i686.whl |
|---|---|
| Size | 1.1 MB |
| Tags | CPython 3.9 Linux glibc 2.17+ x86-32 abi3 |
|
SHA-256 checksum How to use checksums |
da72b4c1bda88e87f0ebbd79e73fbfe361f89ab78c76ad909798339fead5cd39
|
|
BLAKE2b-256 checksum How to use checksums |
a2fd5a8ab1c54b554f93cbf475877fc2c95580754315429903adf583a7860e0f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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 Sep 8, 2026.
Transparency logRelease files / pratmo-0.3.1-cp39-abi3-manylinux_2_17_armv7l.manylinux2014_armv7l.whl
| Download URL | pratmo-0.3.1-cp39-abi3-manylinux_2_17_armv7l.manylinux2014_armv7l.whl |
|---|---|
| Size | 1.1 MB |
| Tags | CPython 3.9 Linux glibc 2.17+ ARMv7l abi3 |
|
SHA-256 checksum How to use checksums |
c552a686328adf7c71db9a24bb75362379b730689a69725424f58a100bc238c7
|
|
BLAKE2b-256 checksum How to use checksums |
32512b05faff61c6e4ec1921f3daf1697c7e1fabd786333c91dffc595261815a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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 Sep 8, 2026.
Transparency logRelease files / pratmo-0.3.1-cp39-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
| Download URL | pratmo-0.3.1-cp39-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl |
|---|---|
| Size | 1.1 MB |
| Tags | CPython 3.9 Linux glibc 2.17+ ARM64 abi3 |
|
SHA-256 checksum How to use checksums |
818c51f3b1cc5b7ad8dea3403aa13ef04e919d28f8d091208ac4cfc9111b5dfd
|
|
BLAKE2b-256 checksum How to use checksums |
f77f61c3b20715226ff33ebb0089a70af925c9a436b9997ab8191c0822d71f66
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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 Sep 8, 2026.
Transparency logRelease files / pratmo-0.3.1-cp39-abi3-macosx_11_0_arm64.whl
| Download URL | pratmo-0.3.1-cp39-abi3-macosx_11_0_arm64.whl |
|---|---|
| Size | 1.0 MB |
| Tags | CPython 3.9 abi3 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
912c512370d8b2805e499d5f262dad6b38ddc222f99b89e3c9587291822f54dd
|
|
BLAKE2b-256 checksum How to use checksums |
49aedb6326c7222179d07d599cc4170bf296c77078d4d068ebcfb8b39fb9ceb8
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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 Sep 8, 2026.
Transparency logRelease files / pratmo-0.3.1-cp39-abi3-macosx_10_12_x86_64.whl
| Download URL | pratmo-0.3.1-cp39-abi3-macosx_10_12_x86_64.whl |
|---|---|
| Size | 1.0 MB |
| Tags | CPython 3.9 abi3 macOS 10.12+ x86-64 |
|
SHA-256 checksum How to use checksums |
cba901e3bad53a21799b2158519be150d5ad1eca06d670341b96dfc1faa8771c
|
|
BLAKE2b-256 checksum How to use checksums |
4202dd0791c162719227176811c4994db97185782e70013e0021d46e031b93cc
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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 Sep 8, 2026.
Transparency log