Weather Display

Written for CS 526 by John Bell

Spring 2004

Source & Data File Archive: JTB_Weather_Display.zip

Background

The weather display program developed for this project displays various weather related data items for the state of Illinois, specifically weather for the year 2003. The data was acquired from http://www.sws.uiuc.edu/warm/datalist.asp. The particular items to be displayed include average temperatures of air and soil, wind patterns, precipitation, and relative humidity. Data was collected at 19 different data collection stations around the state, and the display is to cover the entire state. For further details, see the original project assignment.

PowerPoint Presentation

The PowerPoint presentation for this project was presented before all of the work was completed, and was therefore given as a progress report.

Preprocessor - WeatherDisplay.cpp

A C++ program, WeatherDisplay.cpp, was written to parse the raw input data files, do some preliminary processing ( e.g. averaging ), and to store the results in a form easily read by VTK. The pre-processor also implements Shephard's method to interpolate and extract the data evenly across the state, both within and outside of the convex hull defined by the 19 data collection stations. The data is stored in a structured grid, with a topology that conforms to the state boundaries, having 12 divisions in latitude and 10 in longitude. The "z" dimension of the output data file corresponds to the number of days in the month. The output file stores the topology of the structured grid ( x, y, and z coordinates for each data point in the grid ) as well as data. The specific data stored at each data point includes one 3-D vector for the wind and four scalars for the air & soil temperatures, precipitation, and relative humidity. The data fields are named, so that specific fields can later be extracted from within VTK.

The preprocessor requires approximately one second or less to process one month of data. All 12 months of 2003 were downloaded and preprocessed, into separate input files.

VTK Program Structure - WeatherDisplay.tcl

This visualization has been implemented in a layered structure, as indicated in the following sections. Each of the layers described below has an independently adjustable transparency adjustment, allowing the users to dynamically select any combination of zero or more data representations.

Data Readers & Extractors

Each of the data layers described below has a separate data reader, in order to select a particular data field ( e.g. "Air Temperature" ) out of the input data file. Associated extractors select a particular day's data out of the month, and this value is easily adjusted from the user interface to quickly visualize alternate days' data.

Map Layer

The bottom layer of the visualization is a simple plane, onto which a map of illinois is applied as a texture map. Six different maps were acquired, as shown in the following thumbnails. Clicking on any of the thumbnails will take you to the web site from which the map was originally obtained. All coordinates for this project were done in terms of degrees of longitude east by degrees of latitude north, and the map plane coordinates were adjusted for each map to align with the rest of the diplayed data. ( Note: negative coordinates in the east direction were used instead of positive coordinates in the west direction, in order to preserve the more intuitive left-to-right arrangement of the state. ) All maps are in JPEG format, and read using a vtkJPEGReader.

Temperature Display Layer

The temperature display layer is a polygonal planar region in the shape of Illinois ( as determined by the topology of the structured grid format in the data file ), colored according to the input temperature data for either air or soil temperatures. A color map ( lookup table ) was produced to conform to standard temperature encodings for weather temperature data, as seen on the Chicago Tribune weather page web site, http://weather.chicagotribune.com/US/Region/Midwest/2xTemperature.html.

Wind Vectors

vtkHedgeHog was used to generate a series of vectors indicating wind direction and strength at each of the points within the structured grid. The standard simple line was replaced with a cone object, in order to portray direction as well as strength and alignment of the wind directions.

Wind Streamlines

Wind streamlines were generated using a fourth-order Runge-Kutta differentiation of the wind vector data, using the data collection stations as the seed points for the integration process. These streamlines are best observed with the ICN Stations map as the background image.

Precipitation & Humidity Icons

The original plan was to create a custom-designed glyph that would show both preciptiation and relative humidity at each point in the structured grid. The format of the glyph was to be a vertical cylinder with a pie wedge colored an alternate color. ( E.g. a 3-D pie chart. ) The height of the cylinder would represent precipitation, and the pie wedge would indicate relative humidity. This glyph was designed around the fact that humidity is bounded to the range of 0 to 100%, and that precipitation can become zero. This design would degrade to a standard 2-D pie chart if there was no rainfall, leaving the humidity information readable, and likewise the precipitation information would be equally discernable regardless of the range of the relative humidity.

These glyps were implemented using vtkProgrammableGlyphs, but the resulting visualization was found to be unsatisfying, and so the glyph design was modified slightly. Rectangular bars were employed instead of round cylinders, and the relative humidity is indicated by color coding instead of by pie wedges. This still allows humidity to be observed when the precipitation is zero and vice-versa, and is cleaner and less cluttered than the original design.

User Interface

The user interface is written in TCL / Tk, and allows the user to adjust all aspects of the visualization. Responsiveness is very good, allowing true interactive browsing of months or years worth of data. The user interface is broken down into four main sections, allowing users to select a particular date, adjust transparency of all objects, select a map to use as a background image, and to select air versus soil temperatures for the temperature maps.

Sample Images:

References