Skip to main content

pyRadtran

CI PyPI License Docs

A complete Python wrapper for libRadtran radiative transfer simulations, built on Pydantic for validation and xarray for output.

Prerequisites

This library is a Python wrapper around libRadtran. You must install libRadtran (Fortran binary + data files) separately before using pyRadtran.

  1. Install libRadtran: Follow the official installation guide or use a package manager:

    • conda: conda install -c conda-forge libradtran
    • apt (Debian/Ubuntu): sudo apt install libradtran
    • Source: Download from libradtran.org and compile with make
  2. Set the data path: Ensure the libRadtran data directory is available. You will pass it to Runner.execute(...) via the data_path argument (e.g. /usr/local/share/libRadtran/data).

Installation

pip install pyradtran

With optional plotting support:

pip install pyradtran[plot]

For development:

git clone https://github.com/openEarthModelling/pyRadtran.git
cd pyRadtran
pip install -e ".[dev]"

Quick Start

from pyradtran import Scene, Runner

scene = (
    Scene()
    .set_atmosphere(profile="us", altitude=2.663)
    .set_source_solar(sza=30.0)
    .set_wavelength(250.0, 1200.0)
    .set_solver(method="disort", streams=16)
    .set_output(quantities=["lambda", "edir"], quantity="transmittance")
)

result = Runner.execute(scene, data_path="/usr/local/share/libRadtran/data")
result.edir.plot()

See the documentation for more examples, including aerosol configurations, 3D scenes, and satellite simulations.

Key Features

  • Fluent Scene Builder — configure atmospheres, sources, wavelengths, solvers, and aerosols through a chainable API.
  • Aerosol Modelling — OPAC presets, custom OPAC, external aerosol files, and composite aerosols with Mie scattering.
  • Convenience Functions — pre-configured setups for 3D, cloudy, lidar, polarized, satellite, solar, and thermal simulations.
  • Type-Safe — built on Pydantic v2 for runtime validation and excellent IDE autocompletion.
  • Typed — ships py.typed for full type-checker support.

Documentation

Full documentation is hosted on GitHub Pages, including API reference, tutorials, and example notebooks.

Contributing

Contributions are welcome! Please see CONTRIBUTING.md for guidelines on development setup, testing, and submitting pull requests.

License

This project is licensed under the MIT License.

Note: pyRadtran calls the libRadtran binary at runtime. libRadtran is licensed under the GNU GPL v2. Because pyRadtran interacts with libRadtran as a separate program (via subprocess), the pyRadtran code itself is not considered a derivative work under the GPL and is released under the MIT license. Users who use pyRadtran must comply with both the MIT terms and the libRadtran GPL terms.

Citation

If you use pyRadtran in your research, please cite it. A CITATION.cff file is included in this repository for your convenience.

Metadata

Release files for pyradtran 0.1.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 pyradtran 0.1.0
File Size Uploaded Provenance Actions
pyradtran-0.1.0.tar.gz 64.0 kB With provenance Details for pyradtran-0.1.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for pyradtran 0.1.0
File Interpreter ABI Platform Actions
pyradtran-0.1.0-py3-none-any.whl Python 3 none any Details for pyradtran-0.1.0-py3-none-any.whl

Total release size: 117.9 kB

Release files / pyradtran-0.1.0.tar.gz

Download URL pyradtran-0.1.0.tar.gz
Size 64.0 kB
Tags Source
SHA-256 checksum
How to use checksums
843804814e8e5ffdeb6965aac1b5e4f1c38ee8879a2451fb1ade07726a45d228
BLAKE2b-256 checksum
How to use checksums
0bd930bf67655d8757adf19c0305e2e7ba42c036c124ac39a7d135e3a99b9356
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

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 May 12, 2026.

Transparency log

Release files / pyradtran-0.1.0-py3-none-any.whl

Download URL pyradtran-0.1.0-py3-none-any.whl
Size 53.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
53ae02e26f2006b3d3a6bdec438088b8fb33bc8df74ddb2f8da84273646bdfdd
BLAKE2b-256 checksum
How to use checksums
d54270b5e7e7226bba36220b7bcb5e5c510b475319aaa2d8dac0143d8a10b543
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

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 May 12, 2026.

Transparency log

Security for pyradtran 0.1.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

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for pyradtran-0.1.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 May 12, 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.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files Full provenance

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