Downloading and installing PyNGL and/or PyNIOPyNGL and PyNIO are now distributed under conda.
If you want source code for either package, visit our GitHub pages:
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.
PyNIO and PyNGL are both available for Python 2.x or 3.x and can be installed via conda. recommend using a conda environment:
conda create --name pyn_env --channel conda-forge pynio pyngl source activate pyn_env
The above will give you PyNGL and PyNIO under Python 3.x. If you need a Python 2.x version, then use:
conda create --name pyn_env_py2 --channel conda-forge pynio pyngl python=2.7 source activate pyn_env_py2Support for Python 2.7 will be ending in 2020, and we highly recommend converting to Python 3 now.
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: