resqpy.weights_and_measures.rq_uom

resqpy.weights_and_measures.rq_uom(units, quantity=None)

Returns RESQML uom string equivalent to units.

Parameters
  • units (str) – unit to coerce

  • quantity (str, optional) – if given, raise an exception if the uom is not supported for this quantity

Returns

str – unit of measure

Raises

InvalidUnitError – if units cannot be coerced into RESQML units for the given quantity