Tuesday, January 8, 2013

GHCN Stations color map, all years and months, with WebGL


This time last year, I posted a map of average 2011 temperatures, using the then novel HTML 5 canvas shading. Now I could post 2012, but local technology has moved on. With XMLHTTPRequest I can post lots of data - I showed the current century of monthly temps here. And with WebGL, I showed here how shading and speed could be improved, basically with use of the GPU. At the time, I didn't know how to integrate that properly with other Javascript code that I use.

I've been working on all those things. I'll post again about my WebGL learning, but I can make it do what I used to do in JS with HTML 5, and much faster. I've now uploaded all months, annual averages for all years back to 1881, and also decadal averages. You can access them from the panel on the right; details below.

WebGL makes possible Google-Earth style navigation, but I've kept as well the older style, where you can click on a flat map to find a point to centre the projection. It's fast now, and keeps the orientation right.







Data details

Each plot is taken directly from unadjusted station readings in GHCN V3 or from the NOAA's ERSST. The latter is a reconstructed SST, and grid averages are treated as a station at the centre.

The anomalies are calculated as described in this post. They are anomalies relative to the present seasonally expected value. The presence or warming is indicated by negative values in the past - however the color scale is adjusted to the mean of each plot, so this isn't obvious. For annual and decadal averages, I require more than three quarters of readings to have been taken (ie 10 months out of 12, etc). Missing values were interpolated by seasonal averages for each station.

You can use Shift-Click with the mouse on the plot to get individual station details.

How it works

The WebGL interface is described here. You can use the Earth as a trackball, as in Google Earth, or you can click on the navigator map, top right. I prefer the latter because it works instantly, and keeps a conventional orientation. Where you click becomes the centre of the Earth view.

You choose date periods from the selection boxes (decade, year and date). Each time you make a change in any one, the data is downloaded and the picture shown. The "All" at the top means the overall mean - ie decade or year. Below is echoed what you have chosen, plus (in case things go wrong) the file that was fetched.

You can zoom the plot by moving the pointer vertically with either the right button pressed, or left and Ctrl. Up is bigger. The second provision is because the right button annoyingly pops up a window when released, which I haven't found out how to suppress.

Holding the Shift key when clicking brings up numeric (and name) data from the nearest station. You can show dots for the stations with the checkbox under the small map.

If you want to link to a selected plot, a URL appears at bottom right. It currently doesn't reproduce rotation and zoom.

Some observations


As I discussed in the visualizing post, with unadjusted data systematic errors accumulate as you go back in time because of station moves etc. This shows up as sustained spatial variability - persistent apparent cool and hot spots. The decadal averages become dominated by this, and that's a good way of identifying culprits.

In more modern times, though, the thing that impresses me is the spatial consistency of the land data. The SST data is also consistent, but that is partly the effect of the reconstruction. Least consistent is often the USA.

Some wrinkles.

WebGL draws triangles as supplied, and you'll sometimes see the effect of this at the sphere edge. You'll also see that I've drawn the map lines about 100 km above the surface. If they go below the triangle surface, they disappear, so this device avoids that.

I've tried to make sure you can't ask for an unavailable file, but if that fails there will be a XMLHTTPRequest popup. It doesn't stop the program. I've also tried to make options disabled when they don't make sense.

Future

I'm planning to make trend plots available in the same frame, and more ambitiously, to ensure that the click info on stations includes a graph of the annual data, using a subset of the climate plotter.





0 comments:

Post a Comment