atmqty
Manual: AtmQty
Object InstantiationMinimally, an AtmQty
object requires 3 positional
keywords to be instantiated. Thus, the following line will instantiate
an AtmQty
object:
>>> x = atmqty.AtmQty(lat, lon, lev)
This object is in pressure coordinates in the vertical
(lev_type = "pressure"
)
and has a missing value (missing
) value of 1e+20.
Latitude, longitude, and levels are each Numeric
vectors,
lat
, lon
, and lev
, respectively.
The lat
and lon
vectors must be
monotonically increasing with increasing vector index.
The lev
vector must be either
monotonically increasing or monotonically decreasing
with increasing vector index.
The values of lev_type
and missing
are
set to their defaults because they were not given in the keyword
argument list; of course, we can set them explicitly in the
calling line:
>>> x = atmqty.AtmQty( lat, lon, lev, lev_type="pressure" \ ... , missing=1e+20 )
All domain-describing attributes must not change for the life
of the object. In the case above, this means lat
,
lon
, lev
, lev_type
and missing
are fixed. In fact, for all pressure
coordinate domains, these 5 attributes, and only these 5,
must be fixed.
If the levels are isentropic, besides the
5 attributes held fixed for pressure coordinate domains,
the p0
attribute is also set on object instantiation
and remains fixed for the life of the instance. p0
can be passed via the argument list:
>>> x = atmqty.AtmQty( lat, lon, lev, lev_type="isentropic" \ ... , p0=1000.0, missing=1e+20 )
or, if not explicitly included, will be set to the default value of 1000. These 6, and only these 6, attributes must be fixed for the life of an isentropic levels instance.
To reiterate, this means that p0
is not defined
upon the instantiation of a pressure level domain instance. That
attribute only comes into existence when potential temperature is
calculated and can be changed whenever potential temperature
is recalculated to a different reference pressure.
When the domain is on isentropic levels, however,
p0
is defined on instantiation and does not change
for the life of the instance.
The summary list of attributes provides a quick reference sheet as to what attributes are fixed and what values attributes take on object instantiation.