Skip to content

Commit

Permalink
Change from web bulb to wet bulb
Browse files Browse the repository at this point in the history
  • Loading branch information
jrleeman committed Mar 17, 2017
1 parent 43d3a98 commit 1045e92
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
3 changes: 2 additions & 1 deletion metpy/calc/tests/test_thermo.py
Expand Up @@ -270,12 +270,13 @@ def test_wet_psychrometric_rh():
wet_bulb_temperature, p)
assert_almost_equal(psychrometric_rh, 82.8747 * units.percent, 3)


def test_wet_psychrometric_rh_kwargs():
"""Test calculation of relative humidity from wet and dry bulb temperatures."""
p = 1013.25 * units.mbar
dry_bulb_temperature = 20. * units.degC
wet_bulb_temperature = 18. * units.degC
coeff = 6.1e-4 /units.kelvin
coeff=6.1e-4 /units.kelvin
psychrometric_rh = relative_humidity_wet_psychrometric(dry_bulb_temperature,
wet_bulb_temperature, p,
psychrometer_coefficient=coeff)
Expand Down
6 changes: 3 additions & 3 deletions metpy/calc/thermo.py
Expand Up @@ -714,7 +714,7 @@ def relative_humidity_wet_psychrometric(dry_bulb_temperature, web_bulb_temperatu


@exporter.export
def psychrometric_vapor_pressure_wet(dry_bulb_temperature, web_bulb_temperature, pressure,
def psychrometric_vapor_pressure_wet(dry_bulb_temperature, wet_bulb_temperature, pressure,
psychrometer_coefficient=6.21e-4 / units.kelvin):
r"""Calculate the vapor pressure with wet bulb and dry bulb temperatures.
Expand Down Expand Up @@ -763,5 +763,5 @@ def psychrometric_vapor_pressure_wet(dry_bulb_temperature, web_bulb_temperature,
--------
saturation_vapor_pressure
"""
return (saturation_vapor_pressure(web_bulb_temperature) - psychrometer_coefficient *
pressure * (dry_bulb_temperature - web_bulb_temperature).to('kelvin'))
return (saturation_vapor_pressure(wet_bulb_temperature) - psychrometer_coefficient *
pressure * (dry_bulb_temperature - wet_bulb_temperature).to('kelvin'))

0 comments on commit 1045e92

Please sign in to comment.