Py4CAtS --- Python scripts for Computational ATmospheric Spectroscopy
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 script 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
- lbl2xs
- lbl cross sections for one molecule and several p, T
- 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
- 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
- Some options are used by (almost) all scripts:
-h
to request help (usage description)
-c
to override the default character # used to indicate comment lines in data files
-o
to specify an output file (default: standard out)
-v
to request more informative output messages (verbose)
- Some scripts such as lbl2xs produce an output file for each input file.
In these cases the
-o
option is used to specify the extension of the output file(s)
(Typically the input files will have the same extension,
and there will be a list of output files with the common extension replaced by the string given in the -o
option)
- Some scripts allow to specify a list of integers, floats, strings etc as an option (e.g. a sequence of pressures).
Use commas as separator, but do not use blanks between the list elements, i.e. say lbl2xs -p 1013,800,500
(or enclose everything in quotes: lbl2xs -p '1013, 800, 500'
)
To run these scripts you need molecular spectroscopic line parameters
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
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), ....
Documentation and Some Questions
For a detailed review of line-by-line modeling for infrared radiative transfer see this lbl2od.pdf
© fgs (+49-8153-28-1234)
Thu Mar 11, 2010; 16:57