Skip to content

GasAbsorption

James Manners edited this page Jan 28, 2026 · 2 revisions

Prev: Parametrised optical properties for clouds and aerosols

Generating gas absorption coefficients (correlated-k)

The correlated-k method may be used to generate data for line and continuum absorption. There is one program, Ccorr_k which generates both the line and the continuum data, though it must be run separately for each process. An example use of this program can be found in $RAD_DIR/examples/corr_k.

The man page lists all the available options:

man Ccorr_k

The use of this program is quite involved and cannot be covered in a simple tutorial. In particular, the errors associated with the correlated-k method will increase significantly as the number of k-terms are reduced so it is always advisable to first generate a reference configuration with a large number of k-terms (and spectral bands) and test faster broadband methods against this. In the example directories sp_lw_jm/ and sp_sw_jm/ are scripts to create the entire high (300 band LW, 260 band SW) and low (9 band LW, 6 band SW) resolution spectral files from scratch. Here we will just run through one example for ozone in the ultra-violet.

We first generate the skeleton spectral file as used in the previous two tutorials:

cd $RAD_DIR/examples/sp_sw_jm
rm -f sp_sw_6_skel
. ./mk_sp_sw_6_skel

Ozone cross sections for the UV and visible from Serdyuchenko et al (2012) (+BDM for far UV) are given on this website. These have been converted to the HITRAN cross-section format (with the routine ser2xsc) so that they can be read by corr_k and are provided here: $RAD_DATA/gases/ser_bdm_o3.xsc

We can now run Ccorr_k to generate the ozone k-terms:

Ccorr_k \
  -F $RAD_DATA/gases/pt_o3_ser \
  -X $RAD_DATA/gases/ser_bdm_o3.xsc \
  -R 1 4 -c 2500.0 -i 1.0 -l 3 1.0e-2 -t 1.0e-2  \
  -s sp_sw_6_skel +S lean_12 -q -r $RAD_DATA/gases/ref_pt \
  -o o3_u6_2l -m o3_u6_2lm -L o3_lbl_uv.nc

The output file ''o3_u6_2l'' provides the k-terms (mass absorption coefficients), weights (i.e. fraction of the band for which this absorption coefficient is relevant), and fitting parameters for the scaling with pressure and temperature. It also displays a table of the error in transmittance that occurs for different path lengths of absorber compared to a reference line-by-line result:

less o3_u6_2l

These ozone k-terms can now be added to the spectral file:

prep_spec << EOF
sp_sw_6_skel
a
5
o3_u6_2l
-1
EOF
less sp_sw_6_skel

Next: Example spherical harmonics radiance calculation

Clone this wiki locally