coecms / frontdetection

Apache License 2.0
2 stars 2 forks source link

use dewpoint function in wetbulb #1

Closed ccarouge closed 1 year ago

ccarouge commented 3 years ago

The start of wetbulb function is the same as the dewpoint function. Use the function instead of replicating the code.

HoWol76 commented 3 years ago

I made a few refactoring changes in the branch refactor, including this.

aidanheerdegen commented 2 years ago

At the risk of being a wet bulb, this duplicates functionality that is available in metpy

https://unidata.github.io/MetPy/latest/api/generated/metpy.calc.wet_bulb_temperature.html

https://unidata.github.io/MetPy/latest/api/generated/metpy.calc.dewpoint.html

https://unidata.github.io/MetPy/latest/api/generated/metpy.calc.relative_humidity_from_specific_humidity.html

It would be better to use well tested functions from metpy IMO

aidanheerdegen commented 2 years ago

Also metpy already uses pint see #2

greensh16 commented 1 year ago

The code is now using the wet_bulb_temperture, dewpoint, and relative_humidity_from_specific_humidity functions from metpy.