To download the source code and executable for Mac, go here . To run, unzip, go into LakeMichiganExplorer, final, build, Debug. Then double click on LakeMichiganExplorer to run.
The Lake Michigan Explorer Program allows a user to explore temperature, water velocity and bathymetry data from Lake Michigan. While full use of the program would require more extensive development and debugging, as it stands the program allows for interesting views of the behavior of water within large lakes over the seasons and throughout the day.
Water temperature and velocity data for Lake Michigan in 2006 and 2010 were obtained from the Great Lakes Observing System at http://www.glos.us/thredds/catalog.html . Data on this site is formatted in a 131x251x19 grid with latitude, longitude, depth, temperature, u component of water velocity and v component of water velocity. This data can be obtained from 2006 to 2010 at 3 hour intervals, ranging from 0 to 2919 time points.
Since I was interested in data from noon on the 15th of every month in June and December, as well as noon values for every day in a month and complete values for one day, I decided to construct a data download and processing pipeline. This pipeline could be easily modified to bring in data from other periods of time.
The pipeline worked as follows:
1) I wrote a Java program (found below under 'GetXYAndZCoords.java') to take in a temperature, u and v data file for each time stamp, relate these values to appropriate latitude, longitude and depth coordinates. It also scaled depth data to bring it closer to an accurate scale, but at a scale at which differences between depths would be visible. Further formatting involved taking data attributes associated with unstructured points (points distributed in space with no relation to other points and no method of spacing or distrbution) into structured points, which are evenly spaced throughout a rectilinear volume of dimensons X x Y x Z . I found that this file format was necessary for many of the visualization approaches I wished to pursue, streamlines and volume rendering in particular.
Linear interpolation algorithms worked as follows:
For all the positions in the structured data set,
find the closest 2 points in the unstructured data, (the point above and below the structured depth in the nearest x, y position)
assign temperature based on the following equation: Temp = ( (Temp1 - Temp0) / (Depth1 - Depth0) ) * ( thisDepth - Depth0) + thisDepth
assign u based on the following equation: U = ( (U1 - U0) / (Depth1 - Depth0) ) * ( thisDepth - Depth0) + thisDepth
assign v based on the following equation: V = ( (V1 - V0) / (Depth1 - Depth0) ) * ( thisDepth - Depth0) + thisDepth
After testing this program on a few data sets, and running the results in Paraview, I turned my attention to mass data acquisition and parsing.
2) I wrote a Java program (found at the bottom of this page under 'GetTimePoints.java' ) to generate a shell script with Unix terminal commands for
- downloading temp, u and v data files for each of the 65 desired time points using the wget command
- renaming files so they would be easier to access later
- passing these file names as command line arguments to the java program, described above, that processed this data into a single image data file.
3) I loaded these data sets into Paraview to ensure correct download and processing, and then compressed these files into .vti image data files ready for reading into my vtk program.
Using Lake Michigan Explorer
My program presents a flexible platform for comparing these datasets from multiple perspectives and in multiple modes of visual presentation.
There are 3 primary view windows in the program, each capable of loading an actor for any data set in any format.
To manipulate the lake actor in the window, the user may click and drag in the window area. This will rotate the actor and reposition the camera. To shift the actor the right or the left, the user may click the left mouse button while also pressing 'SHIFT'. To rotate the actor in place, the user can click the right mouse button while holding 'COMMAND'.
Data sets and information on the view for each actor can be found above the view window.
To select a new view for an actor, the user can click in the drop don box labeled 'Select view', and can choose to view temperature data as a colored surface view, and isosurface view,
To select a new data set, the user can click on a drop down box labeled 'Select data to view' and can choose from monthly data sets from 2006 and 2010, daily data sets from June 2010 and hourly data sets from June 15th 2010.
Once a new data set is selected, the program loads a new data file and view. This can take a few moments. It will exit the drop down box once the file has successfully loaded.
Finally, the user may view the data set with a map overlay, for contextual information, by clicking on the 'show map' button.
This original data remains beneath the transparent map, so the user can explore the data set alongside contextual information.
This map can be removed by clicking again on the 'show map' button.
1) Colored surface
The colored surface view allows the user to visualize water temperature along the surface and bottom of the lake. This view provides a simple snapshot of the water temperature at a given time point and can be used to gain an understanding of general water temperature patterns across the lake.
Isosurfaces represent points in 3D space of constant value. They are the 3 dimensional equivalent of isolines, used frequently in displaying weather maps. This gives not only a view of the overall temperature data in the lake, but also provides the opportunity to examine the interior of the lake and look for areas of continuous temperature in 3 dimensional space.
Volume Rendering provides an alternative approach to 3 dimensional views of a data set. The volume rendering data sets provided in this project need further development to optimize settings for ideal viewing. However, it provides a glimpse of the 3 dimensional patterns present in the temperature data.
The white background is perhaps a better choice for this data set. It can be selected by right clicking in the window and selection 'White Background'.
The first view of water velocity data can be found under 'directed glyphs.' This view presents an arrow pointing in the direction of the water flow vector at that point and is colored according to the magnitude of the flow. In order to allow the user to best view the data, some of the points in the data sets are masked out, so fewer glyphs clutter the scene.
Streamlines from Fox River, Grand River and Kalamazoo river, indicated by the labeled points next to the lake, track the flow of water from these points. This is also a view that needs to be refined if this project is to be taken further to eliminate the 'run-off' outside the borders of the lake. It should be noted that this view takes a long time to update. In subsequent versions of the program, I would almost certainly add a progress bar and threading.
The bathymetry view provides a glimpse of the 3 dimensional structure of the lake, so that it is possible to understand temperature and water velocity data alongside geological data about the structure of the lake.
What can be observed using Lake Michigan Explorer?
1) As expected water temperature is colder the greater the depth in the lake. This appears to be true more in the late spring, summer and fall, however, than the winter.
May July September
October December January
By October, lake temperatures are already becoming more uniform from near the surface to deeper points in the lake. In the summer, surface temperatures are likely elevated from the higher temperatures and prolonged exposure to sunlight. Strangely, however, while surface temperatures in the summer are high, temperatures are quite cold in deeper parts of the lake, even colder than those observed in October and December in deeper parts of the lake. The reasons for this phenomena are unclear.
One hypotheses might be that water flow influences temperature distributions in the lake. To investigate this, we can open windows simultaneously on water flow in multiple months during different times of the year.
2) Water Flow
This view shows water flow patterns in July, Oct and December. (Note: December of 2006 produced an unexpected output that would require investigation were this project to continue). Water flow is intense during this July, moderate in October, and minimal in December. In addition, water flow patters appear to be somewhat similar in October and July, concentrated on the lower part of the lake and the upper western portion. There is a section in the center of the lake that appears more tranquil.
This flow pattern corresponds with flow from major rivers into Lake Michigan
There was not much variation in temperature distribution patterns or water flow patterns throughout the day on June 15th 2010.
This could indicate that seasonal patterns have a more significant impact on lake water behavior, particularly since large bodies of water can absorb great quantities of energy due to their large size and the properties of water.
Program occasionally crashes. I considered removing bathymetry from the view at the last minute because it was crashing the program. It worked earlier in the day, but apparently there is some problem that is preventing it from working now that I would need more time to track down.
Similarly, I had the program crash while computing streamlines. I am not sure if this is a problem with memory management, because I took great care in only loading 3 data sets at a time and deleting all others once no longer in view.