SkillAgentSearch skills...

LBLRTM

Line-By-Line Radiative Transfer Model by Atmospheric and Environmental Research

Install / Use

/learn @AER-RC/LBLRTM
About this skill

Quality Score

0/100

Supported Platforms

Universal

README

LBLRTM


Contents

  1. Introduction
  2. Cloning the Latest Release
  3. LBLRTM and Docker
  4. General LNFL/LBLRTM File Information
    1. Platforms on which LBLRTM can be run
    2. Issues relating to unformatted files on UNIX and LINUX systems
    3. LNFL/LBLRTM Naming Convention
    4. LNFL/LBLRTM Input File (TAPE5) Format
    5. LBLRTM Output File Format
  5. Instructions and Tips for Running LNFL
    1. Input files for LNFL
    2. Output files for LNFL
    3. Sequence for running LNFL
  6. Instructions and Tips for Compiling and Running LBLRTM
    1. Required input files for LBLRTM
    2. Layer numbering scheme
    3. Output files for LBLRTM
    4. Sequence for running LBLRTM
  7. Examples
  8. Frequently Asked Questions

Introduction <a name="intro"></a>

LBLRTM (Line-By-Line Radiative Transfer Model) is an accurate and efficient line-by-line radiative transfer model derived from the Fast Atmospheric Signature Code (FASCODE). LBLRTM has been, and continues to be, extensively validated against atmospheric radiance spectra from the ultraviolet to the sub-millimeter.

The HITRAN database provides the basis for the line parameters used in LBLRTM. These line parameters, as well as additional line parameters from other sources, are extracted for use in LBLRTM by a line file creation program called LNFL. A line parameter database built from HITRAN and suitable for use with LNFL can be downloaded with the AER Line File retrieval code or directory from the Zenodo repository.

LBLRTM uses the line parameters and MT_CKD continuum in its calculations. The models and data are thus linked. For the latest release, the relationships are:

| LBLRTM Release | MT_CKD Release | Line File | | :---: | :---: | :---: | | v12.17 | 4.3 | v3.8.1 |

Note that building LBLRTM_v12.14 and later requires using the netCDF libraries and setting the path to their location in the file addlibs.inc in the /build directory.

If any build or run issues occur, please create an issue or contact the AER-RC Group.

For more, please see the Wiki page

Cloning the Latest Release <a name="cloning"></a>

Assuming the output directory should be LBLRTM and that the user has created an SSH key (we use RSA):

git clone --recursive git@github.com:AER-RC/LBLRTM.git

Alternatively, users that have not setup an SSH key but have created a personal access token can use the HTTPS protocol:

git clone --recursive https://github.com/AER-RC/LBLRTM.git

--recursive is important, because this repository is linked with our common FORTRAN modules repository that are required in the model builds. The cross section database is also added as a submodule (it is not required for all model runs). If this keyword is forgotten, one can do:

git submodule init
git submodule update

in the LBLRTM directory.

Currently, the latest release is LBLRTM v12.17, and it is recommended that this be the version that users clone and checkout (rather than the master branch). To do this, one needs to simply checkout the v12.17 tag:

git checkout tags/v12.17

No releases before v12.9 are available via GitHub, but they can be requested by contacting the AER-RC Group. For information on previous releases, please visit the What's New Wiki page.

Instead of cloning, users can also download an LBLRTM tarball and unpack it:

tar xvf lblrtm_v12.17.tar.gz
mv LBLRTM-12.17/ lblrtm

Though not necessary, the move to lblrtm is for consistency with previous release packages and the associated documentation.

LBLRTM and Docker <a name="docker"></a>

More doc to come, but see the GitHub package page for Docker image pull directions. And to run:

docker pull docker.pkg.github.com/aer-rc/lblrtm/lblrtm:latest

docker tag docker.pkg.github.com/aer-rc/lblrtm/lblrtm:latest lblrtm

docker run -it --rm -v ~/Work/RC/LBLRTM/LBL_In:/LBLRTM/LBLRTM_In -v ~/Work/RC/LBLRTM/LBL_Out:/LBLRTM/LBLRTM_Out lblrtm

Volume mounts are necessary to provide LBLRTM inputs and for the user to have access to the outputs. Currently, the TAPE3, TAPE5, and cross section database are assumed to be in the LBLRTM input directory. EMISSIVITY and REFLECTIVITY could conceivably work with the correct volume mounts. Cross sections will be their own submodule at some point. The LBLRTM input file naming convention is assumed.

