10.7 Python Display Options


Previous

HOME


Next

A new class of display programs for trajectories and air concentration contours using the Python language has been developed. These programs are still undergoing modifications to their capabilities and interface requirements. Therefore, until these programs mature, only some basic instructions are provided in this Tutorial.

If the Python display programs are provided with your HYSPLIT distribution, you will find detailed installation instructions for Windows (install_win.txt), Apple (install_macos.txt), and LINUX (install_linux.txt), in the python directory. Regardless of the computational platform, a Python emulator is required. See the Anaconda web page for platform specific installation instructions.

Currently there are three Python display programs provided in the HYSPLIT exec directory: trajplot.py, toaplot.py, and concplot.py. These are direct equivalents to trajplot(.exe), isochron(.exe), and concplot(.exe). The command line arguments for the Python programs are equivalent to their SVG conterparts. In the section below, reviews the center-of-mass trajectory display example from Section 7.6 in more detail.

  1. If you no longer have the cmtraj.txt endpoints file in your working directory, then go back and re-create the example with the basic map display. Multiple output options are available, but for these examples stay with the default PDF.

  2. Selecting the OPEN_STREET as the map background provides a simple street map display with city locations, while selecting OPEN_TOPO adds shading to represent the terrain topographies. Zoom options will redraw the map with corresponding greater resolution of the political and terrain boundaries. Note an internet connection is required to download the map files needed for each display when not using the default HYSPLIT map background file.

  3. If a python display is created through the GUI under Windows, a batch file called pyhook.bat will be created in the working directory. This batch file can be run outside of the GUI to recreate the graphic. If desired, the command line options can be edited to optimize the display.

  4. An example of an air concentration plot can be obtained by re-running the base configuration for the aircraft sampling case shown in section 9.2. The new Python graphic is identical to the original SVG graphic. However, the Python display has additional format, zoom, and map background options not available otherwise.

These new display programs are optional and still under development. One note of caution, worth repeating, is that the use of any other map background file option other than the default requires an active Internet connection, otherwise the display will fail.