Commit 458ff7f2 authored by Alastair McKinstry's avatar Alastair McKinstry

new upstream 2.1.1.b0

parent 687514ee
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
# Generated by GNU Autoconf 2.59 for GrADS 2.1.0.
# Generated by GNU Autoconf 2.59 for GrADS 2.1.1.b0.
#
# Report bugs to <jadams21@gmu.edu>.
#
......@@ -269,8 +269,8 @@ SHELL=${CONFIG_SHELL-/bin/sh}
# Identity of this package.
PACKAGE_NAME='GrADS'
PACKAGE_TARNAME='grads'
PACKAGE_VERSION='2.1.0'
PACKAGE_STRING='GrADS 2.1.0'
PACKAGE_VERSION='2.1.1.b0'
PACKAGE_STRING='GrADS 2.1.1.b0'
PACKAGE_BUGREPORT='jadams21@gmu.edu'
ac_default_prefix=`pwd`
......@@ -812,7 +812,7 @@ if test "$ac_init_help" = "long"; then
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
\`configure' configures GrADS 2.1.0 to adapt to many kinds of systems.
\`configure' configures GrADS 2.1.1.b0 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
......@@ -882,7 +882,7 @@ fi
if test -n "$ac_init_help"; then
case $ac_init_help in
short | recursive ) echo "Configuration of GrADS 2.1.0:";;
short | recursive ) echo "Configuration of GrADS 2.1.1.b0:";;
esac
cat <<\_ACEOF
......@@ -1045,7 +1045,7 @@ fi
test -n "$ac_init_help" && exit 0
if $ac_init_version; then
cat <<\_ACEOF
GrADS configure 2.1.0
GrADS configure 2.1.1.b0
generated by GNU Autoconf 2.59
Copyright (C) 2003 Free Software Foundation, Inc.
......@@ -1059,7 +1059,7 @@ cat >&5 <<_ACEOF
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
It was created by GrADS $as_me 2.1.0, which was
It was created by GrADS $as_me 2.1.1.b0, which was
generated by GNU Autoconf 2.59. Invocation command line was
$ $0 $@
......@@ -1711,7 +1711,7 @@ fi
# Define the identity of the package.
PACKAGE='grads'
VERSION='2.1.0'
VERSION='2.1.1.b0'
# Some tools Automake needs.
......@@ -15827,66 +15827,7 @@ fi
LDFLAGS="-L${ga_supplib_dir}/lib "
LIBS="$LIBS "
echo "$as_me:$LINENO: checking for main in -lsz" >&5
echo $ECHO_N "checking for main in -lsz... $ECHO_C" >&6
if test "${ac_cv_lib_sz_main+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
ac_check_lib_save_LIBS=$LIBS
LIBS="-lsz $LIBS"
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
int
main ()
{
main ();
;
return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
(eval $ac_link) 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -z "$ac_c_werror_flag"
|| test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; } &&
{ ac_try='test -s conftest$ac_exeext'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
ac_cv_lib_sz_main=yes
else
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
ac_cv_lib_sz_main=no
fi
rm -f conftest.err conftest.$ac_objext \
conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
echo "$as_me:$LINENO: result: $ac_cv_lib_sz_main" >&5
echo "${ECHO_T}$ac_cv_lib_sz_main" >&6
if test $ac_cv_lib_sz_main = yes; then
if test "${ac_cv_header_mfhdf_h+set}" = set; then
if test "${ac_cv_header_mfhdf_h+set}" = set; then
echo "$as_me:$LINENO: checking for mfhdf.h" >&5
echo $ECHO_N "checking for mfhdf.h... $ECHO_C" >&6
if test "${ac_cv_header_mfhdf_h+set}" = set; then
......@@ -16153,7 +16094,7 @@ if test $ac_cv_lib_mfhdf_main = yes; then
ga_lib_prefix='$(supp_lib_dir)/lib'
ga_lib_suffix='.a'
for ga_lib_name in mfhdf df udunits sz jpeg z ; do
for ga_lib_name in mfhdf df udunits jpeg z ; do
hdf_libs="$hdf_libs ${ga_lib_prefix}${ga_lib_name}${ga_lib_suffix}"
done
......@@ -16168,9 +16109,6 @@ fi
fi
# Use to undo temporary changes to -I and -L paths
CPPFLAGS=$ga_saved_cppflags
LDFLAGS=$ga_saved_ldflags
......@@ -18435,66 +18373,7 @@ fi
LDFLAGS="-L${ga_supplib_dir}/lib "
LIBS="$LIBS "
echo "$as_me:$LINENO: checking for main in -lsz" >&5
echo $ECHO_N "checking for main in -lsz... $ECHO_C" >&6
if test "${ac_cv_lib_sz_main+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
ac_check_lib_save_LIBS=$LIBS
LIBS="-lsz $LIBS"
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
int
main ()
{
main ();
;
return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
(eval $ac_link) 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -z "$ac_c_werror_flag"
|| test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; } &&
{ ac_try='test -s conftest$ac_exeext'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
ac_cv_lib_sz_main=yes
else
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
ac_cv_lib_sz_main=no
fi
rm -f conftest.err conftest.$ac_objext \
conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
echo "$as_me:$LINENO: result: $ac_cv_lib_sz_main" >&5
echo "${ECHO_T}$ac_cv_lib_sz_main" >&6
if test $ac_cv_lib_sz_main = yes; then
if test "${ac_cv_header_hdf5_h+set}" = set; then
if test "${ac_cv_header_hdf5_h+set}" = set; then
echo "$as_me:$LINENO: checking for hdf5.h" >&5
echo $ECHO_N "checking for hdf5.h... $ECHO_C" >&6
if test "${ac_cv_header_hdf5_h+set}" = set; then
......@@ -18702,7 +18581,7 @@ if test $ac_cv_lib_hdf5_main = yes; then
ga_lib_prefix='$(supp_lib_dir)/lib'
ga_lib_suffix='.a'
for ga_lib_name in hdf5 sz z ; do
for ga_lib_name in hdf5 z ; do
hdf5_libs="$hdf5_libs ${ga_lib_prefix}${ga_lib_name}${ga_lib_suffix}"
done
......@@ -18714,9 +18593,6 @@ fi
fi
# Use to undo temporary changes to -I and -L paths
CPPFLAGS=$ga_saved_cppflags
LDFLAGS=$ga_saved_ldflags
......@@ -20189,7 +20065,7 @@ if test $ac_cv_lib_curl_main = yes; then
ga_lib_prefix='$(supp_lib_dir)/lib'
ga_lib_suffix='.a'
for ga_lib_name in udunits netcdf hdf5_hl hdf5 z sz curl ; do
for ga_lib_name in udunits netcdf hdf5_hl hdf5 z curl ; do
nc_libs="$nc_libs ${ga_lib_prefix}${ga_lib_name}${ga_lib_suffix}"
done
......@@ -20216,6 +20092,7 @@ fi
NC_CONFIG=${ga_supplib_dir}/bin/nc-config
CURL_CONFIG=${ga_supplib_dir}/bin/curl-config
fi
fi
# if we haven't got what we need, look outside supplibs for netcdf-4
......@@ -21163,7 +21040,8 @@ fi
fi
NC_CONFIG="`pkg-config --variable=prefix netcdf`/bin/nc-config"
NC_CONFIG="`pkg-config --variable=prefix netcdf`/bin/nc-config"
CURL_CONFIG="`pkg-config --variable=prefix libcurl`/bin/curl-config"
fi
if test $use_nc4 != "yes" ; then
......@@ -21198,6 +21076,13 @@ cat >>confdefs.h <<\_ACEOF
_ACEOF
fi
# find out if curl is https-enabled
https=`$CURL_CONFIG --protocols | grep HTTPS`
if test $https = "HTTPS" ; then
nc_extra_libs="-lssl"
fi
# merge nc_libs and extras
nc_libs="$nc_libs $nc_extra_libs"
fi
fi
......@@ -23209,7 +23094,7 @@ echo
# Some non-configuration-dependent GrADS macros
cat >>confdefs.h <<\_ACEOF
#define GRADS_VERSION "2.1.0"
#define GRADS_VERSION "2.1.1.b0"
_ACEOF
......@@ -23312,7 +23197,7 @@ build_info="Built `date` for ${host}"
echo \
" +=========================================================================+"
echo " GrADS "2.1.0 ":" $build_info
echo " GrADS "2.1.1.b0 ":" $build_info
echo \
" +=========================================================================+"
echo
......@@ -23409,7 +23294,7 @@ fi
echo " +-------------------------------+"
echo "configure: creating src/VERSION"
echo 2.1.0 > src/VERSION
echo 2.1.1.b0 > src/VERSION
echo "configure: creating src/buildinfo.h"
mkdir -p src
......@@ -23842,7 +23727,7 @@ _ASBOX
} >&5
cat >&5 <<_CSEOF
This file was extended by GrADS $as_me 2.1.0, which was
This file was extended by GrADS $as_me 2.1.1.b0, which was
generated by GNU Autoconf 2.59. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
......@@ -23902,7 +23787,7 @@ _ACEOF
cat >>$CONFIG_STATUS <<_ACEOF
ac_cs_version="\\
GrADS config.status 2.1.0
GrADS config.status 2.1.1.b0
configured by $0, generated by GNU Autoconf 2.59,
with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
......
......@@ -7,7 +7,7 @@ dnl See acinclude.m4 for definitions of the GA_xxx macros
# The version number
# below is the "master" version that will appear in all code, etc.
AC_INIT(GrADS, [2.1.0], [jadams21@gmu.edu])
AC_INIT(GrADS, [2.1.1.b0], [jadams21@gmu.edu])
# Require autoconf 2.52 (comes with Mac OS X 10.2) or newer
AC_PREREQ(2.52)
......@@ -693,14 +693,12 @@ else
fi
if test "$have_zlib" = "yes" -a "$have_udunits" = "yes" -a "$have_jpeg" = "yes" ; then
GA_SET_FLAGS([hdf])
AC_CHECK_LIB([sz], [main],
[ AC_CHECK_HEADER([mfhdf.h],
[ AC_CHECK_LIB([df], [main],
[ AC_CHECK_LIB([mfhdf], [main],
[ use_hdf=yes
GA_SET_INCLUDE_VAR([hdf_inc], [hdf udunits])
GA_SET_LIB_VAR([hdf_libs], [mfhdf df udunits sz jpeg z])
])
AC_CHECK_HEADER([mfhdf.h],
[ AC_CHECK_LIB([df], [main],
[ AC_CHECK_LIB([mfhdf], [main],
[ use_hdf=yes
GA_SET_INCLUDE_VAR([hdf_inc], [hdf udunits])
GA_SET_LIB_VAR([hdf_libs], [mfhdf df udunits jpeg z])
])
])
])
......@@ -755,13 +753,11 @@ else
fi
if test "$have_zlib" = "yes" -a "$have_jpeg" = "yes" ; then
GA_SET_FLAGS([hdf5])
AC_CHECK_LIB([sz], [main],
[ AC_CHECK_HEADER([hdf5.h],
[ AC_CHECK_LIB([hdf5], [main],
[ use_hdf5=yes
GA_SET_INCLUDE_VAR([hdf5_inc], [hdf5])
GA_SET_LIB_VAR([hdf5_libs], [hdf5 sz z])
])
AC_CHECK_HEADER([hdf5.h],
[ AC_CHECK_LIB([hdf5], [main],
[ use_hdf5=yes
GA_SET_INCLUDE_VAR([hdf5_inc], [hdf5])
GA_SET_LIB_VAR([hdf5_libs], [hdf5 z])
])
])
GA_UNSET_FLAGS
......@@ -811,7 +807,7 @@ else
[ AC_CHECK_LIB(curl,main,
[ use_nc4="yes"
GA_SET_INCLUDE_VAR(nc_inc, [udunits netcdf])
GA_SET_LIB_VAR(nc_libs, [udunits netcdf hdf5_hl hdf5 z sz curl])
GA_SET_LIB_VAR(nc_libs, [udunits netcdf hdf5_hl hdf5 z curl])
])
])
])
......@@ -821,6 +817,7 @@ else
AC_SUBST(nc_inc)
AC_SUBST(nc_libs)
NC_CONFIG=${ga_supplib_dir}/bin/nc-config
CURL_CONFIG=${ga_supplib_dir}/bin/curl-config
fi
fi
# if we haven't got what we need, look outside supplibs for netcdf-4
......@@ -834,7 +831,8 @@ else
],,
[])
])
NC_CONFIG="`pkg-config --variable=prefix netcdf`/bin/nc-config"
NC_CONFIG="`pkg-config --variable=prefix netcdf`/bin/nc-config"
CURL_CONFIG="`pkg-config --variable=prefix libcurl`/bin/curl-config"
fi
if test $use_nc4 != "yes" ; then
AC_DEFINE(USENETCDF, 0, [Enable netcdf])
......@@ -849,6 +847,13 @@ else
if test $use_dap = "yes" ; then
AC_DEFINE(USEDAP, 1, [Enable OPeNDAP for grids])
fi
# find out if curl is https-enabled
https=`$CURL_CONFIG --protocols | grep HTTPS`
if test $https = "HTTPS" ; then
nc_extra_libs="-lssl"
fi
# merge nc_libs and extras
nc_libs="$nc_libs $nc_extra_libs"
fi
fi
......
......@@ -35,6 +35,7 @@ body {
<a href="#unpack">UNPACK</a> <br>
<a href="#FILEHEADER">FILEHEADER</a><br>
<a href="#XYHEADER">XYHEADER</a><br>
<a href="#XYTRAILER">XYTRAILER</a><br>
<a href="#THEADER">THEADER</a><br>
<a href="#THEADER">HEADERBYTES</a><br>
<a href="#TRAILERBYTES">TRAILERBYTES</a><br>
......@@ -324,17 +325,30 @@ href="cmd/query.html">query</a> command and it will appear in the directory list
each time block of binary data. This entry is only valid for GrADS gridded data sets. See the section on <a href="aboutgriddeddata.html#structure">structure of a gridded binary data file</a> for more information.</td>
</tr>
<tr>
<td bgcolor="#CCCCCC"> <a name="XYHEADER"> <b>XYHEADER</b> <i>length</i></a> </td>
<td bgcolor="#CCCCCC"> <a name="XYHEADER"> <b>XYHEADER</b> <i>length</i></a> </td>
<td width="74" align="right" valign="top" bgcolor="#CCCCCC"><a href="#TOP" class="item9">back
to top</a></td>
</tr>
<tr>
<td colspan="2">This optional entry tells GrADS that the data file has a header
record of length bytes preceding each horizontal grid (XY block) of binary
record of <em>length</em> bytes preceding each horizontal grid (XY block) of binary
data. This entry is only valid for GrADS gridded
data sets. See the section on <a
href="aboutgriddeddata.html#structure">structure of a gridded binary data file</a>
for more information.</td>
</tr>
<tr>
<td bgcolor="#CCCCCC"> <a name="XYTRAILER"> <b>XYTRAILER</b> <i>length</i></a> </td>
<td width="74" align="right" valign="top" bgcolor="#CCCCCC"><a href="#TOP" class="item9">back
to top</a></td>
</tr>
<tr>
<td colspan="2">(<span class="red">GrADS version 2.1.1.b0+</span>) This optional entry tells GrADS that the data file has a trailer
record of <em>length</em> bytes following each horizontal grid (XY block) of binary
data. This entry is only valid for GrADS gridded
data sets. See the section on <a
href="aboutgriddeddata.html#structure">structure of a gridded binary data file</a>
for more information. </td>
</tr>
<tr>
<td bgcolor="#CCCCCC"><strong><a name="XVAR"></a>XVAR</strong> <em>x,y</em></td>
......
<!--Copyright (C) 1988-2005 by the Institute of Global Environment and Society (IGES). See file COPYRIGHT for more information.--><style type="text/css"><!--body { background-color: #e0f0ff;}.style1 {color: #990000}--></style> <h1>Expressions</h1> A GrADS expression consists of operators, operands, and parentheses. Parentheses are used to control the order of operation.<p> Operators are: <ul><code>+</code>&nbsp;&nbsp;&nbsp; Addition <br><code>-</code>&nbsp;&nbsp;&nbsp; Subtraction <br><code>*</code>&nbsp;&nbsp;&nbsp; Multiplication <br><code>/</code>&nbsp;&nbsp;&nbsp; Division</ul><p> Operands are: <dd><code><a href="variable.html">variable specifications</a>, <a href="functions.html">functions</a>, and constants</code>. <p> Operations between two variables are done on equivalent grid points in each grid. Missing data values in either grid give a result of a missing data value at that grid point. Dividing by zero gives a result of a missing data value at that grid point.<p> Operations cannot be done between grids that have different scaling in their varying dimensions -- i.e., grids that have different rules for converting the varying dimensions from grid space to world coordinate space. This can only be encountered when you are attempting operations between grids from different files that have different scaling rules.<p> If one grid has more varying dimensions than the other, the grid with fewer varying dimensions is 'expanded' and the operation is performed.<p>Expression evaluation in GrADS is recursive, so that multiple expressions may be nested together. <p>(<span class="style1">GrADS version 2.0.a7+</span>) Variable specifications can include a dimension expression to set time as an <a href="offt.html">offset</a> from the variable's initial time. <p> Some examples of expressions: <ul><code>slp/100&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</code>(Convert sea level pressure units from hPa to mb)<br><code>z-z(t-1)&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</code>(Height change over one time step)<br><code>z-z(offt=0)&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</code>(Height change since initial time)<br><code>t(lev=500)-t(lev=850)&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</code>(Temp difference between 500 and 850mb)<br><code>ave(z,t=1,t=5)&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</code>(Average of z over first 5 times in file) <br><code>sum(prec(offt+0),t=1,t=4)&nbsp;&nbsp;&nbsp;</code>(Accumulated precipitation -- sum of 2nd through 5th time steps in file) <br><code>z-ave(z,lon=0,lon=360,-b)&nbsp;&nbsp;&nbsp;</code>(Remove zonal mean)<br><code>tloop(aave(p,global))&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</code>(Time series of globally averaged precip)</ul>
\ 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.--><style type="text/css">
<!--
body {
background-color: #e0f0ff;
}
.style1 {color: #990000}
-->
</style>
<h1>Expressions</h1>
A GrADS expression consists of operators, operands, and
parentheses. Parentheses are used to
control the order of operation -- this is especially important when using the logical operators.
<p>
Operators are:
<ul>
<code>+&nbsp;&nbsp;&nbsp;</code>Addition <br>
<code>-&nbsp;&nbsp;&nbsp;</code>Subtraction <br>
<code>*&nbsp;&nbsp;&nbsp;</code>Multiplication <br>
<code>/&nbsp;&nbsp;&nbsp;</code>Division <br>
</ul>
Logical Operators (introduced in <span class="style1">Version 2.1.1.b0</span> for GRIDDED data only):
<ul>
<code>= &nbsp;&nbsp;&nbsp;</code>Equal ( <code>== </code> is also acceptable)<br>
<code>!=&nbsp;&nbsp;&nbsp;</code>Not Equal<br>
<code>> &nbsp;&nbsp;&nbsp;</code>Greater than<br>
<code>>=&nbsp;&nbsp;&nbsp;</code>Greater than or equal <br>
<code><&nbsp;&nbsp;&nbsp;&nbsp;</code>Less than <br>
<code><=&nbsp;&nbsp;&nbsp;</code>Less than or equal<br>
<code>&&nbsp;&nbsp;&nbsp;&nbsp;</code>And (<code> &amp;&amp; </code> is also acceptable)<br>
<code>|&nbsp;&nbsp;&nbsp;&nbsp;</code>Or ( <code>|| </code> is also acceptable)<br>
</ul>
<p>
Operands are:
<dd><code><a href="variable.html">variable specifications</a>, <a href="functions.html">functions</a>, and constants</code>.</dd>
<h3>Usage Notes</h3>
Operations between two variables are done on equivalent grid points in each grid.
Missing data values in either grid give a result of a missing
data value at that grid point. Dividing by zero gives a result
of a missing data value at that grid point.<p>
Operations cannot be done between grids that have different
scaling in their varying dimensions -- i.e., grids that have
different rules for converting the varying dimensions from grid
space to world coordinate space. This can only be encountered
when you are attempting operations between grids from different
files that have different scaling rules.
<p>
If one grid has more varying dimensions than the other, the grid
with fewer varying dimensions is 'expanded' and the operation
is performed.
<p>Expression evaluation in GrADS is recursive, so that multiple expressions may be nested together.
<p>(<span class="style1">GrADS version 2.0.a7+</span>) Variable specifications can include a dimension expression to set time as an <a href="offt.html">offset</a> from the variable's initial time.
<p>(<span class="style1">GrADS version 2.1.1.b0+</span>) The result of a logical operation is boolean -- an answer to a yes/no question. If the expression is true the result is 1, if the expression is false the answer is -1 (instead of zero).
This is slightly different from the usual convention, but it is implemented this way in GrADS to make it easier to use logical operators with the <code><a href="gradfuncmaskout.html">maskout()</a></code> function. An <code><a href="gradfuncif.html">if()</a></code> function has also been implemented to use logical operators in expressions of the form if-then-else. Note: the logical operators have not yet been implemented for station data. <br />
<h3>Examples</h3>
<ul>
<code>slp/100&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</code>(Convert sea level pressure units from hPa to mb)<br>
<code>z-z(t-1)&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</code>(Height change over one time step)<br>
<code>z-z(offt=0)&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</code>(Height change since initial time)<br>
<code>t(lev=500)-t(lev=850)&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</code>(Temp difference between 500
and 850mb)<br>
<code>ave(z,t=1,t=5)&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</code>(Average of z over first 5 times in file) <br>
<code>sum(prec(offt+0),t=1,t=4)&nbsp;&nbsp;&nbsp;</code>(Accumulated precipitation -- sum of 2nd through 5th time steps in file) <br>
<code>z-ave(z,lon=0,lon=360,-b)&nbsp;&nbsp;&nbsp;</code>(Remove zonal mean)<br>
<code>tloop(aave(p,global))&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</code>(Time series of globally averaged precip)<br />
<br />
</ul>
<h3>Examples Using Logical Operators</h3>
<ul>
<code>tsfc&gt;=0&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;                           &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</code>(Surface temperatures greater than or equal to zero)<br />
<code>maskout(tsfc,tsfc&gt;=0)&nbsp;&nbsp;&nbsp;                         &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</code>(Set all negative surface temperatures to be undefined)<br />
<code>(tsfc&gt;30)|(tsfc&lt;-30)&nbsp;                           &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</code>(Surface temperature extremes)<br />
<code>(lat&gt;=-5)&amp;(lat&lt;=5)&amp;(lon&gt;=190)&amp;(lon&lt;=240)               </code>(Lat/Lon bounding box -- Nino3.4)<br />
<code>maskout(tsfc,(lat&gt;=-5)&amp;(lat&lt;=5)&amp;(lon&gt;=190)&amp;(lon&lt;=240)) </code>(Surface temperature only defined within the Lat/Lon box)<br /><br />
</ul>
\ 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: q define</title>
<link href="/assets/NewIGES.css" rel="stylesheet" type="text/css">
<style type="text/css">
<!--
.style2 {color: #990000}
.style3 {color: #009933}
body {
background-color: #e0f0ff;
}
.red {
color: #900;
}
.italic {
font-style: italic;
}
-->
</style>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body bgcolor="e0f0ff" text="#000000">
<h2><b>q define</b></h2>
<p><code>q define <i>varname</i></code>
<p>This command returns information about a defined variable, <code><i>varname</i></code>. The <code>'q define'</code> command without the variable name will return a list of defined variables. When a variable name is added, the printout includes the type, the sizes of each dimension, axis definitions for each dimension, the calendar, and whether the variable has been <a href="gradcomdmodify.html"><code>'modified'</code></a>.
<h3>Usage Notes</h3>
<p>This command is available in GrADS <span class="red">version 2.1.1.b0</span>.</p>
<h3>Example</h3>
<code>
<p>ga-&gt;define ps=ps<br>
Define memory allocation size = 8311688 bytes<br>
ga-&gt; q define ps<br>
Gridded Defined Variable: ps <br>
Xsize = 1441 Ysize = 721 Zsize = 1 Tsize = 1 Esize = 1<br>
XDEF 1441 linear 0 0.25<br>
YDEF 721 linear -90 0.25<br>
ZDEF 1 levels 1000<br>
TDEF 1 linear 12Z02FEB2017 180mn<br>
Calendar: Gregorian q ens<br>
</p>
</code>
<h3>&nbsp;</h3>
</body>
</html>
<!--Copyright (C) 1988-2005 by the Institute of Global Environment and Society (IGES). See file COPYRIGHT for more information.-->
<style type="text/css">
body {
background-color: #e0f0ff;
}
.red { color: #900;
}
</style>
<H2><B>set barbopts</B></H2>
<P>
This command controls the appearance of the pennant flags on wind barbs.
It is available starting with <span class="red">GrADS version 2.1.1b0</span>.
<h3>Syntax
</h3>
<P><code>set barbopts <i>opts</i></code>
<ul>
<code>outline</code>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;do <i>not</i> fill
in
the pennant <br>
<code>filled</code>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;fill in the pennant
</ul>
<H3>Usage Notes</H3>
<P>If you are using a transparent color to draw filled barbs, you may notice a faint outline around the pennant flags; you can avoid this using
<a href="colorcontrol.html#transparent">color masking</a>.
<H3>Examples</H3>
<P>Results that look like the image below may be accomplished by drawing filled barbs underneath outlined barbs. <br />
<img src="filledbarbs.png" width="145" height="100" alt="filled barbs" border="1"/><br />
<br />
......@@ -25,6 +25,7 @@
<code>-3dt&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</code>forces the output data file to have at least 3 coordinate dimensions (lon, lat, and time)<br>
<code>-3dz&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</code>forces the output data file to have at least 3 coordinate dimensions (lon, lat, and lev)<br>
<code>-4d &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</code>forces the output data file to have at least 4 coordinate dimensions (lon, lat, lev, and time)<br>
<code>-4e &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</code>forces the output data file to have at least 4 coordinate dimensions (lon, lat, time, and ens)<br>
<code>-5d &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</code>forces the output data file to have 5 coordinate dimensions (lon, lat, lev, time, and ens)<br>
<code>-rt &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</code>sets the T axis as the record (unlimited) dimension<br>
<code>-re &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</code>sets the E axis as the record (unlimited) dimension<br>
......@@ -43,12 +44,13 @@
<p>
<h3>Usage Notes</h3>
<p>
This command is available in GrADS <span class="style1">v2.0.a3+</span>.
This command is available in version <span class="style1">v2.0.a3+</span>.
<br>
The <code>-4d</code> and <code>-5d</code> options are available in GrADS <span class="style1">v2.0.a5+</span>.
The <code>-4d</code> and <code>-5d</code> options are available in version <span class="style1">v2.0.a5+</span>.
<br>
The <code>-flt</code>, <code>-dbl</code>, <code>-nc3</code>,<code>-nc4</code>, <code>-chunk</code>, and <code>-zip</code> options are available in GrADS <span class="style1">2.0.a8+</span>.<br>
The <code>-3dz,</code><code>-3dt,-rt</code> and <code>-re</code> options are available in GrADS <span class="style1">2.1.a2+</span>.
The <code>-flt</code>, <code>-dbl</code>, <code>-nc3</code>,<code>-nc4</code>, <code>-chunk</code>, and <code>-zip</code> options are available in version <span class="style1">2.0.a8+</span>.<br>
The <code>-3dz,</code><code>-3dt,-rt</code> and <code>-re</code> options are available in version <span class="style1">2.1.a2+</span>.<br>
The -4de option is available in version <span class="style1">2.1.1.b0</span>.
<p>The options set with this command "stick" until the <a href="http://iges.org/grads/gadoc/gradcomdreset.html"><code>reset</code></a>, <a href="http://iges.org/grads/gadoc/gradcomdreinit.html"><code>reinit</code></a>, or <a href="http://iges.org/grads/gadoc/gradcomdclear.html"><code>clear sdfwrite</code></a> commands are invoked -- they are not altered when <a href="gradcomdsdfwrite.html"><code>sdfwrite</code></a> is invoked; however, there have been some changes related to which options are reset whenever a new <code><a href="gradcomdsetsdfwrite.html">set sdfwrite</a></code> command is invoked:
<ul>
<li>(<span class="style1">2.0.a3</span>) Originally, all options were designed to &quot;stick&quot; until a <a href="http://iges.org/grads/gadoc/gradcomdclear.html"><code>clear sdfwrite</code></a> command was invoked.</li>
......
<!--Copyright (C) 1988-2005 by the Institute of Global Environment and Society (IGES). See file COPYRIGHT for more information.-->
<html>
<title>GrADS Function: if</title>
<style type="text/css">
.red {
color: #900;
}
body {
background-color: #e0f0ff;
}
</style>
<body text="#000000">
<H2><b>if()</b></H2>
<p>
This function performs an if/then/else expression evaluation.
It is available starting with <span class="red">GrADS version 2.1.1.b0</span>.
<h3>Syntax</h3>
<p>
<code>if (<i>logical_expr, then_expr, else_expr</i>)</code>
<p>
where:
<ul>
<p><code><i>logical_expr</i>&nbsp;&nbsp;&nbsp;</code>- any valid logical expression that has a boolean (yes/no) result<br>
<code><i>then_expr</i>   &nbsp;&nbsp;&nbsp;</code>- the result expression if <code><i>logical_expr</i></code> is true<br>
<code><i>else_expr   </i>&nbsp;&nbsp;&nbsp;</code>- the result expression if <code><i>logical_expr</i></code> is false<br>
</ul>
<p>All the arguments must be expressions for gridded data -- the logical operators and the if() function have not yet been implemented for station data. <br>
</p>
<H3>Usage Notes</H3>
<ol>
<li>The <code><i>logical_expr</i></code> should include one or more of the logical operators:<code> =, !=, &gt;, &gt;=, &lt;, &lt;=, |, &amp;</code><br>
<br>
The result of a logical operation is boolean -- an answer to a yes/no question. If the expression is true the result is 1, and if the expression is false the answer is -1. The <code>if()</code> function will evaluate <code><i>logical_expr</i></code> and wherever the result is &gt;0 it will place the value of <code><i>then_expr</i></code>, and wherever the result is &lt;0 it will place the value of <code><i>else_expr</i></code>.<br>
<br>
<li>The arguments<code><i>then_expr</i></code> and <code><i>else_expr</i></code> may be any GrADS expression, including a constant. If you want <code><i>then_expr</i></code> or <code><i>else_expr</i></code> to be undefined, then use <code><a href="gradfuncmaskout.html">maskout()</a></code> instead of the <code><a href="gradfuncif.html">if()</a></code> function.
</ol>
<h3>Examples</h3>
<p>Here is a script sample to find the minimum and maximum 2-meter temperature at each grid point over a 12-month period:<dd><code>
'define tmin = const(t2m,1e9)'<br>
'define tmax = const(t2m,-1e9)'<br>
t = 1<br>
while (t &lt;= 12) <br>
  'set t 't<br>
  'define tmin = if(t2m&lt;tmin,t2m,tmin)'<br>
  'define tmax = if(t2m&gt;tmax,t2m,tmax)'<br>
  t = t + 1<br>
endwhile
</code>
</dd>
</p>
</body>
</html>
\ No newline at end of file
This diff is collapsed.
......@@ -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 for <span class="red">version 2.1.a1</span>) <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="library.html">Script Library</a><br>
<a href="reference_card_scl.pdf">Scripting Language Reference Card</a>
<font size=-1>
......@@ -773,7 +773,7 @@ Repeated calls must be made to read consecutive records. The result is
a string containing two lines: the first line is the return code, the
2nd line is the record read from the file. The record may be a maximum
of 80 characters. Use the <code>sublin</code> function to separate the
result. Return codes are:<br>
result. Return codes are:
<ul>
<code>0 - </code>ok <br>
......@@ -781,6 +781,7 @@ result. Return codes are:<br>
<code>2 - </code>end of file <br>
<code>8 - </code>file open for write <br>
<code>9 - </code>I/O error<br>
<br>
</ul>
Files are opened when the first call to read is made for a
......@@ -796,7 +797,7 @@ This functions writes records to output file <code>filename</code>.
On the first call to write for a particular file, the file is opened
in write mode. This will destroy an existing file! If you use the
optional append flag, the file will be opened in append mode, and all
writes will be appended to the end of the file. Return codes are:<br>
writes will be appended to the end of the file. Return codes are:
<ul>
<code>0</code> - ok <br>
<code>1</code> - open error <br>
......@@ -805,15 +806,41 @@ writes will be appended to the end of the file. Return codes are:<br>
<p>
<b><code>close (<i>name</i>)</code></b>
<br>