Description
openedon Jul 13, 2018
So I was attempting to access data from March of 1976 from the University of Wyoming Sounding archive and when going back that far, not every station is associated with a three-letter ICAO ID on the site. A number of the stations are listed by number. Okay not terrible, but not great. I put the number in instead of the station ID and it finds the right data file, but due to the lack of a Station ID, the parsing info from below "Station information and sounding indices" it doesn't work correctly (http://weather.uwyo.edu/cgi-bin/sounding?region=naconf&TYPE=TEXT%3ALIST&YEAR=1976&MONTH=03&FROM=0400&TO=0400&STNM=72349) compared to (http://weather.uwyo.edu/cgi-bin/sounding?region=naconf&TYPE=TEXT%3ALIST&YEAR=1976&MONTH=03&FROM=0400&TO=0400&STNM=72456) the different is in the lack of the "Station Identifier:" line in the 72349 station file.
There might be a relatively easy way to make the parsing of that first line more amenable to working with a set of data that doesn't contain a Station Identifier line. The following code will give the error that results from the previous description.
from datetime import datetime
from siphon.simplewebservice.wyoming import WyomingUpperAir
date = datetime(1976, 3, 4, 0)
data = WyomingUpperAir.request_data(date, '72349')