Skip to content

Commit

Permalink
precipitable water import (#298)
Browse files Browse the repository at this point in the history
Add precipitable water from wyoming.
  • Loading branch information
PharaohCola13 authored Jul 12, 2020
1 parent f39e322 commit bd972b4
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion siphon/simplewebservice/wyoming.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)


Expand Down Expand Up @@ -93,13 +94,15 @@ 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
df['time'] = sounding_time
df['latitude'] = latitude
df['longitude'] = longitude
df['elevation'] = elevation
df['pw'] = pw

# Add unit dictionary
df.units = {'pressure': 'hPa',
Expand All @@ -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):
Expand Down

0 comments on commit bd972b4

Please sign in to comment.