Making/Using LUT files, complex case
As an extension to the [simple case], this
is a more complicated example dealing with water vapour (nadir-viewing).
For terrestrial atmospheres, water vapour is the only
absorber where the self-broadening contribution is large enough to make
the absorption coefficient a function of absorber concentration as well as
p,T, so requiring use of the third axis of the LUT tables.
It is also anticipated that the H2O LUT will be used with the H2O continuum
(the RFM default behaviour for H2O LUTs
[Details ...]) which means that the
CTM flag is not used in the
driver table to generate the LUT, but is used when the LUT is an input.
This example also introduces an optional compression step to reduce the size of the LUT
file before use.
Step 1: Create the LUT
- *FLG section
- TAB flag: switches RFM
into LUT-generation mode
- *SPC section
- Sets the wavenumber axis for the LUT file. Here it is anticipated that the
the LUT will actually be used to simulate the range,
1215–1220 cm-1 but add a margin of ±1 cm-1
to allow for some spectral convolution.
(NB: the spectral resolution here is set to 0.01 cm-1
just to keep the file
sizes small, but 0.001 cm-1 would be more reasonable)
- *ATM section
- An atmospheric profile containing at least pressure, temperature and
target molecule is always required in order to establish profiles of T(p) and
included in the LUT file format which, in this case, are needed to interpret
- *DIM section
- Sets the pressure, temperature and VMR axes for the LUT file
- PCG Anticipating that the LUT will be required for calculations on
the pressure levels in the file usa.atm,
pressure interpolation errors can be minimised by using the Curtis-Godson
equivalent pressures for each layer as the p-axis for the LUT
- 11 temperature axis points but since the lowest temperature is negative
(-50) this means that the temperature axis is relative to the T(p)
profile values. That is, for pressure axis value pi the 11
temperature axis points have values
- 4 VMR axis points, with values 50%, 100%, 150% and 200%. That is,
for pressure axis value pi, the 4 VMR axis points have values
15DEC21 RFM Example: Create H2O LUT
1214 1221 0.01 ! NB: too coarse for realistic spectra
PCG 11 -50 50 4 50 200
RFM Output Files
Step 2: LUT Compression
The resulting LUT file tab_h2o.asc
has size 27Mb (it could have been made
smaller by adding the BIN flag).
It has been created with 701 (ν) x 51 (p) x 11 (T) x 4 (q) = 1 573 044
There are two separate FORTRAN programs that can be used to compress the
data by removing axis points where the values can be adequately represented
by interpolation from the remaining axis points.
The first of these is tabcmp_v, which
compresses in the wavenumber axis.
User inputs in red
R-TABCMP_V: Running TABCMP_V v2.0
Input file: tab_h2o.asc
Convolved resolution [cm-1]: 0.1
Max absorption error (eg 0.001): 0.001
Output file: tab_h2o_v.asc
I-TABCMP_V: Reading in LUT ...
I-TABCMP_V: Starting to remove points. Initial No.= 7001
700 1214.1500 3.1531E-06 99.9%
478 Err.lim.= 1.0040E-03
I-TABCMP_V: Summary: Orig Npts= 701 New Npts= 478 Red.Factor= 68.2%
I-TABCMP_V: Writing new .tab file ...
R-TABCMP_V: Successful completion
It has been assumed that
an absorption error of 0.001 within any profile layer is acceptable, and
that the LUT output will be convolved to a resolution of 0.1 cm-1.
This took a few second to run (but increases with number of spectral points),
and results in a file
tab_h2o_v.asc of size 16Mb
containing 478 instead of 701 spectral axis points.
Next use the program tabcmp_x to
compress in the (p,T,q) axes.
R-TABCMP_X: Running TABCMP_X v2.01
Input file: tab_h2o_v.asc
Max absorption error (eg 0.001): 0.005
Output file: tab_h2o_vx.asc
I-TABCMP_X: Reading in LUT ...
I-TABCMP_X: Starting to remove points. Initial No.= 2244
Removing q-axis value= 150.00 [%], ERR= 0.0024712
I-TABCMP_X: Summary: Orig Npts= 2244 New Npts= 1683 Red.Factor= 75.0%:
I-TABCMP_X: Writing new .tab file
R-TABCMP_X: Successful completion
This is rather quicker to run. 'Orig Npts' and 'New Npts' here refer to
N(p) x N(T) x N(q) axis points, while for tabcmp_v they were spectral
In this case just a single q-axis point was removed (150%) out of the four,
hence the 25% reduction in size.
The new file tab_h2o_vx.asc is size 14Mb,
less than a 10th of the original, and contains
478 (ν) x 51 (p) x 11 (T) x 3 (q) = 804 464 data points.
Step 3: Using the LUT
In this example the LUTs are used to calculate transmittance spectra for a
vertical path through the atmosphere, convolved to 0.1 cm-1
resolution for output.
- *FLG section
- AVG flag: in this example
the output spectra are reduced in resolution by convolution with a
- CTM flag: add continuum
absorption (just for H2O in this case)
- LUT flag: using LUTs for
(some) molecular absorption data
- TRA flag: calculate
- ZEN flag: upward-viewing
spectra, as observed from the ground
- *SPC section
- The spectral range is narrower than the LUT, although with the
AVG flag an
extra ±0.1 cm-1 will be used.
- *GAS section
- In this example CH4 is added, but without a corresponding LUT, hence the
need to include the HITRAN database in the *HIT section
- *LUT section
- H2O LUT file to be used
- *FIN section
- Ensure underlying spectral fine grid matches that used for LUT generation
15DEC21 RFM Example: Use H2O LUT
AVG CTM FIN LUT TRA ZEN
1215 1220 0.1
RFM Output Files
The calculated spectrum is shown in blue, but the plot also shows the difference
compared to spectra calculated line-by-line (ie without LUTs), using the
original uncompressed LUT, and using the LUT after just the wavenumber
compression stage (almost identical).
Only the strong line at 1218.5 cm-1 is due to water vapour, the
weaker lines are CH4, which is calculated line-by-line in all cases.