OpenDX Intro 1: Starting OpenDX

Authors: R.S. Weigel and M. Wiltberger
Date: 06/02/2005
Note: Used in the 2005 NCAR Summer School.

Modified-By: M. Gehmeyr
Date: 10/25/2005
Note: Adapted for usage from web browser

Keywords and Acronyms:

DX/OpenDX (Data eXplorer/Open Source Data eXplorer): Before OpenDX was Open Sourced (in 1999), it was a product named DX written and sold by IBM. The acronyms DX and OpenDX are often used interchangeably.

VPE (Visual Program Editor): The VPE can be used to interact with a DX network.

DX Network: A program rendered by the VPE that consists of a text file with extension .net. A network can be edited using the VPE or a text editor. The code in a DX Network is interpreted and executed by the DX Executive.

DX Executive: A binary program that interprets, compiles, and executes a DX Network.

Online References:
See http://lasp.colorado.edu/cism/CISM_DX


One program that is often used as a high-level interface to the codes in the CISM_DX package is OpenDX.

To start OpenDX with CISM_DX extensions, click here ; this will cause a Visual Program Editor window to open. Alternatively you can invoke this startup network from command line by typing /tmp/CISM_DX/cismdx_opendx.

The VPE is the primary way programs are written in OpenDX. On the left-hand side of the VPE you should see a list of modules with a + sign next to them. Selecting a + expands that category. Many of categories that start with CISM_DX_ include routines for analysis of models used by CISM members. The other categories contain modules for visualization of model output generated by programs written in lower-level languages. For example, The CISM_DX_MagField category contains modules that make calls to the Tsyganenko magnetic field model, which is written in Fortran 77.

To "write" your first program in the VPE, expand the ALL category on the left and scroll down and select the "Text" module with a left-click. Release the mouse button and move the pointer over the canvas. Your pointer should have turned from an arrow into a half-square. Now left click and you should see a green box appear. Each green box can be thought of as a subroutine that completes a step in process of producing a final image (or other form of output).

Double click on the green Text module box, replace the text (none) "Hello World" (with double quotes). For the font value, you should see "variable". If you want to change the font type, click on the box with "...". Also notice the tabs on the bottom such as "Description" and "Help on Syntax". You may need these to get more detail about the inputs, outputs, and what the module does. The "Expand" button is used in some modules that have many input options. Selecting "Expand" in such modules will list hidden options. The hidden options "direction" and "up" are used to change the orientation of text in an image. After you have explored the buttons click OK.

The OpenDX Executive reads the code and decides if it needs to do anything. So far, our network produces no output, so executing the network yields no result and OpenDX does nothing but scan the network to see if it should do anything.

To complete the program, put a "Print" module below the green "Text" module and then connect the bottom (output) tab of "Text" to the left-most top (input) tab in print. Execute the program typing CTRL+E (short cut for Execute-Execute Once from the top menu bar). A message window should pop up and you will see a line with "String. Hello World". OpenDX is most useful for plotting, so this example is not complete until you wire the output of Text to an Image module and type CTRL-E.

Note that you can program networks with a text editor. Select File-Save As, enter /tmp/HelloWorld.net in the Selection box and then select OK. You can view the text by opening a terminal and then enter "cd /tmp ; more HelloWorld.net". Alternatively, start a file browser and open HelloWorld.net in the /tmp folder.


Move on to the next exercise.