Download presentation
Presentation is loading. Please wait.
Published byDwight Webster Modified over 8 years ago
1
SCD User Briefing NCL and PyNGL Visualization for the Geosciences Don Middleton with presentation material developed by Luca Cinquini, Mary Haley, Fred Clare - and many project collaborators NCAR Scientific Computing Division Section Head, Visualization & Enabling Technologies January 11, 2005 Don Middleton with presentation material developed by Luca Cinquini, Mary Haley, Fred Clare - and many project collaborators NCAR Scientific Computing Division Section Head, Visualization & Enabling Technologies January 11, 2005 85th AMS Annual Meeting January 9-14, 2005
2
NCL and PyNGL Visualization for the Geosciences
3
Topics NCAR Command Language (NCL) GSUN (NCL visualization interface) PyNGL Example codes and visualizations Future plans NCAR Command Language (NCL) GSUN (NCL visualization interface) PyNGL Example codes and visualizations Future plans
4
What is NCL? NCAR Command Language Scripting language, powerful in 3 areas: -File input/output -Data processing -Publication-quality visualizations Runs on Linux, MacOSX, Solaris, IRIX, AIX, OSF1, Cygwin
5
NCL File I/O Based on the netCDF model: Read/write netCDF, HDF4, ASCII, binary Reads GRIB, including ECMWF complex coefficients One interface for several data formats Based on the netCDF model: Read/write netCDF, HDF4, ASCII, binary Reads GRIB, including ECMWF complex coefficients One interface for several data formats
6
NCL Data Processing Over 600 functions and procedures: Spherical harmonic based calculations Scalar and vector regridding Vertical interpolation, including hybrid coordinates to pressure level Spectral/cross spectral and wavelet analysis Can access Fortran and C routines directly from NCL Over 600 functions and procedures: Spherical harmonic based calculations Scalar and vector regridding Vertical interpolation, including hybrid coordinates to pressure level Spectral/cross spectral and wavelet analysis Can access Fortran and C routines directly from NCL
7
NCL Visualization Publication-quality visualizations: Contour, line, vector, streamline, map Customization: hundreds of options Output to X11, PostScript, PDF Lots of examples Publication-quality visualizations: Contour, line, vector, streamline, map Customization: hundreds of options Output to X11, PostScript, PDF Lots of examples
8
GSUN: interface to NCL visualization “Getting Started Using NCL” Successful collaboration w/CCSM users User-friendly, customized visualization functions Extensive documentation and examples Interface of choice for NCL visualization GSUN used as a model for PyNGL “Getting Started Using NCL” Successful collaboration w/CCSM users User-friendly, customized visualization functions Extensive documentation and examples Interface of choice for NCL visualization GSUN used as a model for PyNGL
9
What is PyNGL? Python NCL Graphics Library Python version of popular GSUN interface Same publication-quality graphics as NCL Utilizes existing Python modules Multiple output formats Extensive documentation Python NCL Graphics Library Python version of popular GSUN interface Same publication-quality graphics as NCL Utilizes existing Python modules Multiple output formats Extensive documentation
10
import Ngl from Scientific.IO.NetCDF import * # Open the NetCDF file. nfile = NetCDFFile("meccatemp.cdf","r") # Get lat/lon/temperature variables. lat = nfile.variables["lat"][:] lon = nfile.variables["lon"][:] T = nfile.variables["t"][0,:,:] # Open a PS workstation. wks = Ngl.open_wks("ps","mecca") # Set contour & scalar field resources. res = Resources() res.sfXArray = lon res.sfYArray = lat # Tickmarks displayed by default. # Size maximized by default. # Draw contours over a map contour = Ngl.contour_map(wks,T,res) Ngl.end() PyNGL load "gsn_code.ncl" begin ; Open the NetCDF file. nfile = addfile("meccatemp.cdf","r") ; Get lat/lon/temperature variables. lat = nfile->lat lon = nfile->lon T = nfile->t(0,:,:) ; Open a PS workstation. wks = gsn_open_wks("ps","mecca") ; Set contour & scalar field resources. res = True res@sfXArray = lon res@sfYArray = lat res@pmTickMarkDisplayMode = “Always” res@gsnMaximize = True ; Draw contours over a map. contour = gsn_contour_map(wks,T,res) end GSUN
11
Data from the MECCA Project
12
From a presentation of Jeff Kiehl (NCAR) and Tim Schneider (NOAA)
13
Wind velocity vectors Data from the MECCA Project
15
Courtesy Sylvia Murphy, NCAR CGD
16
From John Ertl, FNMOC
17
Based on a visualization of Joel Norris (Scripps) using synthetic data
18
Climate division data courtesy Mark Stevens, NCAR CGD
19
Courtesy Mark Stevens, NCAR CGD
20
Contouring on arbitrary triangular meshes Image from Jonathan Shewchuk, author of Triangle
21
Grid from Tom Gross, NOAA/NOS/CSDL/MMAP
22
Data and grid from Tom Gross, NOAA/NOS/CSDL/MMAP
23
Future PyNGL plans Pythonize NCL’s powerful I/O module and climate and interpolation functions Add more functionality and examples Pythonize NCL’s powerful I/O module and climate and interpolation functions Add more functionality and examples
24
PyNGL/NCL Documentation: http://www.pyngl.ucar.edu/ http://ngwww.ucar.edu/ncl/ PyNGL/NCL talk email lists: http://www.pyngl.ucar.edu/pyngl-talk/ http://ngwww.ucar.edu/ncl/ncl-talk/ Download PyNGL/NCL: http://www.pyngl.ucar.edu/download.html http://ngwww.ucar.edu/ncl/download.html
25
END
Similar presentations
© 2024 SlidePlayer.com Inc.
All rights reserved.