pyiem.datatypes module
Classes Representing various variables
-
class pyiem.datatypes.basetype(value, units)[source]
Bases: object
Base Object for all our vars
-
get_units()[source]
Returns the units for this current datatype
- Returns:
the unit of this datatype
- Return type:
(str)
-
class pyiem.datatypes.mixingratio(value, units)[source]
Bases: basetype
Mixing Ratio.
-
known_units = ['KG/KG']
-
value(units)[source]
Convert the value into the provided units
-
class pyiem.datatypes.distance(value, units)[source]
Bases: basetype
Distance
-
known_units = ['SM', 'MI', 'M', 'KM', 'FT', 'MM', 'IN', 'CM']
-
value(units)[source]
Convert to a value in the given units
-
class pyiem.datatypes.precipitation(value, units)[source]
Bases: basetype
Precipitation
-
known_units = ['IN', 'CM', 'MM']
-
value(units)[source]
Convert to a value in the given units
-
class pyiem.datatypes.speed(value, units)[source]
Bases: basetype
Speed
-
known_units = ['KT', 'MPH', 'MPS', 'KMH', 'KTS']
-
value(units=None)[source]
Convert to a value in the given units
-
class pyiem.datatypes.humidity(value, units)[source]
Bases: basetype
Humidity, this is not as straight forward as the others
-
known_units = ['%']
-
value(units)[source]
Convert to a value in the given units
-
class pyiem.datatypes.direction(value, units)[source]
Bases: basetype
Direction from North
-
known_units = ['DEG', 'RAD']
-
value(units)[source]
Convert to a value in the given units
-
class pyiem.datatypes.pressure(value, units)[source]
Bases: basetype
Pressure
-
known_units = ['MB', 'HPA', 'IN', 'PA']
-
value(units)[source]
Convert to a value in the given units
-
class pyiem.datatypes.temperature(value, units)[source]
Bases: basetype
Temperature
-
known_units = ['F', 'K', 'C']
-
value(units)[source]
Convert to a value in the given units