Reputation: 35
I just started getting the following error while running a program with Metpy:
importerror: cannot import name 'dewpoint_rh' from 'metpy.calc'
Yesterday my program was working fine.
Here is the snippet of code:
from metpy.calc import (bunkers_storm_motion, bulk_shear, dewpoint, dewpoint_rh, dry_lapse, moist_lapse, vapor_pressure, saturation_vapor_pressure, wind_speed, wind_direction, pressure_to_height_std, mixing_ratio, cape_cin, wind_components, height_to_pressure_std, equivalent_potential_temperature, parcel_profile, precipitable_water, storm_relative_helicity, mean_pressure_weighted, most_unstable_cape_cin, most_unstable_parcel, supercell_composite, significant_tornado, get_layer, relative_humidity_from_dewpoint)
Upvotes: 1
Views: 406
Reputation: 489
dewpoint_rh
was the function name for calculating dewpoint from temperature and relative humidity in MetPy versions prior to 0.12. This changed to dewpoint_from_relative_humidity
in v0.12, and the old name was removed in v1.0.
For additional information on the API changes in MetPy v1.0 (which are likely to impact the use of the functions you are importing), please see the MetPy 1.0 API Changes guide in MetPy's documentation.
Upvotes: 2