lbl2ac
index
/users/schrei_f/src/py4CAtS/lbl/lbl2ac.py

lbl2ac
 computation of line-by-line absorption coefficients due to molecular absorption
 
 usage:
 lbl2ac  [options]  atm_file  line_parameter_file(s)
 
 -h               help
 -c     char      comment character(s) used in input,output file (default '#')
 -o     string    output file for saving of optical depth (if not given: write to StdOut)
                  (if the output file's extension ends with ".nc", ".ncdf" or ".netcdf",
                   a netcdf file is generated, otherwise the file is ascii tabular)
 
--BoA   float     bottom-of-atmosphere altitude [km]  (compute opt.depth only for levels above)
--ToA   float     top-of-atmosphere altitude [km]     (compute opt.depth only for levels below)
                  NOTE:  no interpolation, i.e. integration starts/stops at the next level above/below BoA/ToA
--scale floats    multiply molecular concentrations with scaleFactors
                  (either a comma separated list of floats (no blanks) in the same order as for the line data files,
                  or just a single float to scale the profile of the molecule corresponding to the first lineFile.)
 -x     Interval  lower,upper wavenumbers (comma separated pair of floats [no blanks!],
                                           default set according to range of lines in datafiles)
 
 For more information see also the lbl2xs and lbl2od help.

 
Modules
       
numpy

 
Functions
       
lbl2ac(atmos, lineListsDict, xLimits=None, lineShape='Voigt', sampling=5.0, nGrids=3, gridRatio=8, nWidths=25.0, lagrange=2, interpolate='2', xsFile=None, verbose=False)
Compute cross sections for some molecule(s) and some pressure(s),temperature(s) by summation of line profiles;
Compute absorption coefficients as product cross section times molecular density, summed over all molecules.
 
ARGUMENTS:
----------
atmos:         atmospheric data set, notably including zGrid=atmos['z']
lineListsDict  (molecular) line parameters: a dictionary of structured arrays
 
RETURNS:
--------
absCo:        a subclassed numpy array with the absorption coefficients,
              with z, p, T, and wavenumber grid information as attributes (similar to xsArray)
 
See the lbl2xs and lbl2od functions for details about further optional arguments.

 
Data
        molecNames = ['H2O', 'HDO', 'CO2', 'O3', 'N2O', 'CO', 'CH4', 'CH3D', 'O2', 'NO', 'SO2', 'NO2', 'NH3', 'HNO3', 'OH', 'HF', 'HCl', 'HBr', 'HI', 'ClO', ...]
molecules = {'BrO': {'NumDeg': [1], 'TempExpGL': 0.5, 'TempExpQR': 1.0, 'VibFreq': [500.0], 'isotopes': ['69', '61'], 'mass': 95.0}, 'C2H2': {'NumDeg': [1, 1, 1, 2, 2], 'TempExpGL': 0.75, 'TempExpQR': 1.0, 'VibFreq': [3374.0, 1974.0, 3289.0, 629.0, 730.0], 'geisa': 24, 'hitran': 26, 'isotopes': ['1221', '1231', '1222'], 'mass': 26.03, 'sao': 26}, 'C2H4': {'NumDeg': [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], 'TempExpGL': 0.5, 'TempExpQR': 1.5, 'VibFreq': [3026, 1625, 1342, 1023, 3103, 1236, 949, 943, 3106, 826, 2989, 1444], 'geisa': 25, 'hitran': 38, 'isotopes': ['221', '311'], 'mass': 28.0}, 'C2H6': {'NumDeg': [1, 1, 1, 1, 1, 1, 2, 1, 2], 'TempExpGL': 0.75, 'TempExpQR': 1.9, 'VibFreq': [2899.0, 1375.0, 993.0, 275.0, 2954.0, 1379.0, 2994.0, 1486.0, 822.0], 'geisa': 22, 'hitran': 27, 'isotopes': ['1221', '1231'], 'mass': 30.07, 'sao': 27}, 'C2HD': {'NumDeg': [1, 1, 1, 2, 2], 'VibFreq': [3374.0, 1974.0, 3289.0, 629.0, 730.0], 'geisa': 48, 'isotopes': ['122'], 'mass': 17.0}, 'C2N2': {'NumDeg': [1, 1, 1, 1, 1], 'VibFreq': [2330, 846, 2158, 503, 234], 'geisa': 29, 'hitran': 48, 'isotopes': ['4224'], 'mass': 52.0}, 'C3H4': {'NumDeg': [1, 1, 1, 1, 1, 2, 2, 2, 2, 2], 'VibFreq': [3334, 2918, 2142, 1382, 931, 3008, 1452, 1053, 633, 328], 'geisa': 40, 'mass': 40.0}, 'C3H8': {'NumDeg': [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, ...], 'VibFreq': [2977, 2962, 2887, 1476, 1462, 1392, 1158, 869, 369, 2967, 1451, 1278, 940, 216, 2968, 2887, 1464, 1378, 1338, 1054, ...], 'geisa': 28, 'isotopes': ['221'], 'mass': 44.0}, 'C4H2': {'NumDeg': [1, 1, 1, 1, 1, 1, 1, 1, 1], 'VibFreq': [3293, 2184, 874, 3329, 2020, 627, 482, 630, 231], 'geisa': 30, 'hitran': 43, 'isotopes': ['221'], 'mass': 50.0}, 'C6H6': {'NumDeg': [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], 'VibFreq': [3062, 992, 1326, 673, 3068, 1010, 995, 703, 1310, 1150, 849, 3063, 1486, 1038, 3047, 1596, 1178, 606, 975, 410], 'geisa': 47, 'isotopes': ['266'], 'mass': 78.0}, ...}