atmconst (version 0.1.1, 12 Jan 2005)
index
atmconst.py

Module defines a single class.
 
See class docstring for description.

 
Classes
       
AtmConst

 
class AtmConst
    Key atmospheric-related constants, defined for the earth.
 
This class accepts no arguments and has no methods.  Class
attributes set the atmospheric related constants.  A copy of all 
class attributes (whether non-derived or derived) are made as 
instance attributes to allow a straightforward way to alter a 
constant locally without affecting the entire class.
 
Remember, if you change a class attribute, the class attribute
for all pre-existing instances of the class will change, and any 
new instances of the class will be initialized to the value of
the changed class attribute.
 
 
Class Attributes:
* c_p:  Specific heat at constant pressure for dry air [J/(K kg)].
* C2K_add_offset:  Value to add to degrees Centigrade to convert 
  to Kelvin.  0 deg C is defined to be at the ice point, which is
  273.15 K.  Note the triple point and ice point are different.
  In Kelvin, the fundamental reference point is the triple point,
  which equals 273.16.  See Weast (p. F-73, 90) for details.
* epsilon:  Ratio of gas constant for dry air to gas constant 
  for water vapor [unitless].
* g:  Gravitational constant [m/s**2].  Set to g_wmo.
* g_approx:  Approximate value of gravitational constant [m/s**2].
  This value is commonly used in rough calculations.
* g_rean:  Gravitational constant [m/s**2] used in most calcula-
  tions in the NCEP/NCAR reanalysis.  See the FAQ for details:
  http://dss.ucar.edu/pub/reanalysis/FAQ.html.
* g_wmo:  Gravitational constant [m/s**2] used by the WMO to cali-
  brate barometers.
* Gamma_d:  Dry adiabatic lapse rate [K/m].
* ice_point:  The ice point of water [K].
* kappa:  Ratio R_d to c_p [unitless].
* Omega:  Angular velocity of the Earth [rad/s].
* R_d:  Gas constant for dry air [J/(K kg)].
* R_univ:  Universal gas constant [J/(mol kg)].
* R_v:  Gas constant for water vapor [J/(K kg)].
* Rad_earth:  Mean radius of the earth [m].  Value used is the same
  as the shared constants value in the NCAR CCSM Coupler:
  http://www.ccsm.ucar.edu/models/ccsm2.0/cpl5/users_guide/node10.html.
  See the references section below for the citation of the coupler's
  User's Guide.
* sea_level_press:  Sea level pressure [Pa].
* sea_level_temp:  Sea level temperature [K].
* sigma:  Stefan-Boltzman constant [W/(m**2 K**4)].
* triple_point:  The triple point of water [K].
 
 
Class Instance Attributes:
* All the class attributes also exist as instance attributes of the
  same name.  Initial values of the instance attributes are set to 
  the value of the corresponding class attributes.
 
 
References:
* Carmichael, Ralph (2003):  "Definition of the 1976 Standard Atmo-
  sphere to 86 km," Public Domain Aeronautical Software (PDAS).
  URL:  http://www.pdas.com/coesa.htm.
* Glickman, T. S. (Ed.) (2000):  Glossary of Meterology.  Boston,
  MA:  American Meteorology Society, 855 pp.
* Kauffman, B. G., and W. G. Large (2002):  The CCSM Coupler, Ver-
  sion 5.0, Combined User's Guide, Source Code Reference, and Scien-
  tific Description.  Boulder, CO:  NCAR.  Available online at URL:
  http://www.ccsm.ucar.edu/models/ccsm2.0/cpl5/users_guide/.
* Peixoto, J. P., and A. H. Oort (1992):  Physics of Climate.  
  New York, NY:  American Institute of Physics, ISBN 0-88318-711-6, 
  520 pp.
* Shea, D. J., S. J. Worley, I. R. Stern, and T. J. Hoar (1995, 
  2003): An Introduction to Atmospheric and Oceanographic Datasets, 
  NCAR Technical Note NCAR/TN-404+IA.  Boulder, CO:  NCAR.  Web 
  copy:  http://www.cgd.ucar.edu/cas/tn404/.
* Wallace, J. M., and P. V. Hobbs (1977): Atmospheric Science:  
  An Introductory Survey.  San Diego, CA:  Academic Press, ISBN 
  0-12-732950-1, 467 pp.
* Weast, R. C. (Ed.) (1987):  CRC Handbook of Chemistry and Physics
  (68th Edition).  Boca Raton, FL:  CRC Press, Inc.
 
 
Examples:
>>> from atmconst import AtmConst
>>> AtmConst.g
9.8066499999999994
>>> const = AtmConst()
>>> const.g
9.8066499999999994
 
>>> const.g = AtmConst.g_rean
>>> const.g
9.8000000000000007
>>> AtmConst.g
9.8066499999999994
>>> new_const = AtmConst()
>>> new_const.g
9.8066499999999994
 
>>> AtmConst.g = AtmConst.g_rean
>>> AtmConst.g
9.8000000000000007
>>> new_const.g
9.8066499999999994
>>> newest_const = AtmConst()
>>> newest_const.g
9.8000000000000007
 
  Methods defined here:
__init__(self)
Initialize copy of class attributes as instance attributes.

Data and other attributes defined here:
C2K_add_offset = 273.14999999999998
Gamma_d = 0.0097675796812748995
Omega = 7.2921000000000002e-05
R_d = 287.05000000000001
R_univ = 8.3169629999999994
R_v = 461.52999999999997
Rad_earth = 6371220.0
c_p = 1004.0
epsilon = 0.62195306913960091
g = 9.8066499999999994
g_approx = 9.8100000000000005
g_rean = 9.8000000000000007
g_wmo = 9.8066499999999994
ice_point = 273.14999999999998
kappa = 0.28590637450199202
sea_level_press = 101325.0
sea_level_temp = 288.14999999999998
sigma = 5.6703199999999999e-08
triple_point = 273.16000000000003

 
Data
        __author__ = 'Johnny Lin <http://www.johnny-lin.com/>'
__credits__ = 'Thanks to the CSC group at the University of Chicago.'
__date__ = '12 Jan 2005'
__test__ = {'Additional Examples': '\n (1) Class Attributes:\n\n >>> from atmcons... >>> const.sigma\n 5.6703199999999999e-08\n '}
__version__ = '0.1.1'

 
Author
        Johnny Lin <http://www.johnny-lin.com/>

 
Credits
        Thanks to the CSC group at the University of Chicago.