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

xs2od
 
 Read atmospheric and molecular absorption cross section files,
 sum to absorption coefficients, and integrate over vertical path through atmosphere.
 
 usage:
 xs2od  [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"]
--nm              on output write optical depth versus wavelength [nm] (default: wavenumber 1/cm)
--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
       
xs2dod(atmos, xssDict, interpolate='linear', verbose=False)
Compute absorption coefficients as product cross section times molecular density, summed over all molecules.
    Integrate absorption coefficients layer-by-layer along vertical path thru atmosphere to get delta optical depths.
 
    This function is essentially a combiniation of the xs2ac and ac2dod functions.
 
ARGUMENTS:
----------
atmos:         a structured array of atmospheric data
xssDict:       a dictionary of cross sections, one entry per molecule
interpolate:   default linear
verbose:       flag, default False
 
RETURNS:
--------
optDepth:    a list of subclassed numpy arrays with the layer/delta optical depths,
             including z, p, T, and wavenumber grid information as attributes (similar to xsArray)