HITBIN

Latest: HITBIN v3.00 (01JAN18)

Contents

03MAY18

Introduction

hitbin is the FORTRAN90 program to convert the HITRAN 160-character ASCII records (e.g. HITRAN2016.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 (v3.00) of hitbin is compatible with HITRAN 2016 (and older formats back to 2004), 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.f90]

Then compile with any FORTRAN compiler, eg

gfortran hitbin.f90 -o hitbin

It is recommended that you also download the file [vibh16.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, simply type hitbin and respond to the prompts.

A typical run might be (user responses in bold)

hitbin
R-HITBIN: Running HITBIN v3.00 generating output Format# 1
Input HITRAN file: HITRAN2016.par
Wavenumber range (cm-1) [<CR>=all]:
New binary file: HITRAN2016.hit
Opening file with RECL= 88
Header for new file (up to 48 chars): HITRAN 2016
I-HITBIN: Writing new binary file...
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 [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, for example with the ifort compiler, is 24).
  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 can only read the new data (although it is a relatively minor modificion if you really need to read the old format).

With HITRAN2016 it has also been possible to extract data in any user-defined format. This will be useful for including the additional parameters required for non-Voigt (HTP) lineshapes and line-mixing but I haven't yet decided the best way to implement that.

Vibrational Level Identification

The 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).

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 file [vibh16.txt] contains the conversion table between HITRAN notation and RFM index, and the same data in more readable format can be found on the [web-page]. This file is only used by the hitbin program, not the RFM itself (which knows nothing of HITRAN spectroscopic notation). Incidentally the previous (F77) version of hitbin contained a (very long) subroutine with all this information internally coded.

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)

While the file vibh16.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 Level Identification

The rotational level identification is also contained in 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 (hitbin v2.21 onwards)

Version History

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)