Skip to content

Commit

Permalink
Add test for kwarg passing
Browse files Browse the repository at this point in the history
  • Loading branch information
jrleeman committed Mar 17, 2017
1 parent 1ef255d commit 43d3a98
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions metpy/calc/tests/test_thermo.py
Expand Up @@ -269,3 +269,14 @@ def test_wet_psychrometric_rh():
psychrometric_rh = relative_humidity_wet_psychrometric(dry_bulb_temperature,
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
psychrometric_rh = relative_humidity_wet_psychrometric(dry_bulb_temperature,
wet_bulb_temperature, p,
psychrometer_coefficient=coeff)
assert_almost_equal(psychrometric_rh, 82.9701 * units.percent, 3)

0 comments on commit 43d3a98

Please sign in to comment.