.bin File

RFM File Formats: HITRAN Binary Line Data

09FEB24

Type
Input, mandatory if any line molecules (molecules ID#1:99) used and no other source of spectroscopic data specified.

Description
Binary, direct-access form of the HITRAN standard 160 character .par file, converted using HITBIN.

Using a direct-access binary file is not only more compact but allows faster access than a sequential .par file in which every read has to be read and used or discarded as necessary.

The actual binary file structure should be transparent to the RFM user, but is described here for information.

Filename
Specified in *HIT section of Driver Table

Structure
Direct access binary file with record length 88 bytes. The structure of this file owes much to its GENLN2 inheritance (i.e., not the way it would have been designed now!).

HITRAN2020 defines molecule IDs up to #55, and this current binary file format (specifically the definition of a forward pointer block of 4 records each containing 14 molecules) allows for a molecule ID up to #56. So anticipating extra molecules in the next HITRAN release I should probably create a new format (while, of course, ensuring old binary files continue to work).

There are 5 types of record, distinguished by the LSTAT value, which is always the first integer each record (integers are always 4 bytes here)

Beyond the file header record and comment records, all records start with 3 integers (LSTAT plus 2 others) and then the double precision wavenumber (WNO), intended to allow rapid searching for a particular wavenumber without having to decode the entire record. Every record has a (WNO) value either equal or greater than the preceding record.

Forward Pointer Blocks of 4 records are also interspersed with the line parameter records at regular intervals throughout the file (typically every 200 line parameter records, the interval is set in HITBIN).

LSTAT File Structure
0 File_Header_Record First record in file
4 Comment_Record Optional record(s)
Repeat until end
-7     Forward_Pointer_Block set of 4 records
10     Data_Record typically x200
-2 End_Record File termination

File Header Record
LSTAT MOL_MAX IREC1 IREC2 HEAD48
Comment Record
LSTAT CMNT84
Forward Pointer Block
For i = 1, MOL_MAX, 14
    LSTAT MOL_OFF IDUMMY WNO IFP(i) ... IFP(i+13)
Data Record
LSTAT MOL_ID ISO_ID WNO STR TPR ABROAD SBROAD ELS N_AIR TSP IUSGQ ILSGQ USLQ BSLQ AI REF
End Record
LSTAT IDUMMY IDUMMY WNO

Data Dictionary
Field Type Description Units Range
ABROAD R Air-broadened halfwidth (HWHM) @ 296 K cm-1/atm
AI C3 Accuracy indices for freq, strength, halfwidth
BSLQ C9 Lower state local (=Rot) quantum state ID
CMNT84 C84 (eg) Further file description
ELS R Lower State Energy cm-1
HEAD48 C48 (eg) Brief file description
IFP(:) I (MOL_MAX) No.records to skip until next line of this molecule >0
IDUMMY I Dummy integer to fill record structure 0
ILSGQ I Lower state global (=Vib) quantum index
IREC1 I Rec# of first data record > 1
IREC2 I Rec# of End_Record > IREC1
ISO_ID I HITRAN isotopologue local ID > 0
IUSGQ I Upper state global (=Vib) quantum index
LSTAT I Record-type identifier see Overview
MOL_ID I HITRAN molecule ID 1:MOL_MAX
MOL_MAX I Max. MOL_ID accommodated within Forward_Pointer_Block usually 56[1]
MOL_OFF I HITRAN molecule id# of 1st mol. in FP record ∈ {1, 15, 29, 43}
N_AIR R Coefficient of T-dependence of ABROAD
REF C6 References for freq, strength, halfwidth
SBROAD R Self-broadened halfwidth (HWHM) @ 296 K cm-1/atm
STR R Line Strength (or Intensity) @ 296 K cm-1/(kmol.cm-2)
TSP R Transition shift due to pressure cm-1/atm
TPR R Transition Probability Debyes2
USLQ C9 Upper state local (=Rot) quantum state ID
WNO D Wavenumber cm-1 > 0
Type: I=Integer (4 bytes); R=Real (4 bytes); D=Double Precision (8 bytes); Cn=character string, length n (n bytes).

Notes
  1. HITRAN ASCII files can be converted to binary format with the hitbin program
  2. As with the ASCII files the 'line parameter' records in the binary file are ordered by increasing wavenumber.
  3. All records between iRec1:iRec2 can be read as 3 (dummy) integers followed by a valid local Wno value, including the Forward Pointer and File Termination records. This is to allow a particular wavenumber in the file to be found rapidly, eg with a binary search, by testing only the Wno value for each record.
  4. The main difference between the structure of the binary file and the original ASCII data is the use of forward pointers IFWDPT to help navigation. Within each Line Parameter record, IFWDPT is the number of records to skip until the next line (at higher wavenumber) for the same molecule. This makes it much faster to select lines from only a subset of the molecules in the file.
  5. In addition to the forward pointers within each transition, at the start of the binary file and interspersed (eg every 200 records) throughout are 'forward pointer blocks' of 4 records, each record containing forward pointers IFWDPT for 14 molecules, hence molecules 1:56 (=Mol_MAX). The idea is that you can enter the file at any point, step backwards until you find a forward pointer block (maximum of 200 records) and then be guaranteed to have pointers to the next location of records for every molecule.
  6. The default LStat value for Line Parameter records is 10. The program hitbin.f allows different datasets to be merged with the newer data having a higher LStat value (and the old line removed), while the original GENLN2 conversion program hitlin kept the old lines but set LStat negative. Either way, the RFM will ignore any lines with LStat <10.
  7. Str: Line Stengths in the original HITRAN ASCII data are defined as [cm-1/(kg.molec.cm-2)]. These are multiplied by Avogadro's Number ( 6.0221367E26 ) for the binary file in order to ensure that the numbers are in the normal range which can be represented by exponentials.
  8. The following fields are not actually used within the RFM: ELS, TPr, USLQ, AI, REF
  9. BSLQ is only used in conjunction with CO2 Line-mixing (MIX Flag)
  10. RFM v5 can use the original 160-character HITRAN .par files, although this is less efficient since it had to read through the file sequentially 3 times. Basically, if you find yourself waiting for the RFM to finish a run, you should consider running the hitbin program to convert to binary
  11. Line-mixing (MIX Flag) and non-LTE (NTE Flag) calculations require a binary file since these use additional fields inserted by the hitbin program.