{"id":27053,"library":"iam-units","title":"IAM Units","description":"Unit definitions and conversion utilities for integrated-assessment modeling research. Version 2026.3.10 requires Python >=3.10 and is released frequently (monthly).","status":"active","version":"2026.3.10","language":"python","source_language":"en","source_url":"https://github.com/IAMconsortium/iam-units","tags":["integrated-assessment","units","conversion","climate","emissions"],"install":[{"cmd":"pip install iam-units","lang":"bash","label":"pip"}],"dependencies":[],"imports":[{"note":"The old public API was reorganized; use top-level import.","wrong":"from iam_units.converter import UnitConverter","symbol":"UnitConverter","correct":"from iam_units import UnitConverter"},{"note":"Standard import for emission unit definitions.","symbol":"emissions","correct":"from iam_units import emissions"}],"quickstart":{"code":"from iam_units import UnitConverter\n\nuc = UnitConverter()\n# Convert 1000 metric tons CO2 to CO2-equivalent in Gt\nresult = uc.convert(1000, 't CO2', 'Gt CO2_eq')\nprint(result)  # 1e-06 Gt CO2_eq\n","lang":"python","description":"Basic conversion between common IAM units."},"warnings":[{"fix":"Review all calculations involving 'MtC' and update to explicit 'Mt C' or 'Mt CO2_eq'.","message":"Unit definitions for 'MtC' (megatonnes of carbon) changed between v2025 and v2026. Old definitions assumed carbon mass, new definitions use carbon-dioxide equivalent (CO2_eq).","severity":"breaking","affected_versions":">=2026.0.0"},{"fix":"Replace `from iam_units.energy import ...` with `from iam_units import emissions`.","message":"The module `iam_units.energy` is deprecated. Use `iam_units.emissions` with energy-related units.","severity":"deprecated","affected_versions":">=2026.1.0"},{"fix":"Use `uc.convert(..., return_quantity=True)` to get a pint Quantity object.","message":"UnitConverter.convert returns a float, not a pint Quantity. Multiplication by 1.0 may lose precision.","severity":"gotcha","affected_versions":"all"}],"env_vars":null,"last_verified":"2026-05-01T00:00:00.000Z","next_check":"2026-07-30T00:00:00.000Z","problems":[{"fix":"Run `pip install iam-units` (hyphen). The import uses underscore: `import iam_units`.","cause":"Package name is 'iam-units' (hyphen), not 'iam_units' (underscore). This error occurs when trying to import before installation.","error":"ModuleNotFoundError: No module named 'iam_units'"},{"fix":"Use 'Mt C' (carbon mass) or 'Mt CO2_eq' (carbon dioxide equivalent) as appropriate.","cause":"The unit 'MtC' was removed or renamed in v2026. The correct unit is 'Mt C' (with space) or 'Mt C_eq'.","error":"ValueError: Unit 'MtC' is not defined"}],"ecosystem":"pypi","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}