Skip to main content

A Radiative Transfer Python Library (non-scattering)

docker-image-ci run-python-tests build-docs-action

Project Status: WIP – Initial development is in progress, but there has not yet been a stable, usable release suitable for the public. PyPI Latest Release GitHub release (latest by date)

Last commit Last commit since

codecov Codacy Badge

license DOI

PyRTlib is a Python package, for non-scattering line-by-line microwave RT simulations. PyRTlib is a user-friendly tool for computing down and up-welling brightness temperatures and related quantities (e.g., atmospheric absorption, optical depth, opacity) in Python.

spectrum

Plotting of nadir upwelling $\Delta T_b$ using the last two absorption models available in PyRTlib for six reference atmosphere climatology.

spectrum

Installation

Use pip package to install quicly the pyrtlib library. See installation instructions for more info on how instaling pyrtlib.

   $ pip install pyrtlib

Example

For examples of how to use pyrtlib see the examples gallery. Code can be downloaded both as python script or notebook file.

Performing calculation of upwelling brightness temperature.

   from pyrtlib.tb_spectrum import TbCloudRTE
   from pyrtlib.climatology import AtmosphericProfiles as atmp
   from pyrtlib.utils import mr2rh, ppmv2gkg

Atmospheric profile definition:

   z, p, _, t, md = atmp.gl_atm(atmp.MIDLATITUDE_SUMMER)

Units conversion:

   gkg = ppmv2gkg(md[:, atmp.H2O], atmp.H2O)

Relative humidity of $H_2O$ (water vapor)

   rh = mr2rh(p, t, gkg)[0] / 100

Deifinition of angles and frequencies:

   ang = np.array([90.])
   frq = np.arange(20, 1001, 1)

Initialize parameters for main execution:

   rte = TbCloudRTE(z, p, t, rh, frq, ang)

Set absorption model:

   rte.init_absmdl('R22SD')

Execute model by computing upwelling radiances:

   df = rte.execute()
   df.tbtotal
   0      293.119811
   1      292.538088
   2      291.736672
   3      291.913658
   4      292.493971
            ...    
   976    230.179993
   977    231.435965
   978    232.592915
   979    233.666322
   980    234.667522
   Name: tbtotal, Length: 981, dtype: float64

My first run with PyRTlib

You can get started with PyRTlib by installing and executing the first radiative transfer calculation from the following Colab Notebook Open In Colab

Cite as

Larosa, S., Cimini, D., Gallucci, D., Nilo, S. T., and Romano, F.: PyRTlib: an educational Python-based library for non-scattering atmospheric microwave radiative transfer computations, Geosci. Model Dev., 17, 2053–2076, https://doi.org/10.5194/gmd-17-2053-2024, 2024.

Larosa, S., Cimini, D., Gallucci, D., Nilo, S. T., & Romano, F. (2024). PyRTlib: a python package for non-scattering line-by-line microwave Radiative Transfer simulations. (Computer software). https://doi.org/10.5281/zenodo.8219145

Contributors

Metadata

Release files for pyrtlib 1.2.1

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

Source distribution (sdist)

Source distribution for pyrtlib 1.2.1
File Size Uploaded Provenance Actions
pyrtlib-1.2.1.tar.gz 246.3 kB Without provenance Details for pyrtlib-1.2.1.tar.gz

Built distribution (wheel)

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

Total release size: 499.1 kB

Release files / pyrtlib-1.2.1.tar.gz

Download URL pyrtlib-1.2.1.tar.gz
Size 246.3 kB
Tags Source
SHA-256 checksum
How to use checksums
798846119e8ba153cfd15cd587cf638b0ccb95dc19dd1bc680f5aed477ec349c
BLAKE2b-256 checksum
How to use checksums
6473db4f76c239cd88752b6d0d30bf9b7cc0bfa9f2ea5839e93d92e89d228d8b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.16

Release files / pyrtlib-1.2.1-py3-none-any.whl

Download URL pyrtlib-1.2.1-py3-none-any.whl
Size 252.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
2954a6f8793a3da40dde2ac3a560cab378aefdb88f6ab05795ad2053eafc049d
BLAKE2b-256 checksum
How to use checksums
533e6be1a5e9de2be9aa2887789a733e8d802c5efc95b30fc75ff1cf5e5f106c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.16

Security for pyrtlib 1.2.1

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.

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