Downloading and installing PyNGL and/or PyNIO
The current version of PyNGL and PyNIO is 1.3.0b1. See the "What's new" section to learn more about this version. These two packages are now distributed separately, and 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.
The binary licenses for PyNIO and PyNGL are similar to the old binary license for the previous versions. A separate binary license is necessary because of the additional 3rd party software included.
To download and install PyNGL or PyNIO on your system, you need to:
- Request an account from the Earth System Grid (ESG) website
- Download the source code and/or appropriate binaries for your system
- Remove old versions
- Install software
- Test software
If you already have an account on the ESG, then you can go there now to get the software; a separate registration is not required.
On your first visit to the Earth System Grid, a short registration is required. To register, go to:
http://www.earthsystemgrid.org/and look on the left side of the page under "ESG News" about requesting an account. When filling out the account request form, indicate you are a PyNGL or PyNIO user somewhere in the "Statement of work" field. The registration will have to be manually approved by an ESG administrator (this should happen within a couple of hours during the regular work week) before you can download the software.
Note that you will receive an automated email message with a web link that you need to visit before the registration can be approved. Once the registration is approved, you will receive a second "welcome" email message. If you don't receive this second message within a reasonable amount of time, send email to esg-support@ucar.edu.
If you have problems downloading files from the ESG, please see this ESG troubleshooting guide.
Download the source code and/or appropriate PyNGL and/or PyNIO binaries for your system
Once you are registered on the ESG site, do the following to download source code and/or binaries:
- Login to the http://www.earthsystemgrid.org
(ESG) website with your name and password.
- Go to the middle of the ESG page to the pull down menu next to
"Shortcuts menu" and select "Latest PyNGL release" or "Latest PyNIO
release".
- This should take you to a page that that has a list of the source code and precompiled binaries.
- If this is your first time going to any of these pages, you will
be asked to agree to a source code or binary license.
- You should now be on a page that has a link to the source code or
a page that has links to each of binaries. To download any of these
files one at a time, right click on the file description on the left
side and the file will start downloading. To select several files to
download, follow the instructions on the page for adding each file to
your data cart.
- If you are not sure what binary you need, you can type "uname -a" on
your system to give you more information. Also, "gcc --version" will
tell you what version of gcc you have.
- Depending on what you downloaded, read one or both of the
following sections on installing binaries or building
from source code.
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.4 or 2.5.
- 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 a more extensive PyNIO test:
python nio_demo.py
You can also try running one of the examples in the test directory.
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 or a PDF file, use the "-w" option:
pynglex -w x11 ngl01p pynglex -w pdf ngl01p
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>.