What is it?

Download the source for version 2.1.10 (updated Feb 7, 2024).

Ncview is a visual browser for netCDF format files. Typically you would use ncview to get a quick and easy, push-button look at your netCDF files. You can view simple movies of the data, view along various dimensions, take a look at the actual data values, change color maps, invert the data, etc. It runs on UNIX platforms under X11, R4 or higher. For more information, check out the README file; you can also see a representative screen image (GIF, 66K) of ncview in action. Here are some old versions in case you need them. Trying to get ncview to run on windows under cygwin? I build and use ncview under cygwin all the time with no problems, so it’s definitely possible. If you are having troubles with cygwin, this information might be of use. Trying to get ncview to run on a 64-bit Linux machine, and getting link errors about “incompatible libraries skipped”? Try:
./configure –x-libraries=/usr/X11R6/lib64
(or otherwise specifying the location of the 64-bit X libraries on your machine).

Note: are you a Ubuntu user, and get configuration errors complaining about the lack of X development libraries and headers? Read some comments from ncview users on how to get ncview working on Ubuntu.

This version adds support for automatically displaying the last timestep in a growing netcdf file — just go to the last frame in the file and hit pause, and ncview will periodically check if the file has grown. Also, there is a new ‘-autoscale’ flag that will scale the colormap to each frame automatically.

Do you need a version for Windows? To install ncview version 2.0, you must: Install HDF-5, version 1.8.4 or later. Install the netcdf C library, version 4.1-beta2 or later, and you must compile it with the –enable-netcdf-4 flag set. If you want to use udunits, you must install udunits version 2. The udunits library version 1 (which is deprecated) is not supported any more.

Please notify me of all bugs you find.

Alternatively, you can download the source for old, deprecated, but stable version 1.93g, which does not require the HDF library (but cannot read netcdf files created in the new, version 4 format as a consequence).


Missing Values, Attributes, and NetCDF Conventions

Ncview follows some of the suggested standards as described in the NetCDF User’s Guide, especially the Attributes Conventions section. In particular, the following attributes are taken into account:

  • missing_value: This attribute, which must be of the same type as the variable it is associated with, is an important one to set if you have missing values that are indicated by some “special” number such as -999.9, 1.0e35, or whatever. If you don’t set this attribute, ncview will not work properly.
  • units: A character-type attribute that gives the units of the variable it is associated with. For example, “meters” or “Years”.
  • long_name: A character-type attribute that gives the extended, or more descriptive, name of the variable it is associated with. For instance, if the variable’s name is “Lon”, its long_name might be “Longitude”.
  • title: This global character-type attribute gives some short, descriptive summary of the meaning or parameters of the data file. For instance, it might be “Run 017: dx=4, dy=5, nT=45 yrs” or “El Nino Simulation, no mixed layer, D. Pierce SIO/CRD”.
  • add_offset, scale_factor: Ncview respects these attributes, transparently scaling and offsetting the data as specified. See the netCDF documentation on these attributes for details. In essence, these attributes let you implement a form of data packing.

Dimensional variables

A convention that ncview follows is that the values along a dimension are stored in variables of the exact same name as the dimension itself. I call these “dimensional variables”, or “dimvars” for short. So, for example, imagine you have a dimension named “Time” that has a size of 3. If you want ncview to understand that the first time is 1995.0, the second is 1996.0, and the third is 1997.0, then you need to make a variable named “Time” that has exactly one dimension, the “Time” dimension, and has values (1995.0, 1996.0, 1997.0).

UDUNITS support

If you format the time axis using the udunits package (as I do), then ncview will properly format the date into something meaningful. For example, a common units string when using the udunits package is something like “days since 1900-01-01”. Then when you get a time axis value like “360.0”, ncview will not just show the (uninformative) value “360.0” but will display it as “25-Dec-1900”. To enable this support you must install the udunits package BEFORE configuring ncview in the installation process.