Registry / data / iam-units

iam-units

JSON →
library2026.3.10pypypiunverified

Unit definitions and conversion utilities for integrated-assessment modeling research. Version 2026.3.10 requires Python >=3.10 and is released frequently (monthly).

pip install iam-units
INSTALL
IMPORT
SIG · IAM-UNITS
I
iam-units
datapythonv2026.3.10
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

UnitConverter
from iam_units import UnitConverter
from iam_units import UnitConverter

Basic conversion between common IAM units.

from iam_units import UnitConverter uc = UnitConverter() # Convert 1000 metric tons CO2 to CO2-equivalent in Gt result = uc.convert(1000, 't CO2', 'Gt CO2_eq') print(result) # 1e-06 Gt CO2_eq
Debug
Known issues
breakingUnit definitions for 'MtC' (megatonnes of carbon) changed between v2025 and v2026. Old definitions assumed carbon mass, new definitions use carbon-dioxide equivalent (CO2_eq).
fix
Review all calculations involving 'MtC' and update to explicit 'Mt C' or 'Mt CO2_eq'.
affects: >=2026.0.0
deprecatedThe module `iam_units.energy` is deprecated. Use `iam_units.emissions` with energy-related units.
fix
Replace `from iam_units.energy import ...` with `from iam_units import emissions`.
affects: >=2026.1.0
gotchaUnitConverter.convert returns a float, not a pint Quantity. Multiplication by 1.0 may lose precision.
fix
Use `uc.convert(..., return_quantity=True)` to get a pint Quantity object.
affects: all
Upgrade
Version history
2026.3.10latest on PyPI · released Mar 10, 2026
Audit
Dependencies

No dependency data recorded yet.

Agent activity
4 hits · last 30 days
node
4
Resources
iam-units — pip install iam-units · libregistry