Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

precipitable_water fails with NaN dew point values in the profile #1184

Closed
akrherz opened this issue Oct 2, 2019 · 0 comments · Fixed by #1188
Closed

precipitable_water fails with NaN dew point values in the profile #1184

akrherz opened this issue Oct 2, 2019 · 0 comments · Fixed by #1188
Labels
Area: Calc Pertains to calculations Type: Bug Something is not working like it should
Milestone

Comments

@akrherz
Copy link
Contributor

akrherz commented Oct 2, 2019

metpy.calc.precipitable_water() returns NaN when there are NaN dewpoint values present. Here's a SCSE

import datetime

import pandas as pd
from siphon.simplewebservice.iastate import IAStateUpperAir
from metpy.calc import precipitable_water
from metpy.units import units

res = IAStateUpperAir.request_data(datetime.datetime(2018, 1, 23, 0), 'KFAI')
pw = precipitable_water(res['dewpoint'].values * units.degC, res['pressure'].values * units('hPa'))
print(pw)
filtered = res[pd.notnull(res['dewpoint'])]
pw = precipitable_water(filtered['dewpoint'].values * units.degC, filtered['pressure'].values * units('hPa'))
print(pw)

results in output

nan millimeter
4.003709214463873 millimeter
@akrherz akrherz added the Type: Bug Something is not working like it should label Oct 2, 2019
@zbruick zbruick added the Area: Calc Pertains to calculations label Oct 2, 2019
@dopplershift dopplershift added this to the 0.12 milestone Oct 2, 2019
@dopplershift dopplershift modified the milestones: 0.12, 0.11.1 Oct 9, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: Calc Pertains to calculations Type: Bug Something is not working like it should
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants