units

Module to provide unit support.

This makes use of the pint library and sets up the default settings for good temperature support.

metpy.units.units

pint.UnitRegistry – The unit registry used throughout the package. Any use of units in MetPy should import this registry and use it to grab units.

Functions

atleast_1d(*arrs) Convert inputs to arrays with at least one dimension.
atleast_2d(*arrs) Convert inputs to arrays with at least two dimensions.
check_units(*units_by_pos, **units_by_name) Create a decorator to check units of function arguments.
concatenate(arrs[, axis]) Concatenate multiple values into a new unitized object.
masked_array(data[, data_units]) Create a numpy.ma.MaskedArray with units attached.

Classes

PintAxisInfo(units) Support default axis and tick labeling and default limits.
PintConverter(registry) Implement support for pint within matplotlib’s unit conversion framework.

Exceptions

DimensionalityError(units1, units2[, dim1, …]) Raised when trying to convert between incompatible units.
UndefinedUnitError(unit_names) Raised when the units are not defined in the unit registry.