Home

Awesome

LNFL


Contents

  1. Cloning
  2. LNFL Docker Image
  3. Building LNFL
  4. Running LNFL

LNFL converts an ASCII line file parameter database (available at RTWeb) to the unformatted binary the LBLRTM expects as input. This is called a TAPE3.

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

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

Assuming the output directory should be LNFL:

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

--recursive is important, because this repository is linked with our common FORTRAN modules repository that are required in the model builds. If this keyword is forgotten, one can do:

git submodule init
git submodule update

in the LNFL directory.

Currently, the latest release is LNFL v3.2, 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 v3.2 tag:

git checkout tags/v3.2

No releases before v3.2 are available via GitHub, but they can be requested by emailing aer_lblrtm@aer.com. For information on previous releases, please visit the What's New Wiki page.

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

tar xvf lnfl_v3.2.tar.gz
mv LNFL-3.2/ lnfl

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

LNFL Docker Image <a name="docker"></a>

If users would like to bypass having to setup and build LNFL on their own and have Docker installed on their system, they can use the Docker Hub image for LNFL that the AER-RC group has made publicly available. Alternatively, the same image is available in the LNFL GitHub Packages. To run an LNFL container with the image (only one pull is necessary):

docker pull aerradclim/lnfl # from Docker Hub
docker tag aerradclim/lnfl lnfl

docker pull docker.pkg.github.com/aer-rc/lnfl/lnfl:latest # from GitHub
docker tag docker.pkg.github.com/aer-rc/lnfl/lnfl:latest lnfl

docker run --name lnfl --rm -v ~/Work/RC/TAPE5_2000-3250:/LNFL/TAPE5 -v ~/Work/RC/LNFL_output:/LNFL/LNFL_Out lnfl

Not all of the arguments in the previous code snippet are required. A simple docker run aerradclim/lnfl will suffice, but the user would not be providing any inputs or getting any outputs. Consequently, there are two "volume mounts" -- one for the only LNFL input (the TAPE5), and one for the outputs. The former is a single file, and the latter is a directory. In volume mounts, the path on the left side of the : is with respect to the "host" (i.e., the local machine of the user), and the path to the right of the : is the path inside the container. LNFL users should alter their host paths accordingly. Host paths should be absolute and not relative. The output directory should already exist on the host, otherwise it will be written as root and the files underneath it will only be accessible by root. BOTH VOLUME MOUNTS ARE NECESSARY TO RUN THE MODEL AND RETRIEVE ITS OUTPUT. The image name -- lnfl -- is the final argument in the call and is required.

The following are optional container arguments:

Building LNFL <a name="build"></a>

LNFL has been built extensively only in single precision. It is not recommended that users attempt to build in double precision. To start, descend into the build directory:

cd build
make -f make_lnfl $TARGET

The TARGET environment variable depends on the user's operating system, compiler, and desired precision. Available targets are:

TargetDescriptionCompiler
aixIBMsglIBM/AIX OS using IBM fortran,single precisionxlf90
linuxPGIsglLinux OS using PGI fortran,single precisionpgf90
linuxGNUsglLinux OS using GNU fortran,single precisiongfortran
linuxG95sglLinux OS using G95 fortran,single precisiong95
inuxINTELsglLinux OS using Intel fortran,single precisionifort
mingwGNUsglWindows unix shell environment using gfortran,single precisiongfortran
osxABSOFTsglMac OS_X using Absoft Pro fortran,singleprecisionf90
osxGNUsglMac OS_X using GNU fortran,singleprecisiongfortran
osxIBMsglMac OS_X using IBM XL fortran,singleprecisionxlf90
osxINTELsglMac OS_X using Intel fortran,single precisionifort
sunSUNsglSun/Solaris OS using Sun fortran,single precisionsunf90
sgiMIPSsglSGI/IRIX64 OS using MIPS fortran,single precisionf90

Running LNFL <a name="run"></a>

LNFL now accommodates the 160 character .par format adopted for HITRAN_2004. However, the default format for LNFL will remain the 100 character format. The rationale for this choice is that the vibrational data as stored in the 100 character format is more amenable to utilization in LBLRTM, particularly for LBLRTM Non-LTE calculation than that associated with the 160 character format for which the vibrational information had been expanded to facilitate association of the lines with the quantum mechanical vibrational designations.

