lowtran

授权协议 MIT License
开发语言
所属分类 应用工具、 科研计算工具
软件类型 开源软件
地区 不详
投 递 者 马弘益
操作系统 跨平台
开源组织
适用人群 未知
 软件概览

Lowtran in Python

Actions StatusActions Status

LOWTRAN7 atmospheric absorption extinction model.Updated by Michael Hirsch to be platform independent and easily accessible from Python ≥ 3.6 andMatlab.

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, simple N-D array data is passed out, with appropriate metadata.

Gallery

See below for how to make these examples.

Install

You will need a Fortran compiler.gfortran is one suitable compiler.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.

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

    • Linux: apt install gfortran
    • Mac: brew install gcc
    • Windows use MSYS2 or MinGW to get Gfortran.Windows only: from Powershell:
    echo "[build]`ncompiler=mingw32" | Out-File -Encoding ASCII ~/pydistutils.cfg

    Note: Cygwin is essentially obsolete due to Windows Subsystem for Linux. Cygwin is broken for Numpy and Gfortran and general.

  2. Install Python Lowtran code

    pip install -e .

Examples

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

We present examples of:

Matlab

Matlab users can seamlessly access Python modules, as demonstrated inRunLowtran.m andlowtran_transmission.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 from the lowtran/ directory:

    runtests('tests')

Notes

LOWTRAN7User manualRefer 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.
  • 最近从本网站下载了Lowtran7及其使用说明,尝试着使用了一下,遇到了如下问题,希望有大神可以不吝赐教,谢谢! 1、边界温度和IM无法输入 2、选择大气模式为7(用户输入),且此时的IM为1,为什么在Card2C1(子卡2C的子卡)中不能自定义数据输入? 3、大气层数(ML)的意义是什么?一般如何设置? 4、大气廓线(M1-M6)可以从0调到6,这里的0-6又代表什么? 5、当运行完成一次后,如

相关阅读

相关文章

相关问答

相关文档