LEARN: More How-To-s
Contents
Multiple NetCDF files, one for each time, for time animation
On-screen Color Scale Legend
Time Animation with Accumulating Point Symbols (after-shock location build up)
How to increase available memory used by the IDV on a Mac
The "Transect View:" a vertical cross section for all data types
How to put a vertical image in the IDV
Jython Method to subset a large image, with user input
Multiple NetCDF files, one for each time, for time animation
If you have data in multiple NetCDF files, with a time for each one, you can link them in the IDV to allow time animation loops. From Unidata support:
Assuming you are running a fairly recent version of the IDV you can do a multiple select (using Control-Click) of the files in the file chooser. Under the "Data Source Type" select "Aggregated Grid files"
This uses a generated NCML (http://www.unidata.ucar.edu/software/netcdf/ncml/) wrapper and only works if the files differ on time. -Jeff McWhirter
On-screen Color Scale Legend
To add a color scale legend to your display, click on the display control name on the panel on the right side of the main display. The display control pops up. Choose Edit (in the display control, not the outer dashboard border) --> Properties --> Color Scale.
Check the "Visible" box. Click one of the four "Positions" for the scale. Click the "Label Color : Change" box to choose a color for the text values along side the color scale. Click OK or Apply to see the color scale label in the display.
Time Animation with Accumulating Point Symbols
You can show a kind of time animation where more data appears on the screen as time advances, the earlier values not being removed. This is useful, for example, to show aftershock locations filling a fault zone, or lightning strikes locations delineating a thunderstorm.
Load a point data file into the IDV, where each point has its own time value (not all the same times). "Create Display" for a Point Data Plot. Switch off Declutter in the display control window (Layout tab).
![]()
In the display control window, Times tab, check Show : Multiple. Also click on the check item right of "Range" and choose "Start Time: Use First time from data" and "End Time: From Animation Time." See the example above. Click on time animation to see the accumulating plot by time.
Here is a bundle file that shows time accumulating animation for the 200 largest earthquakes in an area including California since 1964. Load the URL for this bundle file in Dashboard window - Data choosers - URLs entry box.
You can use the time animation controls to change the speed of the display. And of course this is a 3D display, showing locations in depth if you change the view from overhead. You can see the parameters for a particular earthquake. Stop the time animation. Click on the Plot tab in the display control. Click on an earthquake in the map display (overhead point of view works best here).
How to increase available memory used by the IDV on a Mac
Here is the way to edit the memory limit on the Mac. The IDV performs much better with 1000 mb or more.
The IDV install on the Mac OS X comes with the maximum memory preset for 512 mb. In order to increase the memory to say 1024 mb, you need to edit the Info.plist file in the IDV application contents. To do this first go into the IDV folder in the Applications folder and holding the Control button on the keyboard and click on "IDV". For a 3-button mouse just right click. This will give the Contents of the file in a new window. Then click on Contents folder. You can edit the Info.plist file by dragging it into a text editor or into a terminal window (type vi first). After the line VMOptions is the memory setting "-Xmx512m". Change this to -Xmx1024m and save the file. You can now launch the IDV by double clicking on the IDV application. You should see 1024 MB as the allocated memory at the bottom of the IDV window.
Alternatively for unix types: in a terminal window type vi /Applications/IDV_2.1/IDV.app/Contents/Info.plist where IDV_2.1 is the version (directory) of your IDV install.
Do not use the maximum amount of memory on your machine as some is needed for the operating system itself. For a system with 2 Gb of physical memory, you can probably allocate 1.5 Gb to the IDV. If you have less than 1 Gb of RAM, you should start the IDV with about 1/2 of the total memory (512 MB). (Unidata)
At present, you really cannot go much beyond 1.5GB, even if you have more memory. The "32 bit limit" is still in the JRE [Java] ....some day (soon?) they'll go beyond this. (Tom Whittaker)
The "Transect View" a vertical cross section for all data types
For any data with a vertical depth character, including point observations such as earthquakes, you can make a special vertical cross section display called a "Transect View" which collapses all the data in a vertical box (of preset width) into a flat display. See online Transect Views, or in the IDV menu, Help -> Main Window -> Transect View. You can control the width of the box that bins the data to show in the transect view display.
First create a Transect display. In the main IDV window, choose File -> New -> Display Window -> Transect Display -> One Pane. The new display opens in it's own window.
In your main (map) display move to an area with overhead map view of the general area where you want the transect. In the new window, make menu choice Transects -> Edit. This brings up the Transect Drawing Control. A color transect line labeled B and E appears on the map display.
In the Transect Drawing Control, Controls tab panel, click on the crossed line symbol. Now you can use a mouse drag in the map display to drag either end of the transect line.
In the Transects Display, under menu item Transects, click on the transect you want to use, which are labeled by end position in latitude, longitude.
Now in the Transects Display, under menu item View, choose Properites, Transect tab. Set the width of the box you want. Any data points outside the box in the map view will not appear in the transect display.
To see vertical scale, in the Transects Display, under menu item View, choose Properites, Vertical scale tab, and enter your vertical scale and units. Some fiddling may be needed to get the display and vertical exaggeration you want. Typical values for data inside the earth are, for example, Min value -600.0, Max value, -100.0 km, Units km.
Finally you can add the data. Make a display like normal in the main window, and the same data will appear in the Transect Display. You can move the position of the transect line, vertical scale, width, and plot symbols (Layout manager).
![]()
A map display of earthquakes in Japan colored by depth, showing the transect line (red) and box width (green); click for full size
![]()
the Transect View from its own window; click for full size
How to put a vertical image in the IDV
This is only available in IDV verison 2.1 which is due before the end of December 2006.
In an ximg file (see Mapping an image into the IDV display) you can, optionally, specify all four points of the image in 3D space with ullat/ullon/ulalt, urlat/urlon/uralt, lllat/llon/llalt, lrlat/lrlon/lralt The IDV fills in some default values if they are not fully specified. e.g.: < image ullat="30" ullon="-100" urlat="30" urlon="-90" ulalt="5000" llalt="0" name="vertical" url="test.jpg"/> In the above we define the altitude (in meters for now) of the upper left of the image to be 5000. The lower left is 0. Since there isn't any alt defined for the upper right or lower right they default to 5000 and 0 respectively. Likewise, since the lower right lat/lon and lower left lat/lon are not defined they default to the lat lon of the upper right and upper left points.
Check out this sample ximg file (for the display below) Geology cross section ximg file.
Geology cross-section of Maryland, a jpg image in the IDV (oblique view):
Click for full size
Using other IDV tools a 3D relief topo map has been included. It can be semi transparent, and moved to any level vertically as well.
A Jython Method to subset a large image, with user input
To learn about data computations with Jython (Python) inside the IDV, see IDV Formulas and IDV Jython Methods.
You can subsample an image with the following Jython library method (called by an IDV "Formula"; see Help about Formula):
def subsample(image, nskip): from ucar.unidata.data.grid import GridUtil return GridUtil.subset(image, int(nskip))and have your formula be:subsample(image, numpts[isuser=true])
which prompts you for the number of points. Contributed by Don Murray.
See the main how-to page for how to display ("navigate") an image, i.e., set lat/long bounds.
Home | Overview | Data and Products | GEON IDV | Research | Education and Outreach
![]()