Downloading and installing PyNGL and/or PyNIOThe current version of PyNIO is 1.4.1 and of PyNGL is 1.4.0, both released on July 28, 2011. They are supported under Python 2.6 and 2.7, and NumPy 1.4, 1.5, and 1.6.
See the "What's new" section to learn more about this version. These two packages are available in source code or binary format.
The source code licenses for PyNIO and PyNGL are similar to the The University of Illinois/NCSA Open Source license.
To download and install PyNGL or PyNIO on your system, you need to:
- Request an account from the Earth System Grid (ESG) website
- Read these notes for Mac OSX systems
- Download the source code and/or appropriate binaries for your system
- Remove old versions
- Install software
- Test software
If this is your first visit to the Earth System Grid, a short registration is required. To register, go to:
and look on the right side of the page under "Quick Links" for "Create Account".
You can browse the different versions of PyNIO and PyNGL by going to http://www.earthsystemgrid.org and clicking on:
"PyNGL: Python Interface to the NCL Graphics Libraries"or
"PyNIO: Python Interface for Multi-format Geoscientific Data I/O"in the bottom center of the page. You don't need to login to browse the website.
When you find the version you're interested in, clicking on "Download files for this collection" will prompt you for your ESG login and password. You will need to agree to a source code or binary license before you can download any files.
There are two ways to download a file:
- You can click on the filename
in the left side of the table directly to download it to your current system.
- If you need to download a binary for a remote system, you can use "wget" to download one or more files. To use "wget", check one or more boxes to the left of the filename(s) you want to download. Click on "Download all selected files" and you will be given a chance to download a wget script for those files.
Since PyNGL and PyNIO used to be packaged together, it might be a good idea to remove any old combined versions before installing the individual PyNGL or PyNIO packages.
You can do this by removing the "PyNGL" directory from the appropriate "site-packages" directory under your python distribution. This location may vary from system to system, but is generally found in $PYTHONPREFIX/lib/pythonx.y/site-packages, where x.y is the version of python, like 2.6 or 2.7.
- Install PyNGL or
PyNIO from binary ("built") distribution
- Install PyNIO from source code
- Install PyNGL from source
You can quickly test PyNIO and PyNGL by running python and importing their respective modules:
import Nio import Ngl
For more extensive PyNIO tests, see the test PyNIO section.
For more extensive PyNGL tests, you can run any one of the examples in the gallery by typing:
pynglex example_nameFor example:
pynglex ngl01pNote that some of these examples depend on PyNIO, and will not run unless you install PyNIO, or use another package to read in the data files.
For a list of all the examples, type:
pynglex -lThe default for most of these examples is to send the output to a PostScript file using the example name, with a ".ps" appended. To change the output to an X11 window, PDF, or PNG file, use the "-w" option:
Note that if the output file contains multiple frames and you are sending the output to an X11 window, you need to click on the window with your left mouse button to advance the next frame. Or, you can position your mouse over the window and hit <RETURN>.