Visualizing groundwater nitrate concentration

Written by Jeff Heard on January 21st, 2009

This one brings back memories.  This is a snapshot from my first ever Haskell visualization, which I sadly no longer have the full code for.  I actually used Haskell here to calculate the data points and output textures and height-fields that were then imported into POV-Ray and rendered to give you what you see here.  It was my first experience with Control.Parallel.Strategies and my first experience with arrays in Haskell.  The thing I’m particularly proud of are the “calligraphic” contour lines that I got.

The contour lines are created by first finding every point where a contour threshold is crossed and then along with the point, calculating the gradient of the heightfield slope perpendicular to that point.  The flatter the slope, the wider the line.  The more tilted the slope, the narrower the line.  The boundaries of the lines mark where the height has changed from the threshold by at least a meter. The lighter side of the line shows the “upside” of the slope.  The darker side of the line shows the “downside” of the slope.

The actual data itself is an inverse-square interpolated set of points on a regular grid; each point represents a sensor installed in a 200 square yard field in eastern North Carolina.  These sensors were measured twice a month for several years.  The sensors measure two things that are shown on this visualization:  groundwater depth and groundwater nitrate concentration.  Depth is shown by the actual surface.  Nitrate concentration is shown by the colormap.  The blues you see are where nitrates are within EPA regulations.  The yellows and reds are outside EPA regulations.  Nitrate concentrations above EPA regulations can cause “blue baby syndrome” among other health problems, and safe levels of the toxin are not known for wildlife.  Pollution is most often caused by leaky hog-waste cesspools.

Groundwater nitrate concentrations in a test field in eastern NC

Groundwater nitrate concentrations in a test field in eastern NC

2 Comments so far ↓

  1. bernardo says:

    Very nice. What happened with the code?

  2. Jeff Heard says:

    The machine that had it got dropped in the snow by the IT staff…

Leave a Comment