<!--Copyright (C) 1988-2005 by the Institute of Global Environment and Society (IGES). See file COPYRIGHT for more information.--> <html> <head> <title>GrADS Function: max</title> </head> <body bgcolor="e0f0ff" text="#000000"> <h2><b>max()</b></h2> <p> <code>max(<i>expr, dim1, dim2 <,tinc></i>)</code> <p> Returns the maximum of <code><i>expr</i></code> over the specified dimension range. If the specified dimension is time, an optional time increment <code><i>tincr</i></code> may be specified. <p> <ul> <code><i>expr</i> </code>- any valid GrADS expression <br> <code><i>dim1</i> </code>- the starting dimension expression<br> <code><i>dim2</i> </code>- the ending dimension expression<br> <code><i>tinc</i> </code>- optional time increment<br> </ul> <p> <code><i>dim1</i></code> and <code><i>dim2</i></code> are standard GrADS dimension expressions whose dimensions must match. <p> <h3>Usage Notes</h3> <p> <ol> <li> Related functions are: <code><a href="gradfuncmaxloc.html">maxloc</a></code>, <code><a href="gradfuncmin.html">min</a></code>, and <code><a href="gradfuncminloc.html">minloc</a></code>. <br> These functions will only work with GrADS version 1.8 or later. </ol> <p> <h3>Examples</h3> <ol> <li>To calculate the maximum value of the <code>precip</code> variable over the lon-lat domain, use nested <code>max</code> functions: <p> <code> d max(max(precip,lon=0,lon=360),lat=-90,lat=90) </code> <p> </body> </html>