October 30, 2012 Paul Wessel, SOEST, UHM - · PDF fileStatus of GMT 5 October 30, 2012 Paul...
Transcript of October 30, 2012 Paul Wessel, SOEST, UHM - · PDF fileStatus of GMT 5 October 30, 2012 Paul...
Status of GMT 5 October 30, 2012
Paul Wessel, SOEST, UHM W.H.F. Smith, R. Scharroo, J. Luis, F. Wobbe
EarthCube End-User Domain Workshop for EarthScope Funded since 1993
gmt.soest.hawaii.edu
2
GMT Version 5
• What is new in GMT 5?
‣ Big rewrite under the hood
‣ Switched to cmake for cross-platform
installation
• What is in it for the users?
‣ New tools and more options
• What is in it for developers?
‣ API access to GMT functions
3
New features for users
• Better GIS interoperability:
‣ Import/Export OGR/GMT files
✴ogr2ogr supports a new OGR/GMT ASCII file
format developed by Brent Wood (NIWA) and
Paul Wessel, and implemented by Frank
Warmerdam [now at Google]
✴The OGR/GMT format retains all metadata and
may be considered an “ASCII shapefile”
‣ Bridge to GDAL for rasters
✴GMT5 can read any grid format supported by
GDAL, and can also read images
4
New features for users
• Multi-core support in some tools
‣ Relies on OpenMP via GCC
• Improved consistency and flexibility for table i/o
across GMT:
‣ All programs now use same uniform i/o library
with support for multi-segments across GMT
‣ New global options –i and –o allows users to
select which columns to read and write
‣ Enhanced option –b allows free-form native binary
files to be read and written
‣ netCDF files can be used directly [read-only]
5
New features for users
• Several new tools and many new options:
‣ PDF transparency
‣ Automatic annotation selection
‣ Run-time choice of FFT algorithms
‣ Run-time choice of triangulation algorithms
‣ 3-D perspective view available in all programs
‣ New enhanced macro language for custom
symbols with multiple variables
6
News for developers
• GMT 5 has turned all GMT 4 programs
into a high-level API, allowing easy
access to GMT functionality from
custom programs
• The GMT API is released under the
lesser GNU license, broadening its
potential use
• We are developing a Matlab/Octave
interface and will start development of
a Python API thereafter
7
GMT 4
netCDF
pslib
GMT
GMT Program
• GMT 4 library is fairly low-level
• High-level functionality in GMT
programs
• Lots of global variables throughout
• Inconsistent development; no docs
GDAL
8
GMT 5
GMT Application
• GMT 5 API has new functions to
manage GMT sessions, options, and
data i/o
• GMT module library contains a set of
GMT functions called modules
• Modules replicate behavior of a GMT 4
program in a single function
• The familiar GMT programs are now so
simple they are built on-the-fly from a
short template program
GMT 5 API
netCDF
GMT
GDAL
Modules
GMT Program
PSL
9
GMT 5 API
• Creates a self-contained, thread-safe GMT session (or several sessions, eventually running in parallel)
• Registers data sources and destinations (e.g., streams, memory locations) if they are not regular files
• Manages program options via linked option lists or text arrays (e.g., argc, argv[])
• Imports data sources into memory
• Calls one or more GMT modules
• Exports results from memory to files
• Destroys the session and all its resources
10
Custom Applications
• Rapid deployment for new applications that need
GMT procession or plotting
• Heavy lifting is done by API and the modules
• Custom code can create and manipulate the five
GMT data structures (GMT grids, images, data
tables, text tables, and CPT texture tables) that
the API currently recognizes
• C/C++ API will be released first, followed by
Matlab/Octave and Python APIs
Comments/Concerns • GMT is software engineering, no CI expert involvement
• Heavy use of volunteers, who change over time
• Funded by NSF MGG but large user base in GEO
• Focal mechanism plot not in core GMT but unsupported
supplement
• GMT goals driven by selfish needs and user requests
• Emphasis on longevity, portability, standards, quality
graphics
• What is needed to better support EarthScope/Cube:
• Paid/volunteer Python-enabled domain scientist, or
• Paid/volunteer Python-enabled programmer
13
GMT 5 Schedule
• A beta version (5.0.0b) was released on
August 25, 2011
• Current developmental GMT5 is always
available via our subversion repository and is
quite stable
• GMT 5.0.0 will be released in early 2013,
pending more testing and documentation
• Visit www.soest.hawaii.edu/gmt5 to learn
more and participate in our new GMT Logo
contest and win a GMT T-shirt!