A curated list of open technology projects to sustain a stable climate, energy supply, biodiversity and natural resources.

lowtran

Atmospheric absorption extinction, scatter and irradiance model in Python and Matlab.
https://github.com/space-physics/lowtran

Category: Atmosphere
Sub Category: Radiative Transfer

Keywords

atmosphere atmospheric-modelling f2py fortran geoscience lowtran matlab matlab-python-interface python

Last synced: about 7 hours ago
JSON representation

Repository metadata

LOWTRAN atmospheric absorption extinction, scatter and irradiance model--in Python and Matlab

README.md

Lowtran in Python

Zenodo DOI
Actions Status
PyPi Download stats

LOWTRAN7 atmospheric absorption extinction model.
Updated to be platform independent and easily accessible from Python and
Matlab.

The main LOWTRAN program is accessible from Python by using direct memory transfers instead of the cumbersome and error-prone process of writing/reading text files.
xarray.Dataset high-performance, simple N-D array data is passed out, with appropriate metadata.

Gallery

See below for how to make these examples.

Lowtran7 absorption

Install

Lowtran requires a Fortran compiler and CMake.
We use f2py (part of numpy) to seamlessly use Fortran libraries from Python by special compilation of the Fortran library with auto-generated shim code.
For Python 3.12, make sure to install setuptools using pip, i.e., pip install setuptools and make sure meson is available on the system.

If a Fortran compiler is not already installed, install Gfortran:

  • Linux: apt install gfortran
  • Mac: brew install gcc
  • Windows: Windows Subsystem for Linux

Install Python Lowtran code

pip install -e .

Examples

In these examples, optionally write to HDF5 with the -o option.

We present Python examples of:

  • ground-to-space transmittance: TransmittanceGround2Space.py

    Lowtran Transmission

  • sun-to-observer scattered radiance (why the sky is blue): ScatterRadiance.py

    Lowtran Scatter Radiance

  • sun-to-observer irradiance: SolarIrradiance.py

    Lowtran Solar Irradiance

  • observer-to-observer solar single-scattering solar radiance (up-going) with custom Pressure, Temperature and partial pressure for 12 species: UserDataHorizontalRadiance.py
    Lowtran Solar Irradiance

  • observer-to-observer transmittance with custom Pressure, Temperature and partial pressure for 12 species: UserDataHorizontalTransmittance.py

  • observer-to-observer transmittance: HorizontalTransmittance.py

    Lowtran Horizontal Path transmittance

Matlab

Matlab users can seamlessly access Python modules, as demonstrated in
RunLowtran.m.

Here's what's you'll need:

  1. Setup Python ↔ Matlab interface.

  2. Install Lowtran in Python as at the top of this Readme.

  3. From Matlab, verify everything is working by:

    runtests('lowtran')
    

Notes

LOWTRAN7
User manual
Refer to this to understand what parameters are set to default.
Currently I don't have any aerosols enabled for example, though it's possible to add them into the code.

Right now a lot of configuration features aren't implemented, please request those you want.

Reference

  • Original 1994 Lowtran7 Code
  • LOWFIL program in reference/lowtran7.10.f was not connected as we had previously implemented a filter function directly in Python.
  • LOWSCAN spectral sampling (scanning) program in reference/lowtran7.13.f was not connected as we had no need for coarser spectral resolution.

Owner metadata


GitHub Events

Total
Last Year

Committers metadata

Last synced: 6 days ago

Total Commits: 380
Total Committers: 3
Avg Commits per committer: 126.667
Development Distribution Score (DDS): 0.013

Commits in past year: 3
Committers in past year: 2
Avg Commits per committer in past year: 1.5
Development Distribution Score (DDS) in past year: 0.333

Name Email Commits
scivision s****n 375
scivision s****n@n****m 4
Jonas Krimmer 3****r 1

Committer domains:


Issue and Pull Request metadata

Last synced: 1 day ago

Total issues: 25
Total pull requests: 2
Average time to close issues: over 1 year
Average time to close pull requests: 5 days
Total issue authors: 20
Total pull request authors: 2
Average comments per issue: 1.16
Average comments per pull request: 0.0
Merged pull request: 1
Bot issues: 0
Bot pull requests: 0

Past year issues: 1
Past year pull requests: 0
Past year average time to close issues: 40 minutes
Past year average time to close pull requests: N/A
Past year issue authors: 1
Past year pull request authors: 0
Past year average comments per issue: 0.0
Past year average comments per pull request: 0
Past year merged pull request: 0
Past year bot issues: 0
Past year bot pull requests: 0

More stats: https://issues.ecosyste.ms/repositories/lookup?url=https://github.com/space-physics/lowtran

Top Issue Authors

  • aeropung (3)
  • OctagonHex (3)
  • aschneid42 (2)
  • chrismolli (1)
  • SmithPeng (1)
  • drhirsch (1)
  • Caxec (1)
  • bpdavis86 (1)
  • justapythonuser (1)
  • brian-rose (1)
  • jimparker96313 (1)
  • shoste120 (1)
  • SanaShaukat (1)
  • thirtyUp (1)
  • jimustafa (1)

Top Pull Request Authors

  • WhiteChimney (1)
  • jkrimmer (1)

Top Issue Labels

  • enhancement (3)
  • question (2)

Top Pull Request Labels


Package metadata

pypi.org: lowtran

Model of Earth atmosphere absorption and transmission vs. wavelength and location.

  • Homepage:
  • Documentation: https://lowtran.readthedocs.io/
  • Licenses: mit
  • Latest release: 3.1.0 (published about 2 years ago)
  • Last Synced: 2025-04-25T12:30:57.158Z (1 day ago)
  • Versions: 19
  • Dependent Packages: 0
  • Dependent Repositories: 1
  • Downloads: 481 Last month
  • Docker Downloads: 0
  • Rankings:
    • Docker downloads count: 4.203%
    • Dependent packages count: 10.002%
    • Average: 15.106%
    • Dependent repos count: 21.718%
    • Downloads: 24.499%
  • Maintainers (1)

Dependencies

.github/workflows/ci.yml actions
  • actions/checkout v3 composite
  • actions/setup-python v4 composite
  • msys2/setup-msys2 v2 composite
pyproject.toml pypi
  • numpy *
  • python-dateutil *
  • xarray *

Score: 12.014827390715178