General LNFL/LBLRTM File Information <a name="general"></a>

Platforms on which LBLRTM can be run <a name="platforms"></a>

It is recommended that LNFL and LBLRTM be compiled in Fortran 90. LBLRTM has previously been run on DEC alpha, Cray, MS-DOS, and HP platforms.

Some users have ported the code to the Windows/DOS environment. AER presently does not officially support this implementation; however, the following description of how LBLRTM was used in XP by a user (Christopher Rice, Air Force Institute of Technology [AFIT]):

  • Obtain the newest Intel Fortran Compiler (v 9.1) and Visual Studio.net 2003.
  • Install visual studio .net 2003.
  • Install Intel Fortran Compiler (Fortran compiler options will appear in MSVS 2003 after the Intel Fortran Compiler is installed.
  • Decompress source codes for LBLRTM and LNFL into their appropriate folders.
  • Compile LNFL:
    • Open Visual Studio 2003.
    • Open a new project.
    • Select “Intel Fortran Projects” under “Project Types” and choose “Console Application” from “Templates”.
    • Name this project accordingly. (e.g., LNFL_Exe)
    • After the project is created a “Solution Explorer” will show the solution named as above. Right click on “Source Files” and add the following files:
      • lnfl.f90
      • util_dos.f90
    • Note that the util_linux_intel makefile can be used as a reference for the files to be included, replacing util_linux.f90 with the file util_dos.f90.
    • Make sure the compiler is set to “release” NOT “debug”.
    • Build the Project.
    • On successful build find the .exe in the “release” folder where the project is saved
  • Compile LBLRTM:
    • Open Visual Studio 2003.
    • Open a new project.
    • Select “Intel Fortran Projects” under “Project Types” and choose “Console Application” from “Templates”.
    • Name this project accordingly. (e.g., LBLRTM_Exe)
    • After the project is created a “Solution Explorer” will show a solution named as above. Right click on “Source Files” and add the following files:
      • contnm.f90
      • fftscn.f90
      • lblatm.f90
      • lbldum.f90
      • lbllow.f90
      • lblrtm.f90
      • nonlte.f90
      • oprop.f90
      • pltlbl.f90
      • postsub.f90
      • solar.f90
      • testmm.f90
      • util_dos.f90
      • xmerge.f90
    • Note that the util_linux_intel makefile can be used as a reference for the files to be included, replacing util_linux.f90 with the file util_dos.f90.
    • Make sure the compiler is set to “release” NOT “debug” – LBLRTM will not operate correctly when compiled in “Debug” mode.
    • Build the Project.
    • On successful build find the exe in the “release” folder where the project is saved.
  • Use LNFL with TAPE5 to create TAPE3 as described in the documentation,
  • Use TAPE3 with LBLRTM to satisfy your requirements as described in documentation.

Issues relating to unformatted files on UNIX and LINUX systems <a name="unformatted"></a>

Unformatted files are often not compatible between systems due to differences in the way the bytes are written to the files (big-endian versus little-endian). Note that the byteswap option available with most compilers will not work with most LBLRTM unformatted output files because of the mixing of real and integer data within records.

LNFL/LBLRTM Naming Convention <a name="nomenclature"></a>

Specific information on the input/output files from LNFL and LBLRTM is located in their respective input files, lnfl_instructions and lblrtm_instructions, and the examples provided in the code tar files.

Most file names are given as TAPEx where x is a one- or two-digit number. The name is case-sensitive, and is uppercase. Tape numbers may be same for LNFL and LBLRTM but do not represent identical files. For example, the primary LNFL input file is TAPE5, and the primary LBLRTM input file is TAPE5. However, they have neither the same input information nor the same formatting. The instruction manual for each code details the input file information.

LNFL/LBLRTM Input File (TAPE5) Format <a name="tape5"></a>

The TAPE5 input files are read as formatted FORTRAN. As a consequence of the formatted read, any blank space will be read as "zero". Thus, one may leave blanks for most of the parameters and within the code they will default to an acceptable value.

Real numbers format input

Related Skills

View on GitHub
GitHub Stars101
CategoryEducation
Updated1d ago
Forks30

Languages

Fortran

Security Score

85/100

Audited on Apr 1, 2026

No findings