Two-dimensional Examples

Figure 1

With a blank Visual Program Editor (VPE) canvas, place three modules on the canvas and wire them together: Import, AutoColor, Image. Double-click on Import to open the configuration dialog box.

Type "100mb-t-w_Q87.ncdf" in the name field, which is a netCDF file containing three months of daily global temperature and horizontal winds at 2.5-degree resolution. Hence, enter "netCDF" in the format field. In the variable field, enter "temperature". Since initially, you may only want to look at a single time step, hit the Expand button and enter a 0 in the start and end fields. Now hit Execute-Once under the Execute pull-down menu. You will see each of the module boxes highlight in green as they execute: Reading the data from disk, creating colors for the data (i.e., a linear, hue-based, pseudo-color mapping from the minimum to the maximum value), and rendering an image. An image window will pop up that contains the resultant visualization, a two-dimensional pseudo-color image of global temperature.

You will notice that the orientation of the image is not correct. This is because the geographic coordinate system of these data is not the same as the default used by Data Explorer. This situation can be corrected by simply changing the orientation of the image. The easiest way of doing this is by opening the View Control option in the Image window (ctrl-v), and selecting Camera mode. For the To point, simply enter 0, 0 and 0 for x, y and z. Then select From and enter 0, 0 and -1. Then select Up, and enter 1, 0 and 0. If you hit Execute-Once, the image will rerender in the appropriate geographic orientation.

Figure 2

Data Explorer optionally supports annotation of the data that you are visualizing. If you want to place a set of axes around your data, select the AutoAxes item under the Options pull-down menu in the Image window. A dialog box will open up within which you have a number of options for creating axes. In this case, enter labels for x and (i.e., Latitude (Degrees North) and Longitude (Degrees East), respectively). After selecting the appropriate options, hit Apply, and then Execute-Once. The results are rerendered: the pseudo-color image with an axes overlay.

Figure 3

A typical operation for looking at global data might be to apply a cartographic projection. Hence, from the Cartography category, select Projections and place it on the canvas. Disconnect the wire from AutoColor to Image and connect it to Projections. Then connect the output of Projections and wire it to Image. Double-click on Projections and then hit the Description button in the configuration dialog box. You will see a number of options for applying a cartographic projection. In the fourth input, enter a 2, for using a Mollweide projection, and then hit OK. After you then Execute-Once, the data will be displayed in a Mollweide projection.

Figure 4

The Projections tool is actually a macro, a visual program that uses other Data Explorer tools (modules and macros). Among the tools that Projections uses is one called Mollweide. It uses the idea of coordinate warping to implement the map projection without interpolation. The transformation is implemented using the Compute module, which is high-lighted. Data Explorer uses a convention of defining vectors as [a.x, a.y, a.z] where a is a vector consisting of three components, x, y, and z. Ordinarily, the Compute module operates on data. The Mark module is used to indicate that subsequent operations are to be applied to another component of a field (i.e., the positions -- where data are located in space, which are typically 2-vectors or 3-vectors). The Unmark module reverses the effect of the Mark module. You will also notice the use of the Inquire module. It is employed to query the incoming data to determine if they are two-dimensional or three-dimensional, so that the Compute module specifies two-dimensional or three-dimensional operations, as appropriate.

Figure 5

A typical operation for looking at global data might be to overlay a global map. Hence, from the Cartography category, select WorldMapProjections and place it on the canvas. Do NOT be alarmed by the number of optional tabs that are present. You will not need to worry about most of them for a while, if at all. This module will create a suitable map. Since you used a Mollweide projection in the previous example, double-click on WorldMapProjections and enter a 2 in the third input to create a Mollweide map. Then from the Structures category, select Collect and place it on the canvas. Now disconnect the wire from AutoColor to Image and wire it to one of the tabs of Collect. Take the output tab from WorldMapProjections and wire it to the other input tab of Collect. Now take the output of Collect and wire that to Image. You have Collect'd the pseudo-color image and a world map composed of coastlines and national boundaries. Now hit Execute-Once. You will see the temperature image overlayed with the map. Data Explorer automatically registers both data visually, which is a concept that will be important in subsequent examples.

Figure 6

Most earth and space science data sets contain multiple parameters. Along with the temperature data there are horizontal winds. To add these data to the picture, place an Import module on the canvas as you did for Figure 1 with the same input for name, format, start and end. For the variable, enter "wind_velocity". Now connect the output of Import to Projections (with the third input being 2 for the Mollweide projection) to Include (under Import and Export) to AutoGlyph (under Annotation) to Color (under Transformation). Double-click on Include, which allows you to select portions of your data by value. The wind_velocity data does not fully populate the grid: missing points have values less than -100 for each component. Therefore, in the min input enter [-1000., -1000.] and the max input enter [-100., -100.]. For the third input, exclude, enter a 1 to eliminate points in this range from the data. Double-click on AutoGlyph, which provides geometric or glyph representations for each point in your data set. Enter "arrow2d" for the type of glyph. If you left this blank, Data Explorer, would give you an appropriate default. Now select the Collect module and do a ctrl-a. This will add a third tab. Wire the output from Color to that open tab.

