UDUNITS-2

docs.unidata.ucar.edu ↗

Convert compatible quantities and inspect unit definitions from a CLI

SI Score
80/100
Pricing
Open Source AI reading, not confirmed
Free plan
Not confirmed
Sign-up required
Not confirmed

Ask SI about UDUNITS-2

Answers use saved listing facts and recorded sources.

What it does

The UDUNITS-2 program converts numeric values between compatible units and displays unit definitions. It offers interactive prompts, command-line arguments, character-set choices, and an XML unit database.

Enter a quantity and desired compatible unit interactively, or pass them with -H and -W. UDUNITS-2 prints the converted value and transformation; an empty destination instead expands the source into the imported system's base units. An XML database supplies definitions, with ASCII, Latin-1 or UTF-8 formatting options. The -r flag reveals database import problems that are otherwise suppressed by the CLI. C APIs manipulate units and convert values, but units must belong to the same unit-system. Time handling uses a fixed Gregorian/Julian calendar split at 1582-10-15; the guide recommends a dedicated calendar package for calendar calculations. The source licence permits redistribution and modification subject to its conditions.

Strengths

  • Combines interactive conversions with inspectable definitions and a configurable unit database.

Best for

  • Scientific and technical unit conversion in scripts or terminals

Sources