Ncvtk

A program for exploring longitude/latitude based data stored in NetCDF file format. Ncvtk is built on top of the VTK toolbox.

What Ncvtk is good for

Ncvtk has been designed with the aim of offering a high degree of interactivity to scientists who have a need to explore three-dimensional, time-dependent planetary data.
The input data should be stored in a NetCDF file and the metadata should loosely follow the CDC convention. In particular, we support codes that are part of the Flexible Modeling System infrastructure provided the data lie on a longitude/latitude, structured grid.

Ncvtk contains a number of built-in VTK visualization pipelines (color plots, contours, vector arrows, slices, etc.). New pipelines can be added on demand.

An intuitive graphical user interface will get novice users quickly up to speed. Ncvtk is significantly easier to use than dedicated visualization packages (OpenDX, IRIS Explorer, AVS/Express) while offering comparable performance.

Project fields either on the sphere (default) or use flat projections (partial support).

Use hardware rendering whenever possible.

Can handle large data sets (4 GB+).

Mouse interactivity for zooming, translating and rotating.

Can have multiple longitude/latitude axes.

Uniform and non-uniform structured grids.

Warped (e.g. tripolar) grids in (x,y).

Date and time arithmetic.

Interactive control of the colormap, including opacity.

Colormaps can be imported from ASCII files.

Multiple color plot layers (e.g. clouds on top of topology).

Bump (surface) map

Sun light synchronized with date/time.

Adjust view angle with sliders.

Probe data with mouse.

Save the scene as Postscript, PNG or JPEG file.

Capture time sequences for movies.

Load/save mechanism for settings.

Scripting interface.

Save your visualization as a Python script.

Color, contour and vector arrow plot.

Text/image/time annotation

Mesh visualization

World map (includes countries, states, hydrology, etc.)

Vertical slicing

Three dimensional iso-surfaces

Line plots

Streamlines

What Ncvtk is not good for

Currently, Ncvtk assumes that your data lie on static, logically rectangular meshes with data varying fastest in x, then y, then z, and time. There is no support for unstructured meshes (tetrahedra, prisms, etc.). All grids are assumed to be independent of time. Neither is there any support for multi-resolution grids, or Adaptive Mesh refinement (AMR) grids. Another current limitation is that grids are not allowed to be warped in the vertical dimension.

Ncvtk is not a data processing tool. However, the content of NetCDF files can be manipulated using tools such as NCO to produce new NetCDF files, which can then be read by Ncvtk. It is also possible to generate and manipulate data on the fly using CDAT, and pass the data to Ncvtk using a scripting layer.

Depending on user requests, some of these limitations may be overcome in future releases.

Ncvtk is written in python and should be, like VTK, highly portable. Ncvtk is being developed on Linux and Windows.

Installing Ncvtk can be as simple as typing "python setup.py install". More specific instructions can be found in the README file.

Add-ons:

ciaworld.nc a NetCDF file containing political boundaries and hydrology data.
This file is needed in order to use the Options &rarr
World Map pipeline. You should drop this file in the directory < prefix >/ncvtk/data.

Testing ncvtk:

cd data

python test_data.py. This will create test_data.nc.

python tutorial1.py, or

Type ncvtk

File &rarr Open to select a NetCDF file.

Select, for instance, Visualize &rarr Color from the top tool bar.

Running the script ncvtk:

[python] ncvtk -h will display a list of options

[python] ncvtk -f file1.nc,file2.nc (or [python] ncvtk -f file\?.nc)

Each NetCDF file will instantiate a separate GUI. To view data from a given file, select Visualize &rarr Color, for instance.

You may need to set the environment variable PYTHONPATH to pick up the VTK libraries, depending on your VTK installation (and your installation directory if you used the --prefix option, see above).

[python] ncvtk -x x_pat -y y_pat -z z_pat to override the default built-in, axis name patterns. Ncvtk assumes the longitude, latitude, elevation and time axes to follow certain naming conventions. If Ncvtk fails to recognize a field as having the proper axes dependency, you can help ncvtk by passing the -x, -y or -z options. For instance, if your longitudes are called Lambda, you could pass -x Lam. A list of valid axis regular expression patterns is stored in file src/nvSettings.py.

Tutorials:

Please check the tutorial*.py files in the data directory.

You may also want to take a look into ncvtk v 1 tutorial, although the software has significanty evolved since February 2005.