The capability to accommodate the 160 character format is restricted to TAPE1. The TAPE2 files should be in 100 character format - you can generate this from the 160 character format by running LNFL with the 160 cahacter file as TAPE1, and then use the 100 character TAPE7 file that LNFL produces as the TAPE2 for the next run.

A few notes:

  1. To facilitate the change to HITRAN2004, some of the LNFL flags on Record 3 in older releases have been distributed to Records 3 and 4. On Record 3, the flags include those that are general for the LNFL run and those that are relevant to TAPE1. On Record 4, the flags include those relevant to TAPE2 only.

  2. The default for blocking has been changed. No blocking is now the default. Flags NBLK1 and NBLK2 are no longer necessary and are ignored.

  3. The writing of internally stored line coupling information to TAPE2 is no longer supported. Line coupling information may be included explicitly on TAPE1 or TAPE2 by the user.

  4. As of Dec. 2013, LNFL requires additional broadening parameter input files. These files are listed in the LNFL Inputs Section, and example files are included in the LNFL package. These files are only needed and used if the IBRD flag is set in the TAPE5.

  5. As of Jan. 2015, LNFL allows one to specify the name of the ASCII line file at the command line rather than having to link it to TAPE1. For example, if one wanted to use aer_v_3.6 as the ASCII line file, lnfl_v3.1_linux_pgi_sgl aer_v_3.6 could be used at the command line.

LNFL Inputs <a name="inputs"></a>

File NameDescription
TAPE1ASCII line file (e.g., HITRAN database)
TAPE2Supplemenatry ASCII Line File to be merged with TAPE1
TAPE5LNFL Input File
co2_co2_brd_paramCO<sub>2</sub> self broadening parameters
co2_h2o_brd_paramCO<sub>2</sub> transitions broadened by H<sub>2</sub>O
o2_h2o_brd_paramO<sub>2</sub> transitions broadened by H<sub>2</sub>O
wv_co2_brd_paramH<sub>2</sub>O transitions broadened by CO<sub>2</sub>
spd_dep_paramSpeed-dependent Voigt parameters

Special reduced microwave ASCII line files, corresponding to the old spectral_lines.dat of MonoRTM v4.2, are provided to be used as the TAPE1 inputs of MonoLNFL in the microwave. The calculational accuracy of these reduced line lists at any frequency between 0 and 899.4 GHz (0-30 cm<sup>-1</sup>) with respect to the corresponding full line list (aer_v_3.3) is:

A special reduced near-IR ASCII line file for the ASCENDS region (6300-6700 cm<sup>-1</sup>) containing the first 7 HITRAN molecules is also included (spectral_lines.dat.6300_6700.v5.0). These line parameters are consistent with aer_v_3.2 and aer_v_3.3 (which are identical for wavenumbers greater than 55 cm<sup>-1</sup>). See files headers and MonoRTM v5.0 release notes for more details.

Users who wish to run MonoRTM v5.0 in other spectral regions should use the full AER line file (aer_v_3.5), with a caution that the full line file can take a long time to run.

TAPE2 must be in older 100 character HITRAN format.

Note that LBLRTM ignores the speed dependence parameters, but they are used by MonoRTM v5.0 and later.

LNFL TAPE5 <a name="TAPE5"></a>

Record 1

Required (but ignored); 72 characters (formatted as 9 8-character strings, or 9A8) of user identification; think of this record as a documentation comment

Record 2

Required; Specifies the spectral range of the line file, with:

Variable NameColumn Number RangeString FormatNotes
v<sub>min</sub>1-10F10.3<ul><li>low wavenumber limit for the line file</li><li>should be 25 cm<sup>-1</sup> less than v<sub>1</sub> for LBLRTM calculation</li></ul>
v<sub>max</sub>11-20F10.3<ul><li>high wavenumber limit for the line file</li><li>should be 25 cm<sup>-1</sup> greater than v<sub>2</sub> for LBLRTM calculation</li></ul>

Record 3

Required; Specifies the molecules for which the line file is created and additional LNFL options

Variable NameColumn Number RangeString FormatNotes
MOLIND11-4747I1<ul><li>Molecular INDicator for Molecule M from line data on file TAPE1</li><li>0 molecule M is not selected, 1 molecule M is selected</li><li>See Available Species Table</li><li>Note that molecule number and column number are the same</li></ul>
HOLIND152-100A49<ul><li>HOLlerith INDicator to select general LNFL options and specific options for TAPE1</li><li>See LNFL Options Table</ul>

Available Molecular Species <a name="molecules"></a>

Molecule Number NSpecies Chemical FormulaMolecule Number NSpecies Chemical FormulaMolecule Number NSpecies Chemical FormulaMolecule Number NSpecies Chemical FormulaMolecule Number NSpecies Chemical FormulaMolecule Number NSpecies Chemical FormulaMolecule Number NSpecies Chemical Formula
1H<sub>2</sub>O2CO<sub>2</sub>3O<sub>3</sub>4N<sub>2</sub>O5CO6CH<sub>4</sub>7O<sub>2</sub>
8NO9SO<sub>2</sub>10NO<sub>2</sub>11NH<sub>3</sub>12HNO<sub>3</sub>13OH14HF
15HCl16HBr17HI18ClO19OCS20H<sub>2</sub>CO21HOCl
22N<sub>2</sub>23HCN24CH<sub>3</sub>Cl25H<sub>2</sub>O<sub>2</sub>26C<sub>2</sub>H<sub>2</sub>27C<sub>2</sub>H<sub>6</sub>28PH<sub>3</sub>
29COF<sub>2</sub>30SF<sub>6</sub>31H<sub>2</sub>S32HCOOH33HO<sub>2</sub>34O35ClONO<sub>2</sub>
36NO<sup>+</sup>37HOBr38C<sub>2</sub>H<sub>4</sub>39C<sub>3</sub>HOH40CH<sub>3</sub>Br41CH<sub>3</sub>CN42CF<sub>4</sub>
43C<sub>4</sub>H<sub>2</sub>44HC<sub>3</sub>N45H<sub>2</sub>46CS47SO<sub>3</sub>

LNFL Options <a name="options1"></a>

OptionDescription
LNOUT<ul><li>Selects option to provide formatted representation of TAPE3 on file TAPE7</li><li>Representation is identical to TAPE1 and TAPE2</li><li>One transition per record</li><li>CAUTION this option may produce a VERY LARGE output file</li></ul>
NOCPL<ul><li>Suppresses all line coupling information on TAPE3 and TAPE7</li></ul>
NLTE<ul><li>Reserves transition parameters (quantum numbers) for LBLRTM Non Local Thermodynamic Equilibrium (NLTE) option</li></ul>
REJ<ul><li>Selects line rejection and requires input data for strength rejection (record 5)</li></ul>
MRG2<ul><li>Line parameters on TAPE2 are to be merged with those on TAPE1</li></ul>
F160<ul><li>Selects the 160 character format for TAPE1 (e.g. HITRAN_2004)</li></ul>
BLK1<ul><li>indicates TAPE1 is blocked (Note: NBLK1 is ignored)</li></ul>
EXBRD<ul><li>Uses extra broadening and speed dependence parameter files</li></ul>

Record 4

Required if MRG2 set in Record 3; TAPE2 molecules and options

Variable NameColumn Number RangeString FormatNotes
MOLIND21-4747I1<ul><li>Molecular INDicator for Molecule M from line data on file TAPE2</li><li>0 molecule M is not selected, 1 molecule M is selected</li><li>See Available Species Table</ul>
HOLIND252-100A49<ul><li>HOLlerith INDicator to select general LNFL options and specific options for TAPE2</li><li>See Line Coupling Options Table</ul>

Line Coupling Options <a name="options2"></a>

OptionDescription
BLK2<ul><li>indicates TAPE2 is blocked (Note: NBLK2 is ignored)</li></ul>
F80<ul><li>Replacement or supplemental line data in 80-character format from TAPE2 merged with line data from TAPE1.</li><li>TAPE3 parameters required for LBLRTM from 80-character formatted data are set to default parameters by LNFL (1982 HITRAN format)</li></ul>

Record 5

Required if line rejection option (REJ) selected in Record 3

LNFL Outputs <a name="output"></a>

File NameDescription
TAPE3Binary output file (input for LBLRTM and MonoRTM)
TAPE6Log file
TAPE7ASCII version of TAPE3 in older 100 character HITRAN format, does not include extra broadening parameters