Skip to main content

pyrtlib - Radiative Transfer library

Project description

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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pyrtlib-1.2.0.tar.gz (241.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pyrtlib-1.2.0-py3-none-any.whl (251.8 kB view details)

Uploaded Python 3

File details

Details for the file pyrtlib-1.2.0.tar.gz.

File metadata

  • Download URL: pyrtlib-1.2.0.tar.gz
  • Upload date:
  • Size: 241.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for pyrtlib-1.2.0.tar.gz
Algorithm Hash digest
SHA256 5c85c38fc14acbb53b098544f40614eb0c621e30dbd2a61fce1bdad3db401232
MD5 dbfdd4cc4a38114b155a233876044288
BLAKE2b-256 1d79793a6df197449da0f20a3eeb3e4a988cc7e88f94746de521e308bdbebb2e

See more details on using hashes here.

File details

Details for the file pyrtlib-1.2.0-py3-none-any.whl.

File metadata

  • Download URL: pyrtlib-1.2.0-py3-none-any.whl
  • Upload date:
  • Size: 251.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for pyrtlib-1.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 3a5e1c49f7aec5490914c3e728b7c418dff3311a650981f0063ad34c01b8a40b
MD5 6f05c2d403d5a13ea62e0c264f82f23e
BLAKE2b-256 d841c6d158fe887527d256c687bfc6d78e82640be9550be5415b265d7d653d17

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page