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






7 comments:

  1. Safari works too. The formatting is a bit strange, but if I click on the pull down menu, select then click on the screen it switches movies.

    ReplyDelete
    Replies
    1. Thanks, Carrick.
      I take it the WebGL stuff works too. It doesn't with Safari on a PC, but they say it should on a Mac.

      Delete
  2. You have to enable WebGL from the Developer menu on a Mac (and you have to enable the Developer Menu from Preferences). The part that doesn't work is anything that uses the CONTROL key modifier, since on a Mac that is a hold over from the days where macs only had one button (control left click = right click).

    ReplyDelete
  3. Working fine in Firefox, no problems.
    Although would be nice to have a pause feature; or a slower frame by frame choice.
    And thanks for making these video, always appreciate the visuals to help explain these expansive seasonal climate systems of our earth.

    - reader from WUWT

    ReplyDelete
    Replies
    1. Thanks, reader,
      The controls are a function of the viewer your system brings up. It's a swf file, so that would usually be Adobe. I can't get them to show either.

      Delete
    2. In my system right click on the movie throws up a useful menu. There is a forward option that lets you go one frame at a time. It isn't convenient, because you have to open the menu every step. But it's possible.

      Delete