ac2wf
index
/users/schrei_f/src/py4CAtS/lite/src/ac2wf.py

ac2wf
 computation of weighting funtions given absorption coefficients along with atmospheric data (altitudes)
 
 usage:
 ac2wf  [options]  absCoFile
 
 -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)
 
 -a     float     observer angle [dg]
                  uplooking = 0dg ... nadir downlooking = 180dg (default)
 -z     float     observer altitude [km]
                  NOTE:  no interpolation, i.e. integration starts/stops at the next level above/below BoA/ToA
 -t               save transposed weighting functions, i.e. distance (altitude) vs WF
                  (default:  save wavenumber grid (first column) vs WF (following columns))
 -x     Interval  lower,upper wavenumbers (comma separated pair of floats [no blanks!],
                                           default set according to range of lines in datafiles)
--fov   string    type of field-of-view function:  Gauss | Box | Rectangle
 -w     float     width of field-of-view, HWHM in dg, default 1.0

 
Functions
       
ac2wf(acList, angle=180.0, zObs=None, FoV=None)
Absorption coefficient to weighting functions.
 
ARGUMENTS:
----------
acList:      list of (molecular) absorption coefficients [1/cm]  (acArray's with x, z, p, T as attributes)
angle:       zenith viewing angle [dg]:  0dg=uploooking ... 180dg downlooking default
zObs:        observer altitude [cm] (if very small, assume km and scale by 1e5 to get cm)
             if unspecified: assume ToA for angle>90dg, i.e. nadir corresponding to the default angle
                             assume BoA for angle<90dg
FoV:         string giving field-of-view type and width (HWHM in dg), e.g. "Gauss 1.0" (default None)
             (computed by sum of three pencil beams)
RETURNS:
--------
wgtFct       a numpy array matrix along with attributes
 
NOTE:
-----
the shape of the weighting function array returned depends on the number of levels above/below the observer
dod2wf(dodList, angle=180.0, zObs=None)
Optical depth to weighting functions (using 2-point finite difference).
 
Arguments:
----------
dodList:     differential optical depth list
angle:       viewing angle [dg]:  0dg=uploooking ... 180dg downlooking (default)
zObs:        observer altitude [cm] (if very small, assume km and scale by 1e5 to get cm)
             if unspecified: assume ToA for angle>90dg, i.e. nadir corresponding to the default angle
                             assume BoA for angle<90dg
 
RETURNS:
--------
vGrid        the spectral grid (wavenumbers)
sGrid        the spatial grid (altitudes (scaled by 1/cos(angle)) relative to observer)
wgtFct       numpy array matrix with absCo.shape[0] rows and ??? columns for the altitude(s)
 
WARNING:
--------
probably more accurate to compute finite diff of optical depth and multiply with transmission
OR even better "analytically" from transmission*absCoefficient (see function ac2wf)
sqrt(...)
sqrt(x)
 
Return the square root of x.

 
Data
        recSqrtPi = 0.5641895835477563