Latest: TABCUT v1.21 (05AUG15)




Part of the RFM handling of
Look-Up Tables.

tabcut.f is a FORTRAN77 program to reduce the spectral range of an RFM-generated look-up tables of pre-tabulated absorption coefficient (.tab file, created using the TAB option). It can also be used simple for binary-ASCII conversion of .tab files.

For example this can be used to remove records where the absorption is negligibly small, resulting in a smaller file.

General Comments

  1. For a given file, the program generates a list of spectral grid points for which the 'cell absorption' is increasing to a maximum then decreasing. This gives some guidance to the impact of the truncation on radiance/transmittance calculation accuracy (which the user may, of course, choose to ignore).
  2. The program can be run on either ASCII or binary versions of the .tab file, and the output can be either binary or ASCII, and the program can also be used simply for converting between the two.
  3. Since the program performs no spectral interpolation, the truncated file must be a subset of the spectral grid of the input file. Consequently the truncation limits are defined by spectral grid point indices rather than wavenumbers. However, if the user specifies wavenumber limits the program will suggest nearest grid points for the truncation.

Installing tabcut

First download the source code: [tabcut.f]

Then compile with any FORTRAN77 compiler, eg

f77 tabcut.f -o tabcut

NB: if using binary .tab files use the same compiler as for the RFM - see Binary Files.

Running tabcut

To run the program, type tabcut and respond to the prompts.

A typical run might be (user responses in bold)

tabcut R-TABCUT: Running TABCUT v1.0 Input file: sf6_900_1000.bin Rec# Wno[cm-1] Abs_max k_max + 1 900.0000 .000000 0.000E+00 + 3 940.0000 .000411 2.931E+05 + 4 941.0000 .000624 4.342E+05 + 5 942.0000 .000884 6.023E+05 + 6 943.0000 .001176 7.762E+05 + 7 944.0000 .001485 9.518E+05 + 8 945.0000 .001664 1.072E+06 + 9 946.0000 .001841 1.230E+06 + 10 947.0000 .001993 1.337E+06 + 12 947.8470 .005165 6.064E+06 + 13 947.8580 .005550 8.483E+06 + 14 947.8850 .005654 7.027E+06 + 15 947.8960 .006361 1.022E+07 + 17 947.9290 .006874 1.121E+07 - 18 947.9400 .006633 8.640E+06 - 19 947.9680 .006391 9.967E+06 - 20 948.0000 .003959 4.725E+06 - 21 948.1810 .001544 1.024E+06 - 23 950.0000 .001494 1.503E+06 - 24 951.0000 .000891 7.024E+05 - 25 952.0000 .000186 1.201E+05 - 26 953.0000 .000025 3.188E+04 - 27 954.0000 .000014 3.642E+04 - 28 955.0000 .000012 4.362E+04 - 35 1000.0000 .000000 0.000E+00 Use all (<CR>) or select range: 943.0 950.0 5 942.0000 .000884 6.023E+05 > 6 943.0000 .001176 7.762E+05 7 944.0000 .001485 9.518E+05 22 949.0000 .001270 9.527E+05 > 23 950.0000 .001494 1.503E+06 24 951.0000 .000891 7.024E+05 Use this (<CR>) or new range: 5 24 4 941.0000 .000624 4.342E+05 > 5 942.0000 .000884 6.023E+05 6 943.0000 .001176 7.762E+05 23 950.0000 .001494 1.503E+06 > 24 951.0000 .000891 7.024E+05 25 952.0000 .000186 1.201E+05 Use this (<CR>) or new range: <CR> New filename: sf6_942_951.asc I-TABCUT: Converting to ASCII file R-TABCUT: Succesful completion

Once the range is selected, the program should take a few seconds at most, essentially just copying records from the input files to the output file


  1. The first line tells you which version (1.0) of the program is being executed.
  2. The second line asks you for the name of the original .tab file to be truncated.
  3. Then follows a list of spectral points in the file where the maximum Cell Absorption (for any p,T,q coordinate) is increasing, and also the maximum tabulated k value for that point (k and Cell Absorption are linked, but cell absorption includes other factors such as pressure axis spacing).
  4. When the initial '+' signs change to '-' the subsequent records show decreasing Cell Absorption (basically the same information as the '+' records but starting from the high wavenumber end of the file).
  5. The next prompt gives the user the default option of saving the whole file as it is (by typing a carriage return, <CR>) or of selecting a particular range. The selection can be either In this example, the initial selection was by wavenumer, 943:950 cm-1
  6. After the user-selection the program redisplays the Abs_max and k_max values in the vicinity of the selected range, this type with records marked by a '>' character at the start of the line corresponding to the (closest) records to the user selection.
  7. The user is then asked to confirm the selection by typing <CR>, or changing the selection by typing a new pair of Record# or Wavenumber values. In this case different Record#s are entered, 5:24.
  8. The program then redisplays the data in the region of the new selection, with the new records indicated by '>', and repeats the confirm/reselect prompt. In this case the user confirms by typing <CR>
  9. The next line asks for the name of the merged file. If this contains the string ".bin" then it will be assumed that this is to be a binary file, otherwise ASCII. In this case it is assumed to be ASCII
  10. Since the program is also changing from input binary to output ASCII an additional message is printed confirming the format change.
  11. The processing finishes with a 'Successful Completion' message.

To use the program for basic ASCII-binary conversion, as above but type <CR> in response to the first prompt for 'Use all ...'

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 exceeds the local array size 10000. To fix this, edit the source code and set PARAMETER MAXX to be ≥ Np × NT × Nq. Similarly for other array size error messages.

Version History

v1.21 (05AUG15)
Change '$' in WRITE statements to avoid gfortran warnings
v1.2 (24FEB15)
Improve auto-detection of input file-type
v1.1 (23DEC14)
Allow for extra format identifier record in .tab file header and for tabulated ln(k) rather than tabulated k.
v1.00 (04NOV14)
Original code