Double-click on Color and enter the color (second input) you want for the vector arrows.

Now hit Execute-Once. The wind data will be read from disk, processed and displayed with the temperature data and map.

Figure 7

Now try this same approach with some irregular global data. Wire Import to Include to AutoColor to Image. Double-click on Import and type "TOMS_Q87.ncdf" for name and "ozone" for variable. These data have gaps in coverage with a zero value. For the min and max inputs, enter -0.1 and 0.1, respectively and a 0 for the fifth input, cull. Hit Execute-Once. The new data will be read, and you will now see an image with gaps corresponding to data drop outs and areas where the sensor could not operate.

Figure 8

To overlay a map on this image, use WorldMapProjections. Double-click on WorldMapProjections and release the button for the third input, projection, to create the default Cylindrical Equidistant map. Hit Execute-Once. Now you see the data with a geographic map. Now, try to do an animation of these data. Double-click on Import. Release the buttons for the start and end inputs and the buttons labelled Hide. Two new tabs will appear on the Import module box. From the Special category, select Sequencer and place it on the canvas. Wire its output to the start and end inputs of Import. Sequencer produces a set of integers in response to a VCR-like widget. Double-click on the Sequencer module. The widget will pop up on your screen. The box in the upper right is the frame counter. Click on it. A dialog box will appear that allows you to specify the range of integers to be produced. For the Start value enter a 0 and for the End value enter a 6, just to put limits on the number of frames that you will animate. Hit the frame counter box again. The Sequencer settings box will go away.

Depress the button that looks like a loop. This will force the Sequencer to operate in a continuous loop mode. Now hit the play button (triangle pointing to the right). Each time step of these daily data will be read, processed and rendered. After each step is completed, the results will be stored in memory. After all six frames have been computed, the results will be played back in an animation loop. Hit the stop button (a square), when you are finished.

Figure 9

To create a more complex animation, wire Import to Projections and then Projections to Include. Wire AutoColor to RubberSheet (Realization category) and then to Normals (Rendering category). RubberSheet will create a deformed surface from data. Normals will create normals on the deformed surface for shading during rendering. The output from Normals should go to Collect. Double-click on Projections. For the fourth input, projection, enter 4, for polar orthographic projections. Do the same for the third input of WorldMapProjections. Double-click on RubberSheet. Enter -0.15 for the scale input, which will provide for a constant scale for all time steps, and hit OK. Double-click on AutoColor and hit the Expand button. Enter a value of 0.65 for the second input, opacity, and hit OK. This will create a translucent surface.

Hit Execute-Once and you will create two surfaces, one for each hemisphere. Open the View Control dialog box (ctrl-v) in the Image window and select Rotate (ctrl-r). Rotate the surfaces away from you so you can see them at an angle that is preferred. Now hit the play button. You will create an animation sequence of these ozone data as pseudo-colored deformed surfaces for the northern and southern hemispheres in polar orthographic projections, registered over an appropriate map.

Figure 10

The same approach to cartography can be extended into three dimensions. Disconnect the Projections and WorldMapProjections tools. From the Cartography category select Sphere and Globe. Wire Sphere after RubberSheet and before Normals. Connect Globe to the now open second input to Collect. Double-click on Globe and enter a 3 for the second input, reduction. Globe provides an earth globe derived from 30-minute resolution topography data. The reduction input allows you to create a lower-resolution globe. Double-click on RubberSheet. Change the scale to 15.0. Hit the Expand button. Enter a 100 for min and 650 for max to ensure a constant scale range for all the time steps. Double-click on Sphere, which transforms data from cartesian to spherical coordinates. Enter 5200 for the radius of the sphere in km and 1 for the flag to inform Sphere that you want the data to be treated as three-dimensional. If you experiment with this radius value and that of the RubberSheet scale, you can control the relative radial deformation and placement of the spherical shell that will be created. If you would like to incorporate your own color and opacity maps, then replace AutoColor with Colormap (Special category) and Color. If you double-click on Colormap, the Color Map Editor will appear. You can then create your own color and opacity maps. Appropriate minimum and maximum values for these data would be 100 and 650.

In the Image window under Options, select Reset. This will force the program to run and create a new camera view for these data, which will now be shown in spherical, earth-centered coordinates. You may choose to rotate the view to see a different part of the earth by selecting View Control (ctrl-v) under Options in the Image window, followed by selecting Rotate (ctrl-r). After you have an image that you like with the appropriate geographic orientation hit the play button on the Sequencer. An animation will be produced, which will show total ozone circulating around the globe.

Three-Dimensional Examples