Py4CAtS --- Python scripts for Computational ATmospheric Spectroscopy

lbl2od scheme

Main Scripts: From Hitran/Geisa to Optical Depths

extract
extract (select) lines of a certain molecule (and isotope) and/or wavenumber range from line parameter database
(in contrast to the "low-level" hitran and geisa scripts below molecule (and isotope) can be specified by their chemical names!)
lbl2od
computation of line-by-line optical depth due to molecular absorption (combines lbl2xs, xs2ac, ac2od)

Further Scripts (stand-alone, executable!)

hitran
extract lines of a certain molecule (and isotope) and/or wavenumber range from the HITRAN database
geisa
extract lines of a certain molecule (and isotope) and/or wavenumber range from the GEISA databank
lines
Read molecular spectroscopic line parameters (Hitran, Geisa, ... extract) and convert to new pressure/temperature
plot_atlas
plot line data, i.e., line position vs strength in 'atlas' style.
(Note:This version utilizes the xmgr plotting tool (a.k.a. ACE/gr, further developed into the GRACE tool)
lbl2xs
lbl cross sections for one molecule and several p, T
cross_section
Read and write / plot molecular cross sections (e.g., to reformat or interpolate)
(Note:This version utilizes the matplotlib python 2D plotting library)
atmos
Read atmospheric data file(s) in xy tabular ascii format: extract profiles, interpolate to new altitude grid, save in xy or namelist format.
molecules
A dictionary of dictionaries containing molecular data (id numbers, mass, ....) along with some convenience functions.
cgsUnits
Conversion of (scalar or array) physical values to different units

Supplementary Modules

xs2ac2od
the main computational functions besides the lbl functions
lineShapes
defines the Lorentz, Gauss, and Voigt line profiles (normalized to one) along with two computational routines for the complex error function
command_parser
Command line interpreter, esp. options, written ontop of Python's getopt module
(since Python2.3 optparse is available, but ....)
IO
input/output related routines
ir
constants for infrared spectroscopy and radiative transfer
pairTypes
three classes for PairOfInts, PairOfFloats, Intervals

General Remarks


DATA

To run these scripts, you need molecular spectroscopic line parameters (essentially line positions and strengths) and atmospheric data comprising pressure, temperature, and molecular concentrations as a function of altitude.

py4cats @ libradtran

The executable scripts are in ../bin (relative to this doc directory!)
To add this directory to your search path, append the following statement to your .tcshrc (or .cshrc) file:
setenv PATH ${PATH}:${libradtranHome}/py4cats/bin
(or equivalently for the bash or korn shell)

Ideally the py4cats scripts should run on any computer. Well, almost any, of course you should have Python along with numpy (and scipy and matplotlib occasionally ....). In order to save the optical depth data using netcdf format, you also need an appropriate module such as Scientific.IO.NetCDF (from K. Hinsen's ScientificPython; Alternatively pynetcdf might help ....). In order to plot the lines (line position vs strength) with plot_atlas you also need ACE/gr = xmgr.


Documentation and Some Questions

For a detailed review of line-by-line modeling for infrared radiative transfer see this lbl2od.pdf

Known Problems


© fgs   (+49-8153-28-1234)
Wed Sep 14, 2011; 10:33