Commit 59b8fe8d authored by Alastair McKinstry's avatar Alastair McKinstry

release 2.2.0

parent 458ff7f2
The Grid Analysis and Display System (GrADS)
Copyright (C) 1988-2016 by George Mason University
Copyright (C) 1988-2017 by George Mason University
The Center for Ocean-Land-Atmosphere Studies (COLA) is the center
within George Mason University where GrADS is developed and maintained.
......
GrADS - Grid Analysis and Display System
Version 2.1
Version 2.2
http://cola.gmu.edu/grads
......@@ -7,36 +7,47 @@ GrADS is distributed freely and is copyrighted under the GNU Public License.
Please read the COPYRIGHT file for more complete information.
For download information consult http://cola.gmu.edu/grads/downloads.php
The executables contained in this tar file are typically placed in the
directory /usr/local/bin. If you do not have write permission for your
/usr/local/bin directory, you can put them in the ~/bin subdirectory of your home
directory.
The executables contained in the ./bin directory of the distribution tarfile
are typically placed in a public directory such as /usr/local/bin.
If you do not have write permission for /usr/local/bin, you can put them
in a subdirectory under $HOME -- e.g. /home/username/bin/.
cd /usr/local/bin
gunzip tarfile.gz
tar xvf tarfile
The shared object files in the ./lib directory of the distribution tarfile may be
placed anywhere that is convenient. GrADS will looks for a default file called "updt"
in the directory named by the GADDIR environment variable. The udpt file contains the
full path to the shared object files, along with other information that GrADS needs.
Please see documentation http://cola.gmu.edu/grads/gadoc/udpt.html
After unpacking the first tar file, you should have the following executables:
grads GrADS - The basic package
gribmap Creates an index file that "maps" a GRIB data set for a GrADS descriptor file
gribscan Extracts grid info from a GRIB data set
grib2scan Extracts grid info from a GRIB2 data set
bufrscan Reads BUFR messages and prints out ascii values
stnmap Maps station data
wgrib See http://www.cpc.ncep.noaa.gov/products/wesley/wgrib.html
The following executables are in the ./bin directory:
A second tar file (data.tar.Z) contains the GrADS fonts and maps data sets is
bufrscan Reads BUFR messages and prints out ascii values
grads GrADS - The basic package
grib2scan Extracts grid info from a GRIB2 data set
gribmap Creates an index file that "maps" a GRIB data set for a GrADS descriptor file
gribscan Extracts grid info from a GRIB data set
stnmap Maps station data
The following shared object files (and their symlinks) are in the ./lib directory
libgxdCairo Cairo graphics display plug-in
libgxpCairo Cairo graphics printing plugin
libgxdX11 Classic X11 display plug-in
libgxpGD Classic GD printing plug-in
libgxdummy A no-op dummy graphics display and printing plug-in
A second tar file (data2.tar.gz) contains the GrADS fonts and maps data sets is
also necessary and can be downloaded from http://cola.gmu.edu/grads/downloads.php
The contents of data.tar are typically placed in the directory
The contents of this file are typically placed in the directory
/usr/local/lib/grads, the default location for these files. If you do not have
write permission for /usr/local/lib/grads, you can place the files elsewhere, but
you must also change the environment variable GADDIR so the GrADS executables will
know where to find these files.
cd dirname
uncompress data.tar.Z
tar xvf data.tar
tar xvfz data2.tar.gz
setenv GADDIR dirname (If dirname is not /usr/local/lib/grads)
......@@ -2,11 +2,12 @@
AUTOMAKE_OPTIONS = foreign
ACLOCAL_AMFLAGS = -I m4
##############################################################
#
#---------------------------------------------------------------------
# Subdirectories with Makefiles
#
# SUBDIRS lists all directories that make should recurse into
# before processing the current directory
SUBDIRS=src
EXTRA_DIST=COPYRIGHT INSTALL
......@@ -29,7 +30,8 @@ bin-dist: all-am
cp -pR $$file $(distdir)/ ; \
done; \
rm -rf `find $(distdir) -name CVS`; \
$(AMTAR) chof - $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir)-bin-$(host_triplet).tar.gz; \
$(AMTAR) chof - $(distdir) | GZIP=$(GZIP_ENV) \
gzip -c >$(distdir)-bin-$(host_triplet).tar.gz; \
$(am__remove_distdir)
data-dist:
......@@ -38,7 +40,8 @@ data-dist:
cp -pR $$file $(distdir)/ ; \
done; \
rm -rf `find $(distdir) -name CVS`; \
$(AMTAR) chof - $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir)-data.tar.gz; \
$(AMTAR) chof - $(distdir) | GZIP=$(GZIP_ENV) \
gzip -c >$(distdir)-data.tar.gz; \
$(am__remove_distdir)
doc-dist:
......@@ -47,12 +50,14 @@ doc-dist:
cp -pR $$file $(distdir)/ ; \
done; \
rm -rf `find $(distdir) -name CVS`
$(AMTAR) chof - $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir)-doc.tar.gz; \
$(AMTAR) chof - $(distdir) | GZIP=$(GZIP_ENV) \
gzip -c >$(distdir)-doc.tar.gz; \
$(am__remove_distdir)
snapshot: distdir
date_str=`date '+%Y%m%d-%H%M'`; \
$(AMTAR) chof - $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir)-snapshot-$${date_str}.tar.gz; \
$(AMTAR) chof - $(distdir) | GZIP=$(GZIP_ENV) \
gzip -c >$(distdir)-snapshot-$${date_str}.tar.gz; \
$(am__remove_distdir)
bin-snapshot: all-am
......@@ -62,5 +67,6 @@ bin-snapshot: all-am
done; \
rm -rf `find $(distdir) -name CVS`; \
date_str=`date '+%Y%m%d-%H%M'`; \
$(AMTAR) chof - $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir)-bin-snapshot-$${date_str}.tar.gz; \
$(AMTAR) chof - $(distdir) | GZIP=$(GZIP_ENV) \
gzip -c >$(distdir)-bin-snapshot-$${date_str}.tar.gz; \
$(am__remove_distdir)
This diff is collapsed.
......@@ -53,7 +53,7 @@ AC_DEFUN([GA_SET_FLAGS],
ga_saved_cppflags=$CPPFLAGS
ga_saved_ldflags=$LDFLAGS
ga_saved_libs=$LIBS
CPPFLAGS=""
CPPFLAGS="-I${ga_supplib_dir}/include"
m4_if([$1], [], [:], [
for ga_inc_name in $1 ; do
CPPFLAGS="$CPPFLAGS -I${ga_supplib_dir}/include/${ga_inc_name}"
......@@ -74,23 +74,6 @@ AC_DEFUN([GA_UNSET_FLAGS],
LIBS=$ga_saved_libs
])
dnl GA_SET_CAIRO_FLAGS : Sets the compile and link paths to place where cairo is installed
dnl and saves original settings for restoration by GA_UNSET_FLAGS
dnl no args
AC_DEFUN([GA_SET_CAIRO_FLAGS],
[
# Use to make temporary changes to -I and -L paths
# Just for use during tests, because configure and make may run
# from different directories.
ga_saved_cppflags=$CPPFLAGS
ga_saved_ldflags=$LDFLAGS
ga_saved_libs=$LIBS
CPPFLAGS="-I/opt/local/include/cairo"
LDFLAGS="-L/opt/local/lib"
])
dnl GA_SET_LIB_VAR : Puts necessary linker options to link with libraries given into
dnl a shell variable. They will have the form 'supplib_dir/libname.a'.
dnl args: : shell-variable-name, list-of-libraries (e.g. [readline termcap])
......@@ -126,17 +109,3 @@ AC_DEFUN([GA_SET_INCLUDE_VAR],
done
])
dnl GA_SET_CAIRO_INCLUDE : Puts necessary options to compile with cairo include directory
dnl no args
AC_DEFUN([GA_SET_CAIRO_INCLUDE],
[
$1="-I/opt/local/include/cairo"
])
dnl GA_SET_CAIRO_LIB : Puts necessary options to compile with cairo library
dnl no args
AC_DEFUN([GA_SET_CAIRO_LIB],
[
ga_lib_prefix='$(supp_lib_dir)'
$1="-L${ga_lib_prefix} -lcairo "
])
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
......@@ -6,7 +6,7 @@
</head>
<frameset rows="110,*">
<frame name="alpha" src="indexalpha.html" target="list">
<frameset cols="165,*" border=0>
<frameset cols="175,*" border=0>
<frame name="list" src="indexlist.html" target="pages">
<frame name="pages" src="pages.html">
</frameset>
......
This diff is collapsed.
<!--Copyright (C) 1988-2005 by the Institute of Global Environment and Society (IGES). See file COPYRIGHT for more information.--> <html><head><title>GrADS Command: outxwd</title><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><style type="text/css"><!--body { background-color: #e0f0ff;}--></style></head><body text="#000000"> <h2><b>outxwd</b></h2> <p><p> This command dumps the contents of the graphics window to a file. The output file is in XWD (X Windows Dump) format. The syntax is: <ul><code>outwxd <i>filename</i></code></ul> <p> where <code><i>filename</i></code> is the name of the XWD file. <p><h3>Usage Notes</h3> <p> The <code><a href="gradcomdprintim.html">printim</a></code> command may also be used for creating image output in other formats. <p><h3>Examples </h3><p>&nbsp;</p></body></html>
\ No newline at end of file
<!--Copyright (C) 1988-2005 by the Institute of Global Environment and Society (IGES). See file COPYRIGHT for more information.-->
<html>
<head>
<title>GrADS Command: outxwd</title>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><style type="text/css">
<!--
body {
background-color: #e0f0ff;
}
-->
</style></head>
<body text="#000000">
<h2><b>outxwd</b></h2>
<p>
<p>
This command dumps the contents of the graphics window to a file. The output file is in XWD (X Windows Dump) format. The syntax is:
<ul>
<code>outxwd <i>filename</i></code>
</ul>
<p>
where <code><i>filename</i></code> is the name of the XWD file.
<p>
<h3>Usage Notes</h3>
<p>
The <code><a href="gradcomdprintim.html">printim</a></code> command may also be used for creating image output in other formats.
<p>This command does not work in batch mode, or in version 2.1+ when Cairo is enabled.
<p>
<p>&nbsp;</p>
</body>
</html>
<!--Copyright (C) 1988-2005 by the Institute of Global Environment and Society (IGES). See file COPYRIGHT for more information.--> <html><head><title>GrADS command: query dbf</title></head><body bgcolor="e0f0ff" text="#000000"> <H2><B>q dbf</B></H2><P><code>q dbf <i>shapefile </i></code><p> Lists the contents of a shapefile attribute database. <code><i>shapefile</i> </code>is the name of the shapefile. It is not necessary to include the file extension (.dbf) on the end of <code><i>shapefile</i></code>, just the filename root is adequate.<br> <codoe> <br><h3>Usage Notes</h3><p>This command is available with GrADS version 2.0.a8 or later.</p><p>If you put the three shapefile components (*.shp, *.shx, and *.dbf) in the GrADS data directory (pointed to by the <a href="gradcomdgrads.html#env">GADDIR environment variable</a>), then it is not necessary to include the full path in <code><i>shapefile</i></code>. </p><p>The first line of output contains a comma-delimited list of the names of all the attributes for each record in the database. Subsequent lines contain the comma-delimited list of all the attribute values for each record. </p><p>A companion command, <code><a href="gradcomdqdbf.html">q shp</a></code>, lists the contents of the shapefile. There is a 1:1 correspondence between elements in the shapefile and records in the database. </p><p>Please see the documentation page on <a href="shapefiles.html">shapefiles</a> for more details. </p><h3>Examples </h3><pre>ga-&gt; q dbf /home/GIS/climatedivs/divisions <br> RECORD#,AREA,PERIMETER,CLIMDIVS_,ST,DIV,NAME,DIVISION_I<br> 0,4.463,11.489,2,MN,2,NORTH CENTRAL,2102<br> 1,0.988,9.344,3,WA,3,PUGET SOUND LOWLANDS,4503<br> 2,3.066,16.450,4,WA,4,E OLYMPIC CASCADE FOOTHILLS,4504<br> 3,3.099,12.733,5,WA,6,EAST SLOPE CASCADES,4506<br> 4,2.030,8.359,6,WA,7,OKANOGAN BIG BEND,4507<br> 5,1.347,5.964,7,ID,1,PANHANDLE,1001 .<br>.<br>.<br>385,0.958,5.437,59,OR,4,NORTHERN CASCADES,3504<br>386,2.712,9.973,49,OR,6,NORTH CENTRAL,3506</pre></body></html>
\ No newline at end of file
<!--Copyright (C) 1988-2005 by the Institute of Global Environment and Society (IGES). See file COPYRIGHT for more information.-->
<html>
<head>
<title>GrADS command: query dbf</title>
<link href="GrADS.css" rel="stylesheet" type="text/css">
<style type="text/css">
.red {
color: #C00;
}
</style>
</head>
<body bgcolor="e0f0ff" text="#000000">
<H2><B>q dbf</B></H2>
<P>This command lists the contents of a shapefile attribute database.
<h3>Syntax</h3>
<P><code>q dbf <i>shapefile &lt;delimiter&gt;</i></code>
<ul>
<code><i>shapefile </i></code> is the name of the shapefile.<br>
<code><i>delimiter </i></code> is an optional argument that provides an alternative string (max 3 characters) to serve as a delimiter between fields (default is a comma). <br>
</ul>
<br>
<h3>Usage Notes</h3>
<p>This command is available with <span class="red">version 2.0.a8.</span> The <code><i> &lt;delimiter&gt;</i></code> option was added with version<span class="red"> 2.2.0</span>.</p>
<p> It is not necessary to include the file extension (.dbf) on the end of <code><i>shapefile</i></code>, just the filename root is adequate.</p>
<p>If you put the three shapefile components (*.shp, *.shx, and *.dbf) in the GrADS data directory (pointed to by the <a href="gradcomdgrads.html#env">GADDIR environment variable</a>), then it is not necessary to include the full path in <code><i>shapefile</i></code>. </p>
<p>The first line of output contains a comma-delimited list of the names of all the attributes for each record in the database. Subsequent lines contain the comma-delimited list of all the attribute values for each record. </p>
<p>A companion command, <code><a href="gradcomdqdbf.html">q shp</a></code>, lists the contents of the shapefile. There is a 1:1 correspondence between elements in the shapefile and records in the database. </p>
<p>Please see the documentation page on <a href="shapefiles.html">shapefiles</a> for more details. </p>
<h3>Examples </h3>
<pre>
ga-&gt; q dbf /home/GIS/climatedivs/divisions
RECORD#,AREA,PERIMETER,CLIMDIVS_,ST,DIV,NAME,DIVISION_I
0,4.463,11.489,2,MN,2,NORTH CENTRAL,2102
1,0.988,9.344,3,WA,3,PUGET SOUND LOWLANDS,4503
2,3.066,16.450,4,WA,4,E OLYMPIC CASCADE FOOTHILLS,4504
3,3.099,12.733,5,WA,6,EAST SLOPE CASCADES,4506<
.
.
.
385,0.958,5.437,59,OR,4,NORTHERN CASCADES,3504
386,2.712,9.973,49,OR,6,NORTH CENTRAL,3506
ga-&gt; q dbf /home/GIS/climatedivs/divisions {}
RECORD#{}AREA{}PERIMETER{}CLIMDIVS_{}ST{}DIV{}NAME{}DIVISION_I
0{}4.463{}11.489{}2{}MN{}2{}NORTH CENTRAL{}2102
1{}0.988{}9.344{}3{}WA{}3{}PUGET SOUND LOWLANDS{}4503
2{}3.066{}16.450{}4{}WA{}4{}E OLYMPIC CASCADE FOOTHILLS{}4504
3{}3.099{}12.733{}5{}WA{}6{}EAST SLOPE CASCADES{}4506
.
.
.
385{}0.958{}5.437{}59{}OR{}4{}NORTHERN CASCADES{}3504
386{}2.712{}9.973{}49{}OR{}6{}NORTH CENTRAL{}3506
</pre>
</body>
</html>
......@@ -95,17 +95,25 @@
</tr>
<tr>
<td class="code" width="119">file <span class="codeitalic">n</span></td>
<td class="plaintext" width="490">Returns info on file number <code><i>n</i></code></td>
<td class="plaintext" width="490">Returns info on file number <code><i>n</i></code>. Uses the default file if <code><i>n</i></code> is not given.</td>
</tr>
<tr>
<td class="code" width="119">files</td>
<td class="plaintext" width="490">Lists open files</td>
</tr>
<tr>
<td class="code">font <span class="codeitalic">n</span></td>
<td class="plaintext">Returns info on font number <code><i>n</i></code>. Uses the default font if <code><i>n</i></code> is not given. (<span class="style1">2.2.0</span>)</td>
</tr>
<tr>
<td class="code" width="119"><a href="gradcomdqfwrite.html">fwrite</a></td>
<td class="plaintext" width="490">Returns status and characteristics of
fwrite ouput file</td>
</tr>
<tr>
<td class="code">gxconfig</td>
<td class="plaintext">Returns configuration information about the graphics plug-ins (<span class="style1">2.2.0</span>)</td>
</tr>
<tr>
<td class="code" width="119">gxinfo</td>
<td class="plaintext" width="490">Returns graphics environment info</td>
......
<!--Copyright (C) 1988-2005 by the Institute of Global Environment and Society (IGES). See file COPYRIGHT for more information.--> <html><head><title>GrADS Command: set wxopt</title></head><body bgcolor="e0f0ff" text="#000000"> <h2><b>screen</b></h2><p><code>screen save|show|free <em>num</em></code><p> This command allows the user to save the contents of the display window into a buffer in memory, and also to restore a saved buffer to the current display at any time. This command will work in double buffer mode and was written to facilitate animations when working interactively with GrADS. The options are as follows:<p><ul><code>save</code><ul> Saves the contents of the display screen into memory as buffer # <code><em>num</em></code>.</ul><p><code>show</code><ul> Draws the contents of buffer # <code><em>num</em></code> to the screen.</ul> <p><code>free</code><ul> Releases the contents of buffer # <code><em>num</em></code> from memory. </ul> </ul> <p><h3>Usage Notes</h3><p>This command does not work in batch mode. <h3>Examples </h3> </body></html>
\ No newline at end of file
<!--Copyright (C) 1988-2005 by the Institute of Global Environment and Society (IGES). See file COPYRIGHT for more information.-->
<html>
<head>
<title>GrADS Command: set wxopt</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<style type="text/css">
body {
background-color: #e0f0ff;
}
</style>
</head>
<body text="#000000">
<h2><b>screen</b></h2>
<p>
<code>screen save|show|free <em>num</em></code>
<p>
This command allows the user to save the contents of the display window into a buffer in memory, and also to restore a saved buffer to the current display at any time. This command will work in double buffer mode and was written to facilitate animations when working interactively with GrADS. The options are as follows:
<p>
<ul>
<code>save</code>
<ul>
Saves the contents of the display screen into memory as buffer #
<code><em>num</em></code>.
</ul>
<p>
<code>show</code>
<ul>
Draws the contents of buffer #
<code><em>num</em></code> to the screen.
</ul>
<p>
<code>free</code>
<ul>
Releases the contents of buffer #
<code><em>num</em></code> from memory.
</ul>
</ul>
<p>
<h3>Usage Notes</h3>
<p>This command does not work in batch mode, or in version 2.1+ when Cairo is enabled.
</body>
</html>
......@@ -52,6 +52,7 @@
<p class="plaintext">
<code>set <a href="gradcomdsetbackground.html" target="pages">background</a></code><br>
<code>set <a href="gradcomdsetbarbase.html" target="pages">barbase</a></code><br>
<code>set <a href="gradcomdsetbarbopts.html" target="pages">barbopts</a></code><br>
<code>set <a href="gradcomdsetbargap.html" target="pages">bargap</a></code><br>
<code>set <a href="gradcomdsetbaropts.html" target="pages">baropts</a></code><br>
<code><a href="basemap.html" target="pages">basemap.gs</a></code><br>
......@@ -137,7 +138,7 @@ data descriptor files:<br>
<code>q <a href="gradcomdqdbf.html" target="pages">dbf</a></code><br>
<code>set <a href="gradcomdsetdbuff.html" target="pages">dbuff</a></code><br>
<code><a href="gradcomddefine.html" target="pages">define</a></code><br>
<code><a href="gradcomdquery.html" target="pages">q</a> define</code><br>
<code>q<a href="gradcomdqdefine.html" target="pages"> define</a></code><br>
<code><a href="gradcomdquery.html" target="pages">q</a> defval</code><br>
<code>set <a href="gradcomdsetdefval.html" target="pages">defval</a></code><br>
<a href="fontcontrol.html#overrides" target="pages">degree symbol</a><br>
......@@ -235,7 +236,8 @@ data descriptor files:<br>
<code><a href="gradcomdgrads.html" target="pages">gradsdods</a></code><br>
<code><a href="gradcomdgrads.html" target="pages">gradshdf</a></code><br>
<code><a href="gradcomdgrads.html" target="pages">gradsnc</a></code><br>
<a href="grib.html" target="pages">GRIB format</a><br>
<a href="plugins.html" target="pages">graphics plug-ins</a><br>
<a href="grib.html" target="pages">GRIB format</a><br>
<code><a href="gradutilgribmap.html" target="pages">gribmap</a></code><br>
<code><a href="gradutilgribscan.html" target="pages">gribscan</a></code><br>
<code><a href="gradutilgrib2scan.html" target="pages">grib2scan</a></code><br>
......@@ -263,7 +265,7 @@ data descriptor files:<br>
<p class="plaintext">
<a href="imageoutput.html" target="pages">hardcopy output</a><br>
<code><a href="gradfunchcurl.html" target="pages">hcurl()</a></code><br>
<code><a href="SDFdescriptorfile.html" target="pages">HDF-SDS format</a></code><br>
<code><a href="SDFdescriptorfile.html" target="pages">HDF-SDS format</a></code><br>
<code><a href="gradfunchdivg.html" target="pages">hdivg()</a></code><br>
<code><a href="gradcomdhelp.html" target="pages">help</a></code><br>
<code>set <a href="gradcomdsethempref.html" target="pages">hempref</a></code><br>
......@@ -277,6 +279,7 @@ data descriptor files:<br>
</table>
</a>
<p class="plaintext">
<code><a href="gradfuncif.html" target="pages">if()</a></code><br>
<a href="imageoutput.html" target="pages">image output</a><br>
<code>set <a href="gradcomdsetimprun.html" target="pages">imprun</a></code><br>
......@@ -403,6 +406,7 @@ script <a href="library.html" target="pages">library</a><br>
<code><a href="pdef.html" target="pages">PDEF</a></code><br>
<code><a href="gradcomdpdefwrite.html" target="pages">pdefwrite</a></code><br>
<a href="pagecontrol.html#plotarea" target="pages">plot area</a><br>
<a href="plugins.html" target="pages">plug-ins</a><br>
<code>set <a href="gradcomdsetpoli.html" target="pages">poli</a></code><br>
<code>draw <a href="gradcomddrawpolyf.html" target="pages">polyf</a></code><br>
<code>q <a href="gradcomdqpos.html" target="pages">pos</a></code><br>
......@@ -426,6 +430,7 @@ script <a href="library.html" target="pages">library</a><br>
<code><a href="gradcomdquery.html" target="pages">q (query)</a></code><br>
<code><a href="gradcomdqattr.html" target="pages">q attr</a></code><br>
<code><a href="gradcomdqdbf.html" target="pages">q dbf</a></code><br>
<code><a href="gradcomdqdefine.html" target="pages">q define</a></code><br>
<code><a href="gradcomdqdialog.html" target="pages">q dialog</a></code><br>
<code><a href="gradcomdqens.html" target="pages">q ens</a></code><br>
<code><a href="gradcomdqfwrite.html" target="pages">q fwrite</a></code><br>
......@@ -637,7 +642,8 @@ using <a href="usingstationdata.html" target="pages">station data</a><br>
<code>set <a href="gradcomdsetstrsiz.html" target="pages">strsiz</a></code><br>
<code><a href="gradfuncsum.html" target="pages">sum()</a></code><br>
<code><a href="gradfuncsumg.html" target="pages">sumg()</a></code><br>
<a href="supplibs.html" target="pages">supplibs</a><br>
<a href="supplibs.html" target="pages">supplibs (2.1)</a><br>
<a href="supplibs2.html" target="pages">supplibs (2.2)</a><br>
<code><a href="gradcomdswap.html" target="pages">swap</a></code><br>
</font>
<p>
......@@ -681,8 +687,10 @@ using <a href="usingstationdata.html" target="pages">station data</a><br>
<code><a href="gradcomdquery.html" target="pages">q</a> undef</code><br>
<code>set <a href="gradcomdsetundef.html" target="pages">undef</a></code><br>
<code><a href="gradcomdundefine.html" target="pages">undefine</a></code><br>
<a href="udf.html" target="pages">user defined functions</a><br>
<a href="users.html" target="pages">user's guide</a><br>
<a href="udf.html" target="pages">User-Defined Functions</a><br>
<a href="udp.html" target="pages">User-Defined Plug-ins</a><br>
<a href="udpt.html" target="pages">UDPT</a><br>
<a href="users.html" target="pages">User's Guide</a><br>
external <a href="utilities.html" target="pages">utilites</a><br>
</font>
......
......@@ -216,6 +216,10 @@
<td valign=top class="plaintext"><a href="ftp://cola.gmu.edu/grads/scripts/rgb255.gs">rgb255.gs</a></td>
<td class="plaintext"><span class="style1">(Version 2.0.a6) </span>Defines a set of rainbow colors and draws a demo plot; uses <a href="ftp://cola.gmu.edu/grads/scripts/cbarm.gs">cbarm.gs</a> to draw a color bar</td>
</tr>
<tr>
<td valign=top class="plaintext"><a href="ftp://cola.gmu.edu/grads/scripts/sdfopen365.gs">sdfopen365.gs</a></td>
<td class="plaintext">This script opens creates an xdfopen-style descriptor for files with a 365-day calendar</td>
</tr>
<tr>
<td valign=top class="plaintext"><a href="ftp://cola.gmu.edu/grads/scripts/sdfopent.gs">sdfopent.gs</a></td>
<td class="plaintext">This script simulates the old 3-arg sdfopen for templating</td>
......
......@@ -24,7 +24,7 @@
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <a href="#functions">Functions</a><br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <a href="#intrinsic">Intrinsic Functions</a><br>
<a href="#commands">Commands that complement the scripting language</a><br>
<a href="#widgets">Widgets</a> (N.B. The widgets have been temporarily disabled as of <span class="red">version 2.1.a1</span>) <br>
<a href="#widgets">Widgets</a> (N.B. The Cairo graphics display inteface in <span class="red">version 2.1+</span> does not support widgets) <br>
<a href="library.html">Script Library</a><br>
<a href="reference_card_scl.pdf">Scripting Language Reference Card</a>
<font size=-1>
......@@ -476,8 +476,8 @@ GrADS command from the script:
<ul><code>rc <br> result </code></ul>
<p>
<code>lat, lon, lev,</code> and <code>time </code>are also used
as predefined variables in GrADS. Although using them within a script
<code>lat, lon, and lev </code>are also used
as predefined internal variables in GrADS. Although using them within a script
is okay, in order to avoid confusion it is not recommended.
<p>
......@@ -1040,7 +1040,7 @@ interface is used to draw widgets (buttons and pull down menus) that
allow a "point and click" interface between the Grads user and the
scripting language.
(N.B. The widgets have been temporarily disabled for <span class="red">version 2.1.a1</span>)
(N.B. The Cairo graphics display inteface in <span class="red">version 2.1+</span> does not support widgets.)
<p>
<h3>Buttons</h3>
<p>
......
......@@ -16,29 +16,29 @@ body {
</head>
<body text="#000000">
<h2>User Defined Plug-ins (UDPs)</h2>
<h2>User Defined Plug-in Functions (UDPs)</h2>
<p>
<a href="#overview">Overview </a><br>
<a href="#how">How to set up and use User Defined Plug-ins</a><br>
<a href="#compile">How to compile User Defined Plug-ins</a><br>
<a href="#how">How to set up and use User Defined Plug-in Functions</a><br>
<a href="#compile">How to compile User Defined Plug-in Functions</a><br>
<a href="#table">The User Defined Plug-in Table</a><br>
<a href="#gaudpt">The environment variable GAUDPT</a><br>
<a href="#example1">Example: Add a number to a variable</a><br><br>
<hr>
<a name="overview"><h3>Overview</h3></a>
<p>User Defined Plug-ins were introduced in <span class="red">version 2.1.1.b0</span> and are intended to replace the old <a href="udf.html">User Defined Functions</a>, which were disabled when version 2.0 was introduced. The function arguments and data grids are no longer passed between GrADS and the user's program through data files written out to disk. With plug-ins, the user's code is dynamically loaded into GrADS when invoked by the user, and the data is operated on while still sitting in memory. The use of plug-ins will be an improvement in performance and flexibility for users who want to create customized functions. Please read the documentation carefully.</p>
<p>User Defined <a href="plugins.html">Plug-in</a> functions were introduced in <span class="red">version 2.1.1.b0</span> and are intended to replace the old <a href="udf.html">User Defined Functions</a>, which were disabled when version 2.0 was introduced. The use of plug-in functions will be an improvement in performance and flexibility for users who want to create customized functions. The function arguments and data grids are no longer passed between GrADS and the user's program through data files written out to disk. With plug-in functions, the user's code is dynamically loaded into GrADS when the function is invoked by the user, and the data is operated on while still sitting in memory. Please read the following documentation carefully.</p>
<a name="how">
<h3>How to set up and use User Defined Plug-ins:</h3></a>
<h3>How to set up and use User Defined Plug-in functions:</h3></a>
<ol>
<li>Compile your plug-in functions as shared object files. (Scroll down for <a href="#compile">additional documention</a>.)
<li>Update a stand-alone text file called the User Defined Plug-in Table (UDPT) that provides all the necessary information GrADS needs to know about
the plug-ins.
<li>Update a stand-alone text file called the User Defined Plug-in Table (<a href="udpt.html">UDPT</a>) that provides all the necessary information GrADS needs to know about
plug-ins.
(Scroll down for <a href="#table">additional documention.</a>)
<li>Set the environment variable GAUDPT to provide the full name (including the path) of the UDPT file.
<li>When GrADS is first started up, it will parse the UDPT file so it knows all the plug-in function names and where to find them. The plug-ins will be loaded dynamically by GrADS only when the function is called by the user. <br>
<li>Set the environment variable GAUDPT to provide the full name (including the path) of the <a href="udpt.html">UDPT</a> file.
<li>When GrADS is first started up, it will parse the UDPT records so it knows all the plug-in function names and where to find them. The plug-ins will be loaded dynamically by GrADS only when the function is called by the user. <br>
<li>When a plug-in function is invoked in an <a href="expressions.html">expression</a>, GrADS passes all the function arguments as-is to the plug-in. The arguments to a plug-in generally contain one or more GrADS expressions plus any additional numbers or strings that might be needed. The plug-in should contain the necessary code to parse and check the arguments, evaluate the expressions(s), perform the calculations, print out any desired diagnostic information, and return the result back to GrADS.
<li>Note: User defined plug-ins do <em>NOT</em> have precedence over GrADS intrinsic
functions, thus a UDP cannot be set up to replace
......@@ -46,7 +46,8 @@ a GrADS function. This behavior is different from the old user defined functions
</ol>
<a name="compile"><h3>How to compile User Defined Plug-ins:</h3></a>
<a name="compile">
<h3>How to compile User Defined Plug-in functions:</h3></a>
<p> User Defined Plug-ins are compiled as dynamic libraries or shared object files and are loaded by GrADS using the dlopen(), dlsym(), and dlclose() functions. Compiling these dynamic object files is a two-step process that requires a slightly different syntax than what is normally used to compile a stand-alone executable. Consider an example plug-in program called addthis.c:
<p>Compile the
plug-in source code (<code><a href="addthis.c">addthis.c</a></code>) and create the object file.
......@@ -72,27 +73,16 @@ a GrADS function. This behavior is different from the old user defined functions
<a name="table">
<h3>The User Defined Plug-in Table</h3></a>
<p>
The user defined function table (UDFT) is a simple text file that
contains information about each user defined plug-in function. There is one record (line) in the file for each plug-in, and the file may contain
multiple records for any number of plug-ins.
Each plug-in record contains three blank delimited fields:
<ul>
<p>Field 1: The type of the plug-in, which is either <code>function</code> or <code>defop</code>. (N.B.: The <code>defop</code> type will be for operations on previously defined variables, and hasn't yet been implemented.) For now, the only working option for this field is <code>function</code>.
<p>Field 2: The name of the function, which must meet the following criteria: it must start with a letter, be less than 16 characters long, and consist of letters or numbers or underscore. All letters must be lower case.</p>
<p>
Field 3: The file name (including the full path) of the shared object file (a dynamic library) that contains the function's
executable routine. GrADS will use the 'dlopen' command to load the library file, and the 'dlsym' command to point to the named function.
The man pages for dlopen and dlsym have more information about how these routines work.
</p>
</ul>
<p>An example of a record for our example plug-in <code>addthis.c</code> might look like this:
The <a href="udpt.html">user-defined plug-in table (UDPT)</a> is a simple text file that
contains information about a user defined plug-in function. A record in the UDPT is required before the plug-in funciton can be used in GrADS. Check the <a href="udpt.html">documentation</a> for more information about the proper syntax of UDPT records. An example record for our example plug-in <code>addthis.c</code> might look like this:
<pre> function addthis /home/username/grads/udp/addthis.so</pre>
<a name="gaudpt">
<h3>The environment variable GAUDPT</h3></a>
<p>GrADS will look for user defined plug-in function definitions in two places: the file name pointed to by the
environment variable GAUDPT, and a file named &quot;udpt&quot; in the directory named by the GADDIR environment variable. An example of setting the GAUDPT environment
<p>GrADS will look for user defined plug-in function entries in two places: the file name pointed to by the
<a href="gradcomdgrads.html#env">environment variable</a> GAUDPT, and a file named &quot;udpt&quot; in the directory named by the GADDIR environment variable. An example of setting the GAUDPT environment
variable is:
<pre> setenv GAUDPT $HOME/grads/udpt</pre>
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Emacs modes for GrADS:
To enable, add the following lines to the .emacs file in your home directory:
(require 'gs-mode "<your_grads_home>/lib/emacs/gs-mode.el")
(require 'ctl-mode "<your_grads_home>/lib/emacs/ctl-mode.el")
;;; ctl-mode-el -- Major mode for editing GrADS script files
;; Author: Joe Wielgosz <joew@cola.iges.org>
;; Created: 2 Oct 2003
;; Keywords: GrADS script major-mode
;; Copyright (C) Joe Wielgosz <joew@cola.iges.org>
;; This program is free software; you can redistribute it and/or
;; modify it under the terms of the GNU General Public License as
;; published by the Free Software Foundation; either version 2 of
;; the License, or (at your option) any later version.
;; This program is distributed in the hope that it will be
;; useful, but WITHOUT ANY WARRANTY; without even the implied
;; warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
;; PURPOSE. See the GNU General Public License for more details.
;; You should have received a copy of the GNU General Public
;; License along with this program; if not, write to the Free
;; Software Foundation, Inc., 59 Temple Place, Suite 330, Boston,
;; MA 02111-1307 USA
;;; Commentary:
;;
;; Based on wpdl-mode-el, a major mode for editing WPDL files
;; by Scott Andrew Borton <scott@pp.htv.fi>,
;; which is an example used in a tutorial about Emacs
;; mode creation. The tutorial can be found here:
;; http://two-wugs.net/emacs/mode-tutorial.html
;; $$revision$$
;;; Code:
(defvar ctl-mode-hook nil)
(defvar ctl-mode-map nil
"Keymap for ctl-mode.")
(if ctl-mode-map nil
(setq ctl-mode-map (make-keymap)))
(setq auto-mode-alist
(append
'(("\\.ctl\\'" . ctl-mode))
auto-mode-alist))
(defconst ctl-font-lock-keywords-1
(list
; generated with (regexp-opt '("dset" "dtype" "index" "title"
; "undef" "options" "xdef" "ydef" "zdef" "tdef" "vars" "endvars"
; "fileheader" "theader" "xyheader" "unpack") t)
'("\\<\\(d\\(?:set\\|type\\)\\|endvars\\|fileheader\\|index\\|stnmap\\|options\\|t\\(?:def\\|header\\|itle\\)\\|un\\(?:def\\|pack\\)\\|vars\\|x\\(?:def\\|yheader\\)\\|[yz]def\\|D\\(?:SET\\|TYPE\\)\\|ENDVARS\\|FILEHEADER\\|INDEX\\|STNMAP\\|OPTIONS\\|T\\(?:DEF\\|HEADER\\|ITLE\\)\\|UN\\(?:DEF\\|PACK\\)\\|VARS\\|X\\(?:DEF\\|YHEADER\\)\\|[YZ]DEF\\)\\>" . font-lock-keyword-face)
; builtins: 365_day_calendar big_endian byteswapped cray_32bit_ieee
; gribhdfsds levels linear little_endian netcdf sequential station
; template yrev zrev
'("\\<\\(365_day_calendar\\|b\\(?:ig_endian\\|yteswapped\\)\\|cray_32bit_ieee\\|grib\\|hdfsds\\|l\\(?:evels\\|i\\(?:near\\|ttle_endian\\)\\)\\|netcdf\\|s\\(?:equential\\|tation\\)\\|template\\|[yz]rev\\|365_DAY_CALENDAR\\|B\\(?:IG_ENDIAN\\|YTESWAPPED\\)\\|CRAY_32BIT_IEEE\\|GRIB\\|HDFSDS\\|L\\(?:EVELS\\|I\\(?:NEAR\\|TTLE_ENDIAN\\)\\)\\|NETCDF\\|S\\(?:EQUENTIAL\\|TATION\\)\\|TEMPLATE\\|[YZ]REV\\)\\>" . font-lock-builtin-face)
; unused faces:
; '("\\('\\d*'\\)" . font-lock-variable-name-face)
'("\\<\\([-+eE.0-9]+\\)\\>" . font-lock-constant-face)
"Highlighting expressions for ctl-mode."))
(defvar ctl-font-lock-keywords ctl-font-lock-keywords-1
"Default highlighting expressions for ctl-mode.")
(defvar ctl-mode-syntax-table nil
"Syntax table for ctl-mode.")
(defun ctl-create-syntax-table ()
(if ctl-mode-syntax-table
()
(setq ctl-mode-syntax-table (make-syntax-table))
; This is added so entity names with underscores and periods can be more easily parsed
(modify-syntax-entry ?_ "w" ctl-mode-syntax-table)
(modify-syntax-entry ?- "w" ctl-mode-syntax-table)
; Comment syntax
(modify-syntax-entry ?* "<" ctl-mode-syntax-table)
(modify-syntax-entry ?\n ">" ctl-mode-syntax-table))
(set-syntax-table ctl-mode-syntax-table))
(defun ctl-mode ()
"Major mode for editing GrADS descriptor files."
(interactive)
(kill-all-local-variables)
(ctl-create-syntax-table)
;; Set up font-lock
(make-local-variable 'font-lock-defaults)
(setq font-lock-defaults
'(ctl-font-lock-keywords))
;; Register our indentation function
; (make-local-variable 'indent-line-function)
; (setq indent-line-function 'ctl-indent-line)
(setq major-mode 'ctl-mode)
(setq mode-name "GrADS descriptor file")
(run-hooks 'ctl-mode-hook))
(provide 'ctl-mode)
;;; ctl-mode.el ends here
;;; gs-mode-el -- Major mode for editing GrADS script files