From bd972b47395c0a001d49fe9310be36bf7b4bc21b Mon Sep 17 00:00:00 2001 From: Spencer Riley Date: Sun, 12 Jul 2020 16:49:35 -0600 Subject: [PATCH] precipitable water import (#298) Add precipitable water from wyoming. --- siphon/simplewebservice/wyoming.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/siphon/simplewebservice/wyoming.py b/siphon/simplewebservice/wyoming.py index d46d08e78..4e7fa0d67 100644 --- a/siphon/simplewebservice/wyoming.py +++ b/siphon/simplewebservice/wyoming.py @@ -14,6 +14,7 @@ from .._tools import get_wind_components from ..http_util import HTTPEndPoint + warnings.filterwarnings('ignore', "Pandas doesn't allow columns to be created", UserWarning) @@ -93,6 +94,7 @@ def _get_data(self, time, site_id): latitude = float(lines[4].split(':')[1].strip()) longitude = float(lines[5].split(':')[1].strip()) elevation = float(lines[6].split(':')[1].strip()) + pw = float(lines[-1].split(':')[1].strip()) df['station'] = station df['station_number'] = station_number @@ -100,6 +102,7 @@ def _get_data(self, time, site_id): df['latitude'] = latitude df['longitude'] = longitude df['elevation'] = elevation + df['pw'] = pw # Add unit dictionary df.units = {'pressure': 'hPa', @@ -115,7 +118,8 @@ def _get_data(self, time, site_id): 'time': None, 'latitude': 'degrees', 'longitude': 'degrees', - 'elevation': 'meter'} + 'elevation': 'meter', + 'pw': 'millimeter'} return df def _get_data_raw(self, time, site_id):