Skip to main content
Help us improve PyPI by participating in user testing. All experience levels needed!

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

Project description

https://travis-ci.org/scivision/lowtran.svg?branch=master https://coveralls.io/repos/github/scivision/lowtran/badge.svg?branch=master https://ci.appveyor.com/api/projects/status/85epbcxvbgxnkp62?svg=true Maintainability

Lowtran

LOWTRAN7 atmospheric absportion extinction model. Updated by Michael Hirsch to be platform independent and easily accessible from Python.

The main LOWTRAN program has been made 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 N-D array data is passed out, with all approprirate metadata.

Python API Author:
 Michael Hirsch, Ph.D.
License:MIT

Install

See this page if you have errors on Fortran compilation.

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

If you don’t already have Numpy, python -m pip install numpy and then:

python -m pip install -e .

Examples

In these examples, you can write to HDF5 with the -o option. If you have unused (singleton) dimensions, use .squeeze() on the output array.

We present examples of:

  • ground-to-space transmittance: TransmittanceGround2Space.py

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

    "Lowtran7 Scatter Radiance"
  • sun-to-observer irradiance: SolarIrradiance.py

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

    "Lowtran7 Solar Radiance"
  • observer-to-observer transmittance with custom Pressure, Temperature and partial pressure for 12 species UserDataHorizontalTransmittance.py

  • observer-to-observer transmittance HorizontalTransmittance.py

    "Lowtran7 Horizontal Path transmittance"

Notes

LOWTRAN7 User manual – you may refer to this to understand what parameters I’ve set to default. Currently I don’t have any aerosols enabled for example, though it’s trivial to add.

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 I had previously implemented my own filter function directly in Python.
  • LOWSCAN spectral sampling (scanning) program in reference/lowtran7.13.f was not connected as I had no need for coarser spectral resolution.

Fortran (optional)

This is not necessary for normal users:

cd bin
cmake ..
make
make test

should generate this text output.

Windows f2py

(this is handled automatically by setup.py, noted here for debugging)

Yes, even though you’re using a 64-bit compiler:

f2py --compiler=mingw32 -m lowtran7 -c lowtran7.f

Tested on Windows with MinGW.

Windows Fortran compile

Normal users don’t need to do this. I suggest that you instead use Cygwin or Windows Subsytem for Linux:

cd bin
cmake -G "MinGW Makefiles" ..
make
make test

Project details


Release history Release notifications

This version
History Node

2.3.2

History Node

2.3.1

History Node

2.3.0

History Node

2.3.0a0

History Node

2.2.2

History Node

2.2.2a0

History Node

2.2.1

History Node

2.2.0

History Node

2.1.1

History Node

2.1.0

History Node

2.0.0

History Node

0.5

Download files

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

Filename, size & hash SHA256 hash help File type Python version Upload date
lowtran-2.3.2.tar.gz (846.1 kB) Copy SHA256 hash SHA256 Source None Mar 21, 2018

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging CloudAMQP CloudAMQP RabbitMQ AWS AWS Cloud computing Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page