Sophie

Sophie

distrib > Fedora > 18 > i386 > by-pkgid > dcaf9bd555d1ce386641f56c6523d3ed > files > 233

grads-2.0.2-1.fc18.i686.rpm

<!--Copyright (C) 1988-2005 by the Institute of Global Environment and Society (IGES). See file COPYRIGHT for more information.-->

<html>
<head>
<title>GrADS Function: amax</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<style type="text/css">
body {
	background-color: #e0f0ff;
}
.red {
	color: #900;
}
</style>
</head>
<body text="#000000">

<h2><b>amax()</b></h2>
<p>This function returns an area maximum -- the maximum value in a grid spanning  an X-Y region. The syntax is:
<p> <code>amax(<i>expr, xdim1, xdim2, ydim1, ydim2</i>)</code>
<p> where:
<ul>
  <code><i>expr</i>&nbsp;&nbsp;&nbsp;&nbsp;</code>any valid GrADS grid expression <br>
  <code><i>xdim1</i>&nbsp;&nbsp;&nbsp;</code>starting X or LON dimension expression <br>
  <code><i>xdim2</i>&nbsp;&nbsp;&nbsp;</code>ending X or LON dimension expression <br>
  <code><i>ydim1</i>&nbsp;&nbsp;&nbsp;</code>starting Y or LAT dimension expression <br>
  <code><i>ydim2</i>&nbsp;&nbsp;&nbsp;</code>ending Y or LAT dimension expression <br>
</ul>
<p> For global maximum, a shorthand may be used:
  
<ul>
  <code>amax(<i>expr</i>, global)</code> or <br>
  <code>amax(<i>expr</i>, g)</code>
</ul>
is the same as
<ul>
  <code>amax(<i>expr</i>, lon=0, lon=360, lat=-90, lat=90)</code>
</ul>
<p>
<h3>Usage Notes</h3>
<ol>
<li>This function will only work with <span class="red">GrADS version 2.0.2</span> or later.
<li>This function is  more efficient that using nested <code><a href="gradfuncmax.html">max</a></code> functions. 
<li> Related functions  <code><a href="gradfuncamaxlocx.html">amaxlocx</a></code> and <code><a href="gradfuncamaxlocy.html">amaxlocy</a></code> will return the grid location (X or Y) of the maximum value. 
 If more than one grid box contains the maximum value, the location returned will be the first one encountered as the grid is scanned. The grid is scanned by rows from south to north, and each row is scanned from west to east. <li>A similar set of functions exists for finding the minimum over an area: <code><a href="gradfuncamin.html">amin</a></code>, <code><a href="gradfuncaminlocx.html">aminlocx</a></code>, and <code><a href="gradfuncaminlocy.html">aminlocy</a></code>.
</ol>

<p>
<h3>Examples</h3>
<ol> 
<li>Get the maximum value of the variable <code>ps</code> over a specified grid domain:<br>
  <code>d amax(ps,x=10,x=120,y=15,y=45)</code><br>
  <br></li>
<li>Get the maximum value of the variable <code>sstanom</code> over the nino3.4 domain:<br>
  <code>d amax(sstanom,lon=-170,lon=-120,lat=-5,lat=5)</code><br>
  <br></li>
<li>Get the maximum value of the variable <code>slp</code> over the global domain, and also get the grid location of that minimum. Check results. 
  <br>
  <pre>
ga-> d amax(slp,g)
Result value = 105732 
ga-> d amaxlocx(slp,g)
Result value = 168 
ga-> d amaxlocy(slp,g) 
Result value = 13 
ga-> set x 168
LON set to 83.5 83.5 
ga-> set y 13
LAT set to -84 -84 
ga-> d slp
Result value = 105732 

  </pre>
</li>
  </ol>
  <p>
</body>
</html>