X
PrevPrev Go to previous topic
NextNext Go to next topic
Last Post 15 May 2007 11:14 AM by  anon
XINTERANIMATE from netCDF
 1 Replies
Sort:
You are not authorized to post a reply.
Author Messages

anon



New Member


Posts:
New Member


--
15 May 2007 11:14 AM
    I would like to know how to read data from netCDF and animate the resuls using XINTERANIMATE. The data is for surface water ponding depths.

    Deleted User



    New Member


    Posts:
    New Member


    --
    15 May 2007 11:14 AM
    XINTERANIMATE should be fairly straightforward. The example that is given in the Online Help for that routine shows that once you have imported data from your data file into the IDL memory space, only three fairly short lines of code are needed to create the animation viewer. The general algorithm for NetCDF data would be: Step 1: Use NCDF_[query]-type functions to dynamically figure out what images are in your NCDF file(s) and what size IDL memory will need to store these locally. Step 2: Allocate to an IDL variable memory for a 3D"image cube" to hold all the image "frames" that can be imported from NCDF for use in the animation. Step 3: Fetch the images from the NCDF file(s) using procedures like NCDF_VARGET. Store these imported images as frames/planes within the 3D image cube array. Step 4: Following the example in Online Help, run XINTERANIMATE calls like: ; Configure the settings for the animation xinteranimate, SET=[imgWidth, imgHeight, nFrames], /SHOWLOAD ; Load the animation for i=0, nFrames-1 do xinteranimmate, FRAME = i, IMAGE = ncdfImageCube[*,*,i] ; Play the animation: xinteranimate, /KEEP_PIXMAPS Is this solution more straightforward for you now? James Jones
    You are not authorized to post a reply.