The Unidata Program Center has developed a units library to convert between formatted and binary forms of units specifications and perform unit algebra on the binary form. Though the units library is self-contained and there is no dependency between it and the netCDF library, it is nevertheless useful in writing generic netCDF programs and we suggest you obtain it. A unit is specified as an arbitrary product of constants and unit-names raised to arbitrary integral powers.
Multiplication is indicated by white space, a period ' . ', or a hyphen ' - '.
Parentheses may be used for grouping and disambiguation. The time stamp in the last example is handled as a special case. In particular, temperature conversions are correctly handled. 32 Note that the origin-shift operation takes precedence over multiplication. In order of increasing precedence, the operations are division, multiplication, origin-shift, and exponentiation.