PyNcView is a cross-platform NetCDF viewer written in Python. It provides an easy-to-use graphical user interface to the creation of animations and publication-quality figures.

Screenshot thumbnail
PyNcView vector plot
Screenshot thumbnail
PyNcView with map projection and coast lines

Getting started

There are two ways to obtain PyNcView:

  • Download a binary installation package. This is the easiest option: just run the downloaded package to install PyNcView, which can be used immediately after. However, an installation package is currently only available for Windows. Anyone interested in putting together an installation package for other operating systems is encouraged to contact us.

  • Download the source code. This gives you the very latest version, and also allows you to make changes to the source code if desired. However, to run PyNcView from source you need to have several software packages installed. This is documented in the following section.

Running from source

PyNcView is written in Python, and uses several third-party Python modules (notably, PyQt4, NumPy, MatPlotLib, netcdf4-python). These need to be installed for PyNcView to run. Additionally, PyNcView is built upon visualization libraries developed for the Graphical User Interface to the General Ocean Turbulence Model (GOTM). The GOTM source code therefore needs to be present on your system as well.

The following steps are typically needed to run PyNcView from source. Note that 'download and install' on some operating systems (Linux in particular) can be as simple as checking the required package in the OS package manager.

(1) Install Python and its required packages (NB you can also install a Python distribution that includes all necessary packages, such as Enthought Canopy - free for academic use):

  • Download and install Python 2.x (Python 3.x is not supported!). Most operating systems already have this installed, but Windows is a notable exception. The minimum version supported is Python 2.5.
  • Download and install PyQt4 for your version of Python. The minimum version supported is PyQt4 4.6. Support for PySide is under development. At the moment PyNcView is mostly functional under PySide, but a few issues remain. If you have both PyQt4 and PySide installed, PyQt4 is used by default. To use PySide instead, set environment variable QT_API to PYSIDE before running PyNcView.
  • Download and install NumPy for your version of Python.
  • Download and install MatPlotLib for your version of Python. You may also want to install MatPlotLib's BaseMap toolkit, available as separate download at the same location; this will allow you to plot data on geographic maps using various projections.
  • Download and install netcdf4-python for your version of Python.
  • Windows only Download and install the Python for Windows extensions for your version of Python.

Optionally you can also install pyhdf, which then allows you to view files in the HDF4 format.

(2) Download and run PyNcView:

  • Obtain the developers version of GOTM from its Git repository. Linux distributions typically come with git preinstalled. On Windows you need a separate client for this purpose, such as TortoiseGit. You do not need to compile GOTM or its GUI; simply having the source code on your system will suffice. You do need to set environment variable GOTMDIR to the path to the source code on you system. This is the directory that contains subdirectory gui.py.
  • Obtain the PyNcView source code from its Git repository. Linux distributions typically come with git preinstalled. On Windows you need a separate client for this purpose, such as TortoiseGit.
  • Run pyncview.py to start PyNcView.

Getting help

If you run into problems, or have questions or comments, please post a message to the PyNcView help forum.