HITBIN

Latest: HITBIN v3.02 (23NOV18) [Download]
14MAR24
Contents

Introduction

HITBIN is a Fortran90 program to convert the HITRAN 160-character text records (
.par file) to the binary form (.bin file) used by the RFM.

Although the RFM (v5.0 onwards) can read the .par files directly, reading a direct access binary file is faster, and also allows the selection of indvidual vibrational transitions and non-LTE calculations (both of which require encoding the 15-character 'Global Quantum Number' in the .par file as a single integer as part of the conversion to the binary file).

It is assumed that the user has already obtained a copy of HITRAN line data (www.hitran.org), or other line data in the same format.

The current version (v3.02) of HITBIN is compatible with HITRAN 2020 (and older versions back to 2004), and RFM v5.20 (and all older versions).

This page contains the essentials on installing and running HITBIN, subsequent sections are for information only.

Installing HITBIN

Download the source code: [hitbin.f90]

Then compile with any Fortran compiler, eg

gfortran hitbin.f90 -o hitbin

It is recommended that you also download the file [vibh20.txt] and place it in the same directory. HITBIN uses the data in this file to translate the HITRAN vibrational level notation to indices that the RFM uses (see Vibrational Levels).

Running HITBIN

To run the program, type hitbin and respond to the prompts.

A typical run might be (user responses, <CR> indicates Return/Enter key)

hitbin R-HITBIN: Running HITBIN v3.00 generating output Format# 1 [1] Input HITRAN file: HITRAN2016.par [2] Wavenumber range (cm-1) [<CR>=all]: New binary file: HITRAN2016.hit Opening file with RECL= 88 [3] Header for new file (up to 48 chars): HITRAN 2016 I-HITBIN: Writing new binary file... [4] I-HITBIN: Record# 100000 Wavenumber= 7.314511 I-HITBIN: Record# 200000 Wavenumber= 13.571023 I-HITBIN: Record# 300000 Wavenumber= 20.511739 I-HITBIN: Record# 400000 Wavenumber= 27.965533 ... I-HITBIN: Record# 5400000 Wavenumber=11391.089200 I-HITBIN: Record# 5500000 Wavenumber=20313.775334 I-HITBIN: Last Record# 5507557 Wavenumber=36405.367200 I-HITBIN: Writing forward pointers... I-HITBIN: Record# 5500000 Wavenumber=20315.363909 I-HITBIN: Record# 5400000 Wavenumber=11391.097355 ... I-HITBIN: Record# 400000 Wavenumber= 27.965535 I-HITBIN: Record# 300000 Wavenumber= 20.512720 I-HITBIN: Record# 200000 Wavenumber= 13.571023 I-HITBIN: Record# 100000 Wavenumber= 7.314511 STOP R-HITBIN: Successful completion
The program takes a some tens of minutes to complete.

Notes

  1. The first line tells you which version (3.00) of the program is being executed and also the version# (1) of the binary file created. At the moment there is only one version of binary file format accepted by the RFM.
  2. Then follows the dialogue which asks for
    1. HITRAN input file
    2. Any subset of the spectral range. The user either just types <CR> to obtain the full range contained in the HITRAN input file, or enters the required lower, upper wavenumber limits.
    3. The name of the binary output file (extension .hit is suggested)
    4. Up to 48 characters of information to be inserted into the file header, eg name of the original HITRAN file
  3. ' Opening file with RECL= ...' There is an ambiguity in the Fortran definition of the RECL parameter when defining the record length of binary files but the program performs its own internal test to determine the appropriate value for the compiler and, in this case, has decided that 88 is the correct value (the alternative, for example with the ifort compiler, is 22).
  4. The rest are just progress messages.

Forward Pointers

To help the RFM with navigation, HITBIN inserts two additional pieces of information into the binary file which are not in the original HITRAN file

HITRAN Data Formats

Since 2004 the HITRAN line data is provided in a fixed format of 160-character records (see
HITRAN web-page). Prior to 2004 there was a different format with 100-character records. The HITBIN program can only read the new format although it is a relatively minor modificion if you really need to read the old format.

Since HITRAN2016 it has also been possible to extract data in any user-defined format.

Vibrational Levels

The HITRAN format uses 15-character fields containing spectroscopic notation to identify the upper and lower vibrational levels of each transition (eg ' 0 0 0' for the ground state of non-linear triatomic molecules, where each 0 corresponds to one of the three vibrational modes possible for triatomic molecules, also designated ν1, ν2, ν3 ).

These are awkward to specify in the RFM driver table so, instead, the RFM uses integer indices corresponding to each level. Index value '1' always corresponds to the ground-state, but other values depend on the type of molecule. (Actually this is inherited from an even older HITRAN format).

The HITBIN incorporates this conversion information using a file [vibh20.txt]. (The RFM itself knows nothing of HITRAN spectroscopic notation).

There are two situations where the RFM requires vibrational level identification:

  1. User-selection of particular transitions (*GAS section)
  2. Non-LTE calculations (NTE flag), where vibrational temperature files are required

While the file vibh20.txt contains all the vibrational levels found in HITRAN 2016, if an unexpected vibrational level is found (eg in a future version of HITRAN, or particularly when using the HITEMP version of HITRAN which contains many additional vibrational levels) it is assigned a value of '0' and a warning message printed to the terminal. This doesn't affect the normal RFM calculation, only the user's ability to select a particular transition.

Rotational Levels

The rotational level identification is also contained in two 15-character fields in the .par file.

The only time the RFM makes use of this information is when CO2 line-mixing is enabled (MIX flag), and that only requires the lower rotational state.

Rather than modify the binary file format (which contains 9 characters for the rotational ID in keeping with the old, pre-2004 HITRAN format), HITBIN extracts characters 2:10 from the new 15-character fields which appear (just for CO2) to be identical to the old 9-character fields but with an extra last character 'e' or 'f' which is set blank.

Version History

v3.02 (23NOV18)
Fix Bugs highlighted by using ifort compiler: using unassigned WNO value and reorder HITTYP Data Type into 8-byte boundaries.
v3.01 (03JUL18)
Fix Bug with assigning CO2 isotope#10,11,12
v3.00 (01JAN18)
Rewritten in F90. Also use external file vibh16.txt to convert vib. levels from spectroscopic notation to indices, which contains all transitions listed in HITRAN2016.
v2.31 (14SEP17)
Read ISO in .par file as Z1 instead of I1 (required for HITRAN2016 which Uses hexadecimal 'A' to indicate 10th isotope, rather than '0' used in HITRAN 2012)
v2.30 (15MAR16)
Change Class10 (CH4) Vib Level assignments
Correction to Strength calc for old HITRAN data
Conform to gfortran compilation with -Wall
v2.22 (21AUG15)
Correct test for old format data
Write out any input file record which causes a read error.
v2.21 (03FEB14)
Fix error in copying CO2 rotation ID information (lose last character 'e' or 'f' in new HITRAN format - thanks to J Ungermann (FzJ) for identifying the error.
v2.20 (10JAN14)
Allow molecules with ID above normal HITRAN range 1-47 (assigning IVIB=0) - previously these would have stopped the program with a fatal error message.
v2.10 (24OCT13)
Change CO2 Isotopologue 838 identification from '0' in input file to 10 in binary file
v2.01 (22AUG13)
Modifications to warning messages (subroutine IDXVIB) for unidentified vibrational levels - no change to actual output
v2.00 (26JUL13)
Original code (much simplified from earlier versions of this program)