High Performance Visualization of f(x,y,t) Data

This work is supported by Zachary Kaplan, Michael Knyszek, Matthew Lotocki, Eliot Feibush the US DOE Contract No.DE-AC02-09CH11466

Motivation User Interface & Workflow Conclusion • GFDL runs large climate simulations and stores time-based 1. Set up layers • High-performance computing approach to visualizing and grid-based data in large NetCDF files (>70 GB) • Load data files, select variables f(x,y,t) data • Current solutions: • Choose/Create Colormaps • Uses GPU and multicore systems to maximize computing • ncview, VisIt • Custom colormap backend power • • Maps file into virtual memory; swapping is slow! Supports VisIt and Paraview • Fast speeds allow for real-time interactive data preview formats • Need streamlined visualization workflow • Generality of software allows the visualization of any

• Quicken analysis, increase productivity f(x,y,t) dataset, not just ocean data

• Write it in Python for maximum portability • Using Python with Tkinter for the GUI makes it portable 2. Choose your region • Written in pure Python, with a few strings of CUDA C • Interactive crop selection • Already deployed of region to visualize and working on GFDL computers Challenges • • Can index in original units Using Anaconda made installation seamless • Need to maximize portability (latitude, etc.) • Which also means minimize dependencies and sysadmin installation • The standard visualization tools that support NetCDF files 3. Select additional options in Python are just as bad as ncview and VisIt • Choose time steps to render • scipy is available but has the same issues • Can set framerate, • output location, etc. Want to create both images and movies Sea Surface Salinity Zonal/Meridional Velocities • Want to support layering of datasets with • Can select one of three methods: • Want the generation process to be fast • GPU, Multicore, Serial • Live preview of a single layer (see next section) Future Work

Solutions • Support arbitrary projections for display 4. View summary • Involves polygon mapping onto a grid • Use the Anaconda environment • See a summary of your • Would allow for viewing Earth from any direction • Everyone builds a personal, local environment selections in a custom • View and slice N-dimensional time-dependent data • Manages Python packages for you and supports most configuration file format • Map images onto sphere for display as a globe • Can save configuration file • For NetCDF reading, use netcdf4-python • OpenGL and run from terminal • Needs on libnetcdf, but Anaconda handles it • Add satellite terrain image to land background • Does not map whole file • Small memory footprint, fast reads of data 5. Run! • Generation process 1. Apply colormap to slice of dataset (creates layer) References 2. Run alpha algorithm to merge layers • Full movies available at http://w3.pppl.gov/~efeibush/cm/ 3. Use Python Imaging Library to create images • Anaconda https://store.continuum.io/cshop/anaconda/ 4. Use to create a movie from the images! • netcdf4-python https://github.com/Unidata/netcdf4-python

• PyCUDA http://mathema.tician.de/software/pycuda/

• PyOpenGL http://pyopengl.sourceforge.net/

Real-Time Visualization

• Real-time preview of a Bathymetry Sea Surface Temp. Composited Image Acknowledgements dataset’s timesteps • Works using PyOpenGL, • This work was made possible by funding from the Department of Energy for the Summer Undergraduate Laboratory Internship But how did we make it 15000x faster? PyCUDA, and CUDA/GL Interoperability (SULI) program. This work is supported by the US DOE Contract • Use the GPU -> PyCUDA No.DE-AC02-09CH11466 • • Take advantage of cores -> Python Processes Supports key bindings for • We would like to thank our mentor Eliot Feibush (PPPL). We would • Use numpy vector operations -> Major speedup! pause and reset in a pure additionally like to thank Whit Anderson, Matthew Harrison, and • For portability, provide all three options for users OpenGL window! Youngrak Cho of GFDL for the opportunity to work on this project Processing speedup from 2½ minutes per image to 10 ms! this summer