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

od2ri
 (absorption) optical depth to radiation intensity --- Schwarzschild solver
 
 usage:
 od2ri   [options]  opticalDepthFile
 
 -h              help
 -c    char      comment character(s) used in input,output file (default '#')
 -o    string    output file for saving of radiances (if not given: write to StdOut)
 
--BoA  float     bottom-of-atmosphere altitude [km]  (read opt.depth only for levels above)
--ToA  float     top-of-atmosphere altitude [km]     (read opt.depth only for levels below)
                 NOTE:  no interpolation, i.e. integration starts/stops at the next level above/below BoA/ToA
 -C              flag indicating that input optical depth is cumulative (default: difference/delta od)
 -q   char       quadrature method:  trapezoid with default 'T' for "B linear in tau" or 'E' for "B exponential in tau"
 -g   float      ground / surface altitude [km]  (default 0.0)
 -T   float      surface temperature [K]  (default 0)
 -v              flag: verbose
 -x   Interval   lower,upper wavenumbers (comma separated pair of floats [no blanks!],
                                          default set according to range of optical depth in datafiles)
 -S   float      sun zenith angle, SZA (sun at zenith: 0dg, sun at horizon: 90dg)
 -z   float      observer zenith angle (uplooking: 0dg, downlooking 180dg)
                 NOTE:  a horizontal view, i.e. angle=90dg, is not implemented!!!
 
 
 WARNING:
 od2ri  does not know the type of optical depth (delta or accumulated ...) given in the input file!
        ===> use the -C flag if you have (ac)cumulated optical depth

 
Modules
       
numpy

 
Functions
       
dod2ri(dodList, obsAngle=0.0, tSurface=None, rSurface=0.0, zSurface=None, sunAngle=0.0, space=None, omega=None, mode=None, verbose=False)
Evaluate Schwarzschild or Beer integral equation(s), optionally add surface or space radiation and return radiance.
 
ARGUMENTS:
----------
 
dodList:       delta (layer) optical depths (a list of odArray's)
obsAngle:      observer viewing zenith angle: 0dg=uplooking (default) ... 180dg=downloooking/nadir
               NOTE:  a horizontal view with 90dg is not implemented!!!
tSurface:      surface temperature [K], default None
               ===> Schwarzschild mode: no background contribution, only atmosppheric thermal emission
                    Beer mode:          use BoA temperature
rSurface:      surface reflectivity, equivalent to one-emissivity:  R=1-E; default 0.0 (i.e. full emissivity)
zSurface:      ground/bottom altitude (default None, i.e. use BoA altitude)
sunAngle:      solar zenith angle: 0dg=zenith (default) ... 90dg=horizon
space:         temperature [K] or irradiance spectrum, default None
               * positive floats:  simply assume I_space = Planck (v,space)
               * negative float (approx -6000):  convert to irradiance as
                 I_space = pi*(sunRadius/sun2earth)**2*planck(v,-space)
               * file(name):  read extraterrestrial irradiance spectrum from file (e.g. Kurusz)
omega          single scattering albedo (default None)
               if 0<=omega<=1 automatically select mode Schwarzschild with B exponential in opt.depth
mode:          Schwarzschild | Beer | ...
               default None, i.e. choose automatically
               Schwarzschild for v<=3000cm-1   (lambda>=3.33mue)
               Beer              v> 3000cm-1   (lambda< 3.33mue)
 
RETURNS:
--------
riArray:       a subclassed numpy array with radiance along with some attributes
 
NOTE: ??? outdated ???
-----
dod2ri  evaluates the Schwarzschild (and Beer) integral from the first to the last altitude,
i.e. lowest to highest for an uplooking observer (zenith<90dg) and highest to lowest for nadir view.
If you want radiance for an observer somewhere in between, give only the subset of relevant odArray's.
However, dod2ri does not consider an observer between the levels (layer bounds).
ln = log(...)
log(x[, base])
 
Return the logarithm of x to the given base.
If the base not specified, returns the natural logarithm (base e) of x.
oDepth_subLayer(dodList, zSurface)
'Interpolate' bottom layer optical depth and return a (true) copy of the opt depth list.
unpack_oDepths(dodList, zSurface=None)
Unpack opt. depth list, evtl. skip bottom layer(s) and 'interpolate' lowest layer.

 
Data
        earth2sun = 14959787070000
lengthUnits = {'A': 1e-08, 'au': 14959787070000, 'cm': 1.0, 'dm': 10.0, 'inch': 2.54, 'km': 100000.0, 'ly': 946073047258080000, 'm': 100.0, 'micrometer': 0.0001, 'mm': 0.1, ...}
pi = 3.141592653589793
radiusSun = 69570000000.0
recPi = 0.3183098861837907