SUBHIT

Latest: SUBHIT v2.00 (27NOV18) [Fortran] [Python]
01JUL24
Contents

Introduction

SUBHIT is a program written in both Fortran90 and Python to extract a subset of a HITRAN line data (160-character .par file) by wavenumber and/or molecule/isotope.

For example, this could be useful for merging different molecules from different datasets, starting with this program to extract particular molecules and then using the MRGHIT program to reassemble subsets.

Installing SUBHIT

For Python, just download the source: [subhit.py]

For Fortran, download the source code: [subhit.f90]

Then compile with any generic Fortran compiler, eg

gfortran subhit.f90 -o subhit
which will create the executable: subhit

Running SUBHIT

To run the Python code, assuming you have Python installed, type python subhit.py and respond to the prompts (the dialogue is similar to the Fortran version as listed below).

To run the Fortran program, type subhit (or you might need ./subhit) and respond to the prompts.

A typical run just to extract a spectral subset (all molecules) in range 800–900 cm-1 from a file HITRAN2012.par and write it as a file example.par might be (user responses, <CR> indicates Return/Enter key)

subhit R-SUBHIT: Running SUBHIT v2.00 Input HITRAN file: HITRAN2012.par Wavenumber range (cm-1) [<CR>=all]: 800 900 [1] List of Molec# to include: <CR> [2] List of Molec# to exclude: <CR> [3] Output HITRAN subset file: example.par I-SUBHIT: Record# 100000 Wavenumber= 829.368699 I-SUBHIT: Record# 200000 Wavenumber= 840.987280 I-SUBHIT: Record# 300000 Wavenumber= 850.284961 I-SUBHIT: Record# 400000 Wavenumber= 859.502340 I-SUBHIT: Record# 500000 Wavenumber= 874.569640 I-SUBHIT: Record# 600000 Wavenumber= 897.545360 I-SUBHIT: Number of records written = 609653 STOP R-SUBHIT: Successful completion
A second example uses the program to extract just CO2 isotopes #9,10,11 and 12 (727, 838, 837 and 737), and write these to a file co2_iso.par
subhit R-SUBHIT: Running SUBHIT v2.00 Input HITRAN file: HITRAN2012.par Wavenumber range (cm-1) [<CR>=all]: <CR> List of Molec# to include: 2.9 2.10 2.11 2.12 Output HITRAN subset file: co2_iso.par I-SUBHIT: Number of records written = 15125 STOP R-SUBHIT: Successful completion

Notes

  1. Wavenumber range: just typing <CR> (ie Return/Enter) would reproduce the full spectral range of the original file
  2. Included molecules: list of molecules, and only these molecules to included in the output. Typing <CR> means that you don't want to specify a list.
  3. Excluded molecules (prompt only appears if user typed <CR> in response to previous). A list of molecules, isotopologues and only these molecules to be excluded from the output, same format as previous. Type <CR> again if all molecules to be included.
  4. The program prints a series of progress messages after every 100 000 records of output data are written, and ends with a summary of the number of records written. If the user specifically excluded particular molecules/isotopes there will be an additional summary line giving the number of records excluded.

Version History

v2.00 (01JUL24)
Add Python version of the code.
v2.00 (27NOV18)
Converted to Fortran90. Allow for further CO2 isotopologues in HITRAN2016.
v1.02 (17JUL17)
Allow for Isotope#0 associated with 10th CO2 isotopomer in HITRAN 2012, c.4600 cm-1
v1.01 (05AUG15)
Change .EQ. to .EQV. when comparing logical expressions to avoid gfortran warning messages.
v1.00 (23AUG13)
Original code.