xs2ac
index
/users/schrei_f/src/py4CAtS/art/xs2ac.py

xs2ac
 
 Read atmospheric and molecular absorption cross section files, scale by density, and sum to absorption coefficients
 
 usage:
 xs2ac  [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 or pickled)
 
--scale floats    scaling factors for molecular concentrations
 -m     char      mode: 'c' ---> cumulative optical depth
                        'd' ---> difference (delta) optical depth (default)
                        'r' ---> reverse cumulative optical depth
                        't' ---> total optical depth
 -i     char      interpolation method   [default: '2' two-point Lagrange,  choices are one of "234lqc"]
--xFormat string  format to be used for wavenumbers,   default '%12f'   (only for ascii tabular)
--yFormat string  format to be used for optical depth, default '%11.5f' (only for ascii tabular)
                  (if xFormat or yFormat is an empty string, netcdf or pickled format will be used)

 
Modules
       
numpy

 
Functions
       
xs2ac(atmos, xssDict, interpolate='l', verbose=False)
Compute absorption coefficients as product cross section times molecular density, summed over all molecules.
 
ARGUMENTS:
----------
atmos:        a structured numpy array with atmospheric data, esp. molecular number densities
xssDict:      a dictionary of cross section lists, one list with npT=nLevels xsArrays
              (subclassed numpy arrays) for each molecule.
interpolate:  string or integer to select the interpolation method (default: linear using numpy.interp)
verbose:      boolean flag
 
RETURNS:
--------
absCo:        a subclassed numpy array with the absorption coefficients,
              with z, p, T, and wavenumber grid information as attributes (similar to xsArray)