HITBIN

Latest: HITBIN v2.31 (14SEP17)

Contents

05DEC17

Introduction

hitbin is the FORTRAN77 program to convert the HITRAN 160-character ASCII records (e.g. HITRAN2012.par) to the binary form (
.hit file) used by the RFM (although note that RFM v5.0 can read the .par files directly)

The main reason for doing this is reading a (direct access) binary file is much faster than reading a (sequential access) ASCII 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 (v4.31) of hitbin is compatible with HITRAN 2016 (and older formats) and RFM v5.0 (and older versions).

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

Installing hitbin

First download the source code: [hitbin.f]

Then compile with any FORTRAN77 compiler, eg

f77 hitbin.f -o hitbin

Running hitbin

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

A typical run might be (user responses in bold)

hitbin
R-HITBIN: Running HITBIN v2.0 generating output Format# 1
Input HITRAN file: HITRAN2012.par
Wavenumber range (cm-1) [<CR>=all]:
New binary file: HITRAN2012.hit
Assuming appropriate RECL value is: 88
Header for new file (up to 48 chars): HITRAN 2012
I-HITBIN: Writing new binary file...
I-HITBIN: Record# 100000 Wavenumber= 7.283619
I-HITBIN: Record# 200000 Wavenumber= 13.493040
I-HITBIN: Record# 300000 Wavenumber= 20.362647
I-HITBIN: Record# 400000 Wavenumber= 27.815865
I-HITBIN: Record# 500000 Wavenumber= 35.508164
...
I-HITBIN: Record# 4500000 Wavenumber=28536.858412
I-HITBIN: Last Record# 4507537 Wavenumber=47364.678039
I-HITBIN: Writing forward pointers...
I-HITBIN: Record# 4500000 Wavenumber=28538.070202
I-HITBIN: Record# 4400000 Wavenumber=13457.567800
...
I-HITBIN: Record# 200000 Wavenumber= 13.493040
I-HITBIN: Record# 100000 Wavenumber= 7.283619
STOP R-HITBIN: Successful completion statement executed

The program takes a few minutes to complete.

Notes

  1. The first line tells you which version (2.0) 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. 'Assuming appropriate RECL ...' There is an ambiguity in the FORTRAN77 definition of the RECL parameter when defining the record length of binary files [More ...] 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 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

The original HITRAN data (prior to 2004) had records of 100 characters, but since 2004 the new format has 160 character records (see
HITRAN web-page). The hitbin program automatically detects which format the user has provided and handles it appropriately (a message is printed to the terminal if it determines that it has been provided with an 'old' format file).

Most of the important data (molecular ID, wavenumber, line-strength, line-width, temperature coefficients, pressure-shift) is contained within the first 77 characters and that part didn't change. However, for certain RFM options, vibrational and rotational level identification is required and those have changed.

Vibrational Level Identification

The old HITRAN format used integers to identify each vibrational level, '1' always being the ground state but other indices depending on the molecular configuration (eg diatomic, linear triatomic,...). The new HITRAN format uses 15-character fields containing spectroscopic notation to identify each state (eg ' 0 0 0' for the ground state of non-linear triatomic molecules, where each 0 corresponds to a vibrational mode).

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

  1. User-selection of particular transitions (*GAS section)
  2. Non-LTE calculations, where vibrational temperature files are required (.nte files)
In both these situations the RFM uses the old integer notation (which is not only more compact, it is also unambiguous and easier to test). The hitbin program converts the C*15 identification in the new HITRAN data to these integers which are stored in the binary files.

However, since the more recent HITRAN data contains many more vibrational transitions than were defined by the original set of integers, the hitbin program now contains many arbitrary new integer assignments. These can be found in the subroutine IDXVIB contained within the hitbin.f source code.

While the new hitbin.f covers all the vibrational levels found in HITRAN 2012, 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 '999' 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 Level Identification

The rotational level identification was contained in 9-character fields in the old format, replaced by 15-character fields in the new format.

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 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 (hitbin v2.21 onwards)

Version History

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)