tabmrg.f90 is a FORTRAN program to manipulate (in the spectral domain) RFM-generated look-up tables of pre-tabulated absorption coefficient (.tab files, created using the TAB option).
Download the source code: [tabmrg.f90] and the auxiliary modules [tabaux.f90]
Copile with any generic FORTRAN compiler, eg
NB: if using binary
use the same compiler as for the RFM - see Binary
To run the program, type tabmrg and respond to the prompts
(user-typed responses in red)
The program should take a few seconds at most, essentially just copying
records from the input files to the output file
The following is a rather contrived example just designed to show how
the program works.
! Merged/extended using program TABMRG v.2.0
but otherwise copies that of the last input file, with the necessary adjustments
to the spectral information.
A .tab file contains a tabulation
of absorption coefficient k [m2/kmol] over a defined
spectral range, νL:νU, represented by the
first and last data records within the file.
To run the program, type tabmrg and respond to the prompts (user-typed responses in red)
The program should take a few seconds at most, essentially just copying records from the input files to the output file
When re-used within the RFM as a Look-Up Table (entered via the *LUT section of the Driver Table) the file has to have a defined range completely spanning the spectral range (defined in the *SPC section of the Driver Table) for the RFM calculation otherwise it will be ignored and the RFM will revert to using HITRAN (*HIT) or cross-section (*XSC) data.
For example: the SF6 molecule has a single absorption feature between 925-955 cm-1. If a .tab file is created spanning just this range, it could not then be used for an RFM calculation over the range 900-1000 cm-1 since it contains no information on the SF6 absorption outside 925-955 cm-1 (the equivalent .xsc file which the RFM will then use by default also only contains the same spectral feature but the difference is that with .xsc files the RFM assumes zero absorption outside any tabulated cross-section data whereas with .tab files it makes no such assumption).
The crude solution would be to create the initial .tab file over the wider range, resulting in a much larger file containing many records at high spectral resolution with just k=0 values (although this could then be compressed with the tabcmp_v program).
The more elegant solution is simply to add four additional spectral points of k=0 values, so that the new .tab file contains the following spectral points
The end values (900 and 1000 cm-1) are supplied by the user (and there is no advantage in restricting the range if you know that there are no other SF6 features that can be modelled, eg 0:10000 cm-1 makes the file even more versatile.
The additional records located at 924.999 and 955.001 cm-1 are inserted at intervals ∓δν relative to the original range νL:νU, where δν value = 0.001 is the fundamental resolution obtained from the input file header. This is to ensure that any absorption in, say, the range 900-924.999 cm-1 will be interpolated between two zero records rather than between zero at 900 cm-1 and whatever k value the original file contained at 925 cm-1.
In principle the spectral records of two files can be concatenated
with the RFM then simply interpolating the k value
(actually linearly in ln k) in the gap
from the tabulated k values at the upper wavenumber limit of the
first file ν1U
and the lower limit of the second file ν2L (the
.tab format always stores records in order
of increasing wavenumber).
However this gives unpredictable values of k within the data gap ν1U:ν2L since it depends on the tabulated values at the edges of the component files (although these are presumably small k value if they represent the edges of physical absorption bands).
A 'gap' is defined as a spectral interval greater than 2δν,
where δν is the fundamental grid spacing of the input file.
When a gap is encountered between
files then two spectral points with k=0 values
are inserted at the borders of the input
file ranges: ν1U+δν, ν2L-δν,
thus defining the absorption between bands to be zero.