Downloading and installing PyNGL and/or PyNIOPyNGL and PyNIO are now distributed under conda.
To use conda, you need to either download Anaconda or miniconda:
- Anaconda - this
requires a bit of disk space but gives you a comprehensive suite of
scientific Python packages.
- miniconda - this allows you full control over which Python packages are installed and hence doesn't take up as much disk space.
In either case, be sure to download the environment that includes Python Version 2.x, and not 3.x. (As of Sep 2017, we are close to having PyNIO ported to Python 3.5 and are working on PyNGL.)
To install PyNIO and PyNGL under conda, use a conda environment:
conda create --name pyn_env --channel conda-forge pynio pyngl source activate pyn_env
To test both packages, first try importing them from within python and look at their version attributes:
>>> import Nio >>> import Ngl >>> print Nio.__version__ >>> print Ngl.__version__
You can also run one of the PyNGL graphical examples that uses PyNIO to read a file and PyNGL to plot it. See the PyNGL gallery and look at examples "overlay1.py" or "multi_plot.py" as a start. Once you save one of these examples, you can run it on the UNIX command line with: