Skip to content

Unit parser break *_H2O pressure units #4052

@dopplershift

Description

@dopplershift

Not a huge deal, but this breaks compatibility with standard Pint functionality:

from pint import UnitRegistry
ureg = UnitRegistry()
ureg.m_H2O

gives meter_H2O

But with MetPy:

from metpy.units import units
units.m_H2O

gives UndefinedUnitError: 'm_H' is not defined in the unit registry. This is undoubtedly from code trying to use a regex to handle UDunits-style multiplication.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Area: UnitsPertains to unit informationType: BugSomething is not working like it should

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions