Module Expr Str ImportFrom alias Import alias identifier Assign NameStore TupleLoad Str Str Str Str Str Assign NameStore TupleLoad Str Str Assign NameStore BinOpAdd NameLoad NameLoad FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore BinOpSub Num BinOpMult Num BinOpPow NameLoad Num Return NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore BinOpMult Num BinOpPow BinOpDiv BinOpSub Num NameLoad Num BinOpDiv Num Num Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults Num body Expr Str Assign NameStore BinOpDiv BinOpMult NameLoad NameLoad Num Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults Str body Expr Str Assign NameStore NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad Assign NameStore Call AttributeLoad NameLoad attr If CompareEq Str NameLoad body Assign NameStore BinOpDiv Num BinOpAdd Call AttributeLoad NameLoad attr NameLoad BinOpMult Num BinOpPow BinOpAdd Num BinOpSub Num NameLoad Num orelse If CompareEq Str NameLoad body Assign NameStore BinOpDiv Num BinOpAdd Call AttributeLoad NameLoad attr NameLoad BinOpMult Num BinOpPow BinOpSub Num NameLoad Num orelse If CompareEq Str NameLoad body Assign NameStore BinOpDiv Num Call AttributeLoad NameLoad attr NameLoad orelse If CompareEq Str NameLoad body Assign NameStore BinOpDiv Num Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr BinOpAdd BinOpSub Num NameLoad BinOpDiv Num BinOpAdd Num BinOpMult Num BinOpPow BinOpSub Num NameLoad Num orelse If CompareEq Str NameLoad body Assign NameStore BinOpMult BinOpDiv Num Call AttributeLoad NameLoad attr NameLoad BinOpSub BinOpSub Num BinOpMult Num BinOpPow BinOpDiv Num Call AttributeLoad NameLoad attr NameLoad Num Num orelse If CompareEq Str NameLoad body Assign NameStore BinOpDiv BinOpAdd BinOpAdd BinOpMult Num BinOpPow Call AttributeLoad NameLoad attr NameLoad Num BinOpMult Num Call AttributeLoad NameLoad attr NameLoad Num BinOpAdd BinOpAdd BinOpAdd BinOpPow Call AttributeLoad NameLoad attr NameLoad Num BinOpMult Num BinOpPow Call AttributeLoad NameLoad attr NameLoad Num BinOpMult Num Call AttributeLoad NameLoad attr NameLoad Num orelse If CompareEq Str NameLoad body Assign NameStore BinOpDiv Num BinOpAdd Call AttributeLoad NameLoad attr NameLoad BinOpMult BinOpMult Num NameLoad BinOpPow BinOpSub Num NameLoad Num orelse Raise Call NameLoad Str NameLoad TryExcept body Assign SubscriptStore NameLoad Index CompareGt NameLoad Num AttributeLoad NameLoad attr handlers ExceptHandler type NameLoad body Assign NameStore IfExp CompareGt NameLoad Num AttributeLoad NameLoad attr NameLoad Return NameLoad decorator_list
N/A N/A 
The ``atmosphere`` module contains methods to calculate relative and
absolute airmass and to determine pressure from altitude or vice versa.
 __future__ division N/A numpy np N/A APPARENT_ZENITH_MODELS N/A simple kasten1966 kastenyoung1989 gueymard1993 pickering2002 N/A TRUE_ZENITH_MODELS N/A youngirvine1967 young1994 N/A AIRMASS_MODELS N/A APPARENT_ZENITH_MODELS TRUE_ZENITH_MODELS pres2alt N/A N/A pressure N/A N/A N/A 
    Determine altitude from site pressure.

    Parameters
    ----------
    pressure : scalar or Series
        Atmospheric pressure (Pascals)

    Returns
    -------
    altitude : scalar or Series
        Altitude in meters above sea level

    Notes
    ------
    The following assumptions are made

    ============================   ================
    Parameter                      Value
    ============================   ================
    Base pressure                  101325 Pa
    Temperature at zero altitude   288.15 K
    Gravitational acceleration     9.80665 m/s^2
    Lapse rate                     -6.5E-3 K/m
    Gas constant for air           287.053 J/(kgK)
    Relative Humidity              0%
    ============================   ================

    References
    -----------

    "A Quick Derivation relating altitude to air pressure" from Portland
    State Aerospace Society, Version 1.03, 12/22/2004.
     N/A alt N/A 44331.5 N/A 4946.62 N/A pressure 0.190263 N/A alt N/A alt2pres N/A N/A altitude N/A N/A N/A 
    Determine site pressure from altitude.

    Parameters
    ----------
    Altitude : scalar or Series
        Altitude in meters above sea level

    Returns
    -------
    Pressure : scalar or Series
        Atmospheric pressure (Pascals)

    Notes
    ------
    The following assumptions are made

    ============================   ================
    Parameter                      Value
    ============================   ================
    Base pressure                  101325 Pa
    Temperature at zero altitude   288.15 K
    Gravitational acceleration     9.80665 m/s^2
    Lapse rate                     -6.5E-3 K/m
    Gas constant for air           287.053 J/(kgK)
    Relative Humidity              0%
    ============================   ================

    References
    -----------

    "A Quick Derivation relating altitude to air pressure" from Portland
    State Aerospace Society, Version 1.03, 12/22/2004.
     N/A press N/A 100 N/A N/A N/A 44331.514 altitude 11880.516 N/A 1 0.1902632 N/A press N/A absoluteairmass N/A N/A airmass_relative pressure N/A 101325.0 N/A N/A 
    Determine absolute (pressure corrected) airmass from relative
    airmass and pressure

    Gives the airmass for locations not at sea-level (i.e. not at
    standard pressure). The input argument "AMrelative" is the relative
    airmass. The input argument "pressure" is the pressure (in Pascals)
    at the location of interest and must be greater than 0. The
    calculation for absolute airmass is

    .. math::
        absolute airmass = (relative airmass)*pressure/101325

    Parameters
    ----------

    airmass_relative : scalar or Series
        The airmass at sea-level.

    pressure : scalar or Series
        The site pressure in Pascal.

    Returns
    -------
    scalar or Series
        Absolute (pressure corrected) airmass

    References
    ----------
    [1] C. Gueymard, "Critical analysis and performance assessment of
    clear sky solar irradiance models using theoretical and measured
    data," Solar Energy, vol. 51, pp. 121-138, 1993.

     N/A airmass_absolute N/A N/A airmass_relative pressure 101325.0 N/A airmass_absolute N/A relativeairmass N/A N/A zenith model N/A kastenyoung1989 N/A N/A 
    Gives the relative (not pressure-corrected) airmass.

    Gives the airmass at sea-level when given a sun zenith angle (in
    degrees). The ``model`` variable allows selection of different
    airmass models (described below). If ``model`` is not included or is
    not valid, the default model is 'kastenyoung1989'.

    Parameters
    ----------

    zenith : float or Series
        Zenith angle of the sun in degrees. Note that some models use
        the apparent (refraction corrected) zenith angle, and some
        models use the true (not refraction-corrected) zenith angle. See
        model descriptions to determine which type of zenith angle is
        required. Apparent zenith angles must be calculated at sea level.

    model : String
        Available models include the following:

        * 'simple' - secant(apparent zenith angle) -
          Note that this gives -inf at zenith=90
        * 'kasten1966' - See reference [1] -
          requires apparent sun zenith
        * 'youngirvine1967' - See reference [2] -
          requires true sun zenith
        * 'kastenyoung1989' - See reference [3] -
          requires apparent sun zenith
        * 'gueymard1993' - See reference [4] -
          requires apparent sun zenith
        * 'young1994' - See reference [5] -
          requries true sun zenith
        * 'pickering2002' - See reference [6] -
          requires apparent sun zenith

    Returns
    -------
    airmass_relative : float or Series
        Relative airmass at sea level.  Will return NaN values for any
        zenith angle greater than 90 degrees.

    References
    ----------

    [1] Fritz Kasten. "A New Table and Approximation Formula for the
    Relative Optical Air Mass". Technical Report 136, Hanover, N.H.:
    U.S. Army Material Command, CRREL.

    [2] A. T. Young and W. M. Irvine, "Multicolor Photoelectric
    Photometry of the Brighter Planets," The Astronomical Journal, vol.
    72, pp. 945-950, 1967.

    [3] Fritz Kasten and Andrew Young. "Revised optical air mass tables
    and approximation formula". Applied Optics 28:4735-4738

    [4] C. Gueymard, "Critical analysis and performance assessment of
    clear sky solar irradiance models using theoretical and measured
    data," Solar Energy, vol. 51, pp. 121-138, 1993.

    [5] A. T. Young, "AIR-MASS AND REFRACTION," Applied Optics, vol. 33,
    pp. 1108-1110, Feb 1994.

    [6] Keith A. Pickering. "The Ancient Star Catalog". DIO 12:1, 20,

    [7] Matthew J. Reno, Clifford W. Hansen and Joshua S. Stein, "Global
    Horizontal Irradiance Clear Sky Models: Implementation and Analysis"
    Sandia Report, (2012).
     N/A z zenith N/A zenith_rad N/A N/A np radians z N/A model N/A N/A model lower N/A N/A kastenyoung1989 model N/A N/A am N/A 1.0 N/A N/A N/A np cos zenith_rad N/A 0.50572 N/A N/A 6.07995 N/A 90 z -1.6364 N/A N/A N/A kasten1966 model N/A N/A am N/A 1.0 N/A N/A N/A np cos zenith_rad N/A 0.15 N/A N/A 93.885 z -1.253 N/A N/A N/A simple model N/A N/A am N/A 1.0 N/A N/A np cos zenith_rad N/A N/A N/A pickering2002 model N/A N/A am N/A 1.0 N/A N/A np sin N/A N/A np radians N/A N/A 90 z N/A 244.0 N/A 165 N/A 47.0 N/A N/A 90 z 1.1 N/A N/A N/A youngirvine1967 model N/A N/A am N/A N/A 1.0 N/A N/A np cos zenith_rad N/A N/A 1 N/A 0.0012 N/A N/A 1.0 N/A N/A np cos zenith_rad 2 1 N/A N/A N/A young1994 model N/A N/A am N/A N/A N/A N/A 1.002432 N/A N/A N/A np cos zenith_rad 2 N/A 0.148386 N/A N/A np cos zenith_rad 0.0096467 N/A N/A N/A N/A N/A N/A np cos zenith_rad 3 N/A 0.149864 N/A N/A N/A np cos zenith_rad 2 N/A 0.0102963 N/A N/A np cos zenith_rad 0.000303978 N/A N/A N/A gueymard1993 model N/A N/A am N/A 1.0 N/A N/A N/A np cos zenith_rad N/A N/A 0.00176759 z N/A N/A 94.37515 z -1.21563 N/A N/A N/A ValueError %s is not a valid model for relativeairmass model N/A N/A N/A N/A am N/A N/A z 90 N/A np nan N/A N/A N/A TypeError N/A N/A am N/A N/A z 90 N/A np nan am N/A am N/A