The Python scripts use PyNGL to create the graphics and a mix of xarray and PyNIO to read the data.
These NCL and Python scripts are companion examples to the excellent NCL to Python Transition Guide, written by Karin Meier-Fleischer of DKRZ (Deutsches Klimarechenzentrum).
In order to run these examples, we recommend that you use Python version 3.x. The easiest way to install Python and the required packages is to first install conda, and then use conda to install these packages to conda environment:
conda create -n ncl_to_python -c conda-forge xarray netcdf4 scipy pyngl pynio ncl
To activate the "ncl_to_python" conda environment, type:
source activate ncl_to_python
Once you are in the "ncl_to_python" conda environment, you can run the examples with:
ncl TRANS_panel.ncl python TRANS_panel.py
The data files for these examples can be downloaded from:
http://www.ncl.ucar.edu/Document/Manuals/NCL_User_Guide/Data/
Note that the NCL and Python images may not be identical. This is mostly due to different defaults being used by each package for things like font sizes and labelbar widths and heights.
DKRZ has an extensive suite of graphical examples using NCL, PyNGL, and matplotlib.