The user defined plug-in table (UDPT) is a simple stand-alone text file that contains all the information that GrADS requires in order to use plug-ins for user-defined functions and graphics display and printing. There is one record (line) in the file for each plug-in. A record contains three blank delimited fields: a Type, a Name, and the Filename, which is the full path to the shared object file (a dynamic library) that contains the plug-in's exectuable routines. Starting with version 2.2.1, an optional fourth entry (an Alias for the function name) may be included if necessary. The UDPT may also contain comments, which can begin with * or #.
function
(for user-defined functions)gxdisplay
(for graphics display)gxprint
(for graphics printing) function
, the name should match the subroutine that gets called when the function is invoked, it is the actual name of the function in the user's source code. Because the function name gets parsed by the GrADS expression handler, it must meet the following criteria: it must start with a letter, must be 15 characters or less, and may only contain letters, numbers or underscore. All letters must be lower case. If the user's source code function names cannot meet these criteria, an alias may be used (see #4 below).gxdisplay
or gxprint
, the name is more like a nickname that is used with the -d or -h arguments on startup to tell GrADS which plug-in to use. For these plug-in types, the rules outlined above still hold, except the name may be mixed case. GrADS will look for UDPT records in two places:
Entries in the file named by GAUDPT take precedence over entries the default udpt with the same Type and Name.
# Type Name Full path to shared object file
# ---- ---- -------------------------------
gxdisplay Cairo /usr/local/lib/grads/libgxdCairo.so
gxdisplay X11 /usr/local/lib/grads/libgxdX11.so
gxdisplay gxdummy /usr/local/lib/grads/libgxdummy.so
*
gxprint Cairo /usr/local/lib/grads/libgxpCairo.so
gxprint GD /usr/local/lib/grads/libgxpGD.so
gxprint gxdummy /usr/local/lib/grads/libgxdummy.so
*
function
dothis /home/username/grads/udp/dothis.so
The 'q udpt' command will show you the complete list of plug-in records that GrADS parsed on startup.
ga-> q udpt
gxdisplay Cairo /usr/local/lib/grads/libgxdCairo.so
gxdisplay X11 /usr/local/lib/grads/libgxdX11.so
gxdisplay gxdummy /usr/local/lib/grads/libgxdummy.so
gxprint Cairo /usr/local/lib/grads/libgxpCairo.so
gxprint GD /usr/local/lib/grads/libgxpGD.so
gxprint gxdummy /usr/local/lib/grads/libgxdummy.so
function dothis /home/username/grads/udp/dothis.so