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.
Choose video |