atmqty: Summary of AtmQty Object Methods

Object Management

All positional input arguments, unless otherwise stated, are Numeric arrays. If the "Arguments" column is "N/A" the method requires an empty argument list. Keyword inputs are shown with their default value.

Method Arguments Description
__init__ lat, lon, lev, lev_type="pressure", missing=1e+20, p0=None Initialize the object for a grid given by lat [deg], lon [deg], and lev [units given by lev_type]. Set lev_type to either 'pressure' or 'isentropic', and set missing to the missing value value. All arguments in __init__ are set to an object attribute of the same name.
add_qty *quantities Add/replace variable(s) to qty attribute. The variables are specified by a dictionary of key:value pair(s) corresponding to an atmospheric quantity name and array; *quantities is any number of such dictionaries.
del_qty *names Delete variable(s) from qty attribute. *names is any number of string scalars of the key name(s) of the atmospheric quantity(ies) to remove.
get_qty name Get variable from qty attribute. name is the string scalar key name of the atmospheric quantity to obtain.
get_qty_asMA name Get variable from qty attribute. The variable is returned as an MA masked array. name is the string scalar key name of the atmospheric quantity to obtain.
has_qty name Check if qty attribute has quantity (returns 1 if has, 0 if not). name is the string scalar key name of the atmospheric quantity to check.
isnew N/A Checks whether the object is in a state consistent with being a newly instantiated object (returns 1 if is in such a state and 0 if not).
list_all_qty N/A List all quantities in qty attribute.


Atmospheric Quantities Calculations

All positional input arguments, unless otherwise stated, are Numeric arrays. If method takes no arguments, the "Arguments" column is filled with "N/A". Keyword inputs are shown with their default value. If keyword inputs are set to None, see the description of the method in the class description for the default values used in the method.

Method Arguments Description
alt P_surf=None, T_surf=None Calculate altitude, assuming temperature-pressure have the relationship as described by the 1976 U.S. Standard Atmosphere, and add result to qty attribute.
eice N/A Calculate saturation vapor pressure over ice and add result to qty attribute.
esat N/A Calculate saturation vapor pressure over water and add result to qty attribute.
fc N/A Calculate Coriolis parameter and add result to qty attribute.
ipv N/A Calculate isentropic potential vorticity and add result to qty attribute.
mix_ratio N/A Calculate mixing ratio and add result to qty attribute.
press N/A Calculate pressure (given temperature and potential temperature) and add result to qty attribute.
rho N/A Calculate air density (including moisture effects) and add result to qty attribute.
static_stability N/A Calculate static stability (a.k.a. square of buoyancy frequency) and add result to qty attribute.
theta p0=1000.0 Calculate potential temperature and add result to qty attribute. Keyword parameter p0 is the reference pressure [hPa].
vapor_press N/A Calculate vapor pressure and add result to qty attribute.
virt_temp N/A Calculate virtual temperature and add result to qty attribute.
vort_rel N/A Calculate relative vorticity and add result to qty attribute.


Return to atmqty Home Page.
Return to Johnny Lin's Python Library.

Updated: May 3, 2004 by Johnny Lin <email address>. License.