parse_units¶
- parse_units(units, /)[source]¶
Translate unit string into
pintunits, with support for CF compliant constructs. This is used withquantifyandto_units. Includes the following features:Interpret CF standard where exponents are expressed as numbers adjacent to letters without any exponentiation marker, e.g.
m2form^2.Interpret CF standard time units, e.g. convert
days since 0001-01-01todays.Interpret climopy-defined units with constants without the leading dummy underscore (e.g.
'100km'instead of'_100km'; seeuregfor details).Interpret everything to the right of the first slash as part of the denominator. This permits e.g.
W / m2 Painstead ofW / m^2 / Pa; additional slashes after the first slash are optional.