Sunday, January 27, 2013

SST movies - ENSO, ice

A few days ago, I posted about the movie version of the WebGL presentation of the high resolution NOAA SST data. Carrick had wondered whether regular movies could be made from it, and at the time I didn't know how to.

I can't do anything there from Javascript, because I have no file i/o. Also, the CPU on which JS runs does not itself know what will appear on the screen, since rendering is done by the GPU; it can only ask, which means a PrintScreen call in Windows. But we need to be able to program that.

I messed around with Java and C++ for a while, but then I found some very neat freeware that does what I need. It's called NirCmd, and comes from Nirsoft. It's the sort of software I like - a 43 Kb executable with no installation but lots of very good documentation. You can download from CNet, but there's no need. It does all sorts of windows things, but the particular example I wanted was a one line command to periodically capture the screen to a PNG file.

So then my task was to setup a movie and run it, downloading each frame with NirCMD. I didn't find any way to send signals, so I had to find ways to match the timing. I ran the movie with 4 secs delay, and NirCMD with 3. This risks getting extra shots, but that isn't a problem. Then I used ImageMagick to crop the files and convert to .jpg. Then JPGVideo to convert to .avi, then FFmpeg to convert to .swf. Along the way, I put a timestamp on the WebGL. It starts top left, but you can Shift_click (click with Shift pressed) to move it where you like.

So I have some samples here. I made five movies, all at the medium 1/2° resolution:
  • 2012 ENSO Weekly - a weekly picture of the tropical E Pacific through 2012. It shows an alternation of weak El Nino and La Nina conditions, with a strong La Nina at the end,
    Update - I've added 4-day time step version
  • 2011 ENSO Weekly - mainly La Nina
  • 2010 ENSO Weekly - again weekly E Pacific. A strong early El Nino plume moves to a La Nina jet as the year progresses. One thing I find fascinating is the classic vortex street pattern.
  • 2012 Arctic weekly - a weekly picture of the Arctic region. The region with uniform zero anomaly is guaranteed to be ice, but the converse isn't sure - you'll see an anomaly assigned to regions which would have been classified as ice extent. However, it gives a detailed picture, enriched by the neighboring SST patterns.
  • Recent 100/2 days - the most recent 100 days at 2 day intervals. It's a more detailed picture of the development of a La Nina plume.
The movie takes a few seconds to download. Works in Firefox, Chrome, but not yet IE. Update - I see that in Chrome it doesn't respond immediately to a movie choice, but does if you then click on the movie. Update - you can right click to bring up a control menu for stepping (forward) etc.

Get Adobe Flash player
Choose video





Thursday, January 24, 2013

SST - the 3D movie


Well, maybe not quite 3D, but the movie is painted on a globe that you can rotate while it is running.

This is a follow-up to my post yesterday pointing to a new page with NOAA/NCDC SST data displayed on a WebGL globe that you can rotate and zoom.

I have added a movie facility show you can see the dynamics of processes like ENSO. The process works like this. First you select your start date and resolution, as if you were plotting that date. But instead of New Plot, go to the bottom, next to the new Seq button and enter the Step (interval in days) and Number (of frames in the movie).

Then press Seq. This will download the data for the frames. At 1° resolution, this will show as a passable movie, but at 1/4° it will be painfully slow. But let it run. You'll see a pink window just above counting the frames - it will revert to pale green when finished.

Now the payoff - next to the Cyc button you can enter the cycle time for the real movie. For resolution 1/4° you may find that times less than 1 sec will lead to skipping frames; coarser resolutions should do several frames per second (if you really want). Then press Cyc to run the same sequence that you just downloaded, but at the faster speed.

Long sequences at high res will be a load on memory - I estimate about 3-4 Mb per frame. I've been juggling memory vs speed - I can run very fast, but needing 10 Mb per frame.

You can rotate or zoom while the movie is running. You can rerun (Cyc) as you wish. You can go on to do other plots or make more movies, but then you can't rerun the one you had been watching.

I've found that it works as described in Firefox. In Chrome it works, but doesn't show the frames while loading (following Seq) and the red colors don't show to indicate. The movie is OK though. I'm investigating (probably tomorrow).

Where the exact day in sequence is missing, the movie takes the nearest,

It's great for dynamic processes such as ENSO. 1998 is very impressive, even with monthly steps. I'll load more data for this period overnight. I'd recommend starting with low resolution and sequences of 10 frames or so.

Wednesday, January 23, 2013

A collection of HiRes SST on WebGL globe

I posted recently about WebGL plot of high resolution AVHRR SST data from NOAA/NCDC. It is 1/4° (about 25 km). I noted that representation of coasts should be improved (it has been). The data is daily, and I showed 21 Dec 2012.

I've now put up a page which I hope to maintain regularly by script. I've uploaded data for many days, going back to at least 1996. I'll continue filling it out. There are selection boxes to let you select the date and resolution, and a button to press to download and display. At top resolution downloading 700 Kb for each plot takes a few seconds.

For the last three years year data is daily, then reverting to weekly and eventually monthly. This will improve.

The globe you will see is a trackball - you can rotate with a mouse and zoom with the right button (vertically). The colors represent anomalies in °C.

Here are some examples of the things that can be seen. Some have noted recently that the seas around Svalbard are fairly ice-free for the time of year. Here is a section from the plot of 7 January 2013, slightly zoomed:



And here is an ENSO study. Here is the cold plume currently in the Equatorial East Pacific, again on 7 Jan 2013:


While here is the long warm El Nino jet from 9 March, 2010:
.

It's interesting to contrast the Gulf of Mexico temperatures too.

Here is a super El Nino plume from 24 February, 1998:
.

Sunday, January 13, 2013

High Resolution NOAA SST with WebGL


This is another in the series of experiments with dynamic global presentations with WebGL. It is SST anomaly data (AVHRR) from 21 December 2012. In fact, NOAA High Resolution SST data provided by the NOAA/OAR/ESRL PSD, Boulder, Colorado, USA, from their Web site at http://www.esrl.noaa.gov/psd/. This experiment is more about data handling than science; the million points of a 1/4 deg grid (about 25kmn resolution) are challenging. So is the task of actually getting it on your screen; Firefox works for me, but not IE and it's patchy in Chrome. Sometimes restarting the browser makes the difference. It takes a few seconds to show, so I've put it below the jump.

The plot is of anomalies. NOAA also gives the actual temperatures, but their plot is less informative. Most of the range of colors is used in just expressing the equator to pole variation, so you learn little about what is different currently.

As elsewhere, you can rotate the globe as a trackball, or zoom by dragging the right button vertically. I'll discuss some of the data issues below the plot.

Tuesday, January 8, 2013

December TempLS Global Temp down 0.29°C!! (early est.)



This is a bit early in the month to post, but I see Lucia has noticed an early result from GISS suggesting a very big drop, so I was curious as to TempLS's take.

I think in fact it is too early. The most recent release of GHCN was Jan 5, and in all, land and sea, there were only 3213 stations reporting - see map below. That gives sparse land coverage.

I've recently put a big store of monthly data mapped on a globe. Dec 2012 is included, and the areas responsible can be seen. I'll discuss below.

That said, the TempLS analysis, based on GHCNV3 land temperatures and the ERSST sea temps, also showed a big drop in monthly average of 0.22°C for December, down from 0.51 °C in November.

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.