The line spectrum of carbon dioxide

Question P9.2.5

The HITRAN database provides a list of molecular line intensities for modeling radiative transmission in planetary atmospheres. Its native format consists of 160-character records of fixed-width fields.

Use pandas to read in the file CO2-transitions.par. This text file contains fixed-width fields; the relevant fields are in character columns 4 – 15 (wavenumber, $\tilde{\nu}$, in $\mathrm{cm^{-1}}$) and columns 16 – 25 (spectral line intensity, $S$, at 296 K in $\mathrm{cm^{-1}/(molecule\,cm^{-2})}$, weighted by isotopologue abundance). Note: these column numbers are indexed starting at 1.

Plot line intensity against wavelength for these transitions in the infrared region of the spectrum ($\lambda$ = 1 μm to 20 μm, corresponding to wavenumber $\tilde{\nu} = 500\;\mathrm{cm^{-1}}$ to $10\,000\;\mathrm{cm^{-1}}$), where carbon dioxide ($\mathrm{CO_2}$) is responsible for a significant fraction of the greenhouse effect in Earth's atmosphere.

Hint: Use Matplotlib's stem plotting function.


Solution

To access solutions, please obtain an access code from Cambridge University Press at the Lecturer Resources page for my book (registration required) and then sign up to scipython.com providing this code.