Friday, November 03, 2006

Google Earth Winds

I've been trying to find places to snow kite near Alta along I80 for this winter, and the idea I had was to look at historical wind data and overlay it on google earth via placemarks. The first version of the program was a bit crude, and only supported METAR data grabbed from weather underground. The problem is that the number of sensors in quite limited (they are mostly at airports). For the next version, I used the university of Utah's RAWS data, which includes over 1700 sensors in california alone. However, I was unable to find a nice comma delimited (or something like it) data stream and had to write a HTML parser for their pages. Additionally, their web site is slow, so most of the work was in making a caching system rather than getting or processing the data.

Since weather patterns shift a lot with each season, I restrict data to December through March during the day. You tell the program how many days backwards you want to go, and it starts picking random days in that range, downloading and caching the data and generating KML files for Google Earth. Because this can be a long process : 1 data point per hour, 8 hours per day, N days, 1700 sensors, data is written out incrementally. It's pretty frustrating encountering a divide by zero which you forgot to trap three days into a run! Also, to save time, the output is only done every few thousand data points or so. This is important considering how large the cache files can get.

The KML file which is generated has averaged sensors wind speed sorted by value, makes extruded polygons with heights proportional to their average wind speed, color codes them and makes a link to the current wind and weather conditions. It looks like this:



the latest KML file is available here

No comments:

life in Grenoble, France as an expat postdoc
life in Grenoble, France as an expat scientist
life in San Francisco, CA as a biotech nerd life in Grenoble, France as an expat scientist

Blog Archive

Popular Posts