A complete Python wrapper for libRadtran radiative transfer
Project description
pyRadtran
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.
-
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
- conda:
-
Set the data path: Ensure the libRadtran data directory is available. You will pass it to
Runner.execute(...)via thedata_pathargument (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.typedfor 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.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file pyradtran-0.1.0.tar.gz.
File metadata
- Download URL: pyradtran-0.1.0.tar.gz
- Upload date:
- Size: 64.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
843804814e8e5ffdeb6965aac1b5e4f1c38ee8879a2451fb1ade07726a45d228
|
|
| MD5 |
38cc4c6d686afe62f23219a552da3de8
|
|
| BLAKE2b-256 |
0bd930bf67655d8757adf19c0305e2e7ba42c036c124ac39a7d135e3a99b9356
|
Provenance
The following attestation bundles were made for pyradtran-0.1.0.tar.gz:
Publisher:
publish.yml on openEarthModelling/pyRadtran
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pyradtran-0.1.0.tar.gz -
Subject digest:
843804814e8e5ffdeb6965aac1b5e4f1c38ee8879a2451fb1ade07726a45d228 - Sigstore transparency entry: 1517199309
- Sigstore integration time:
-
Permalink:
openEarthModelling/pyRadtran@31bfd2ac1113eefe5a6799dac881b6fb8aa7ad3f -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/openEarthModelling
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@31bfd2ac1113eefe5a6799dac881b6fb8aa7ad3f -
Trigger Event:
push
-
Statement type:
File details
Details for the file pyradtran-0.1.0-py3-none-any.whl.
File metadata
- Download URL: pyradtran-0.1.0-py3-none-any.whl
- Upload date:
- Size: 53.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
53ae02e26f2006b3d3a6bdec438088b8fb33bc8df74ddb2f8da84273646bdfdd
|
|
| MD5 |
a32bda884381eb667486886f4d23e71c
|
|
| BLAKE2b-256 |
d54270b5e7e7226bba36220b7bcb5e5c510b475319aaa2d8dac0143d8a10b543
|
Provenance
The following attestation bundles were made for pyradtran-0.1.0-py3-none-any.whl:
Publisher:
publish.yml on openEarthModelling/pyRadtran
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pyradtran-0.1.0-py3-none-any.whl -
Subject digest:
53ae02e26f2006b3d3a6bdec438088b8fb33bc8df74ddb2f8da84273646bdfdd - Sigstore transparency entry: 1517199718
- Sigstore integration time:
-
Permalink:
openEarthModelling/pyRadtran@31bfd2ac1113eefe5a6799dac881b6fb8aa7ad3f -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/openEarthModelling
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@31bfd2ac1113eefe5a6799dac881b6fb8aa7ad3f -
Trigger Event:
push
-
Statement type: