Latest: TABHDR v1.3 (16APR15)




Part of the RFM handling of
Look-Up Tables.

tabhdr.f is the FORTRAN77 program to extract axis and profile information from RFM look-up tables of pre-tabulated absorption coefficient (.tab files, created using the TAB option).

For example, this could be useful for generating subsequent LUTs with similar axes to a given LUT (assuming the rfm.drv file used to generate the original LUT no longer exists).

General Comments

  1. This program can be run on any .tab file, in either ASCII or binary format.
  2. As well as a summary printed to the terminal, up to 5 files will be created containing axis and profile information:
    Pressure axis values [mb], in .tan file format, suitable as PFILE input in the *DIM section of the rfm.drv file.
    Temperature axis values [K], as TFILE input
    tab.vmr (only generated if more than 1 q-axis point in .tab file)
    VMR-scaling axis values [%], as QFILE input.
    Pressure axis and embedded Temperature and VMR profiles in .atm file format, suitable as FILATM input in the *ATM section of the rfm.drv file. The *HGT profile is just an list of indices, 1, 2, 3 etc but this should not affect the generation of .tab files.
    tab.grd (only generated for irregular spectral grid)
    Spectral grid values in .grd file format, suitable as FILGRD input in the *GRD section of the rfm.drv file.
  3. These filenames are fixed, set by fairly obvious FORTRAN PARAMETER statements near the top of the source code.

Installing tabhdr

First download the source code: [tabhdr.f]

Then compile with any FORTRAN77 compiler, eg

f77 tabhdr.f -o tabhdr
(although, if using binary .tab files, use the same compiler as for the RFM which created the original files - see Introduction).

Running tabhdr

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

A typical run might be (user responses in bold)

tabhdr R-TABHDR: Running TABHDR v1.0 Input file: tab_sf6_v.asc MolecID: 103 SF6 Summary: Npts MinVal MaxVal p-axis: 23 1.955E-05 1.017E+03 T-axis: 12 190. 300. q-axis: 5 25.0 400. v-axis: 44 920.0000 960.0000 Writing p-axis values to file: tab.pre Writing T-axis values to file: tab.tem Writing q-axis values to file: tab.vmr Writing profile values to file: tab.atm Writing spectral grid to file: tab.grd R-TABHDR: Succesful completion

The program takes a few seconds to run with an irregular grid (since every record has to be read) but is instantaneous with regularly gridded data (since only the file header is read).


  1. The first line tells you which version (1.0) of the program is being executed.
  2. The second line asks you for the .tab file to be read
  3. 'MolecID': The RFM/HITRAN numerical code for the molecule (read from the file) and its formula (as interpreted within the tabhdr program itself)
  4. 'Summary': The next lines provide a summary of the table axes
  5. 'Writing...' The following lines list the output files being created
  6. The program finishes with a 'Successful completion' message.

Error Messages

When running the program, after responding to the prompt for the input file, the program may halt with a message printed to the terminal

F-RWAXIS: No.p*T*q-axis pts > MAXX

This is because the total number of Np × NT × Nq axis points (=14600 in this case) exceeds the local array size 10000. To fix this, edit the source code and set PARAMETER MAXX to be ≥ Np × NT × Nq.

Version History

v1.31 (05AUG15)
Change '$' in WRITE statements to avoid gfortran warnings
v1.3 (16APR15)
Correction: add local function MOLIDX
v1.2 (24FEB15)
Improve auto-detection of input file-type
v1.1 (17DEC14)
Allow for extra format identifier record in .tab file header
v1.00 (05NOV14)
Original code