<div dir="ltr">Hello,<div><br></div><div>I am having trouble trying to figure out how to grab the max and min values from an array that I read in. For instance, I have a text file that gets created that includes the timestep, latitude and longitude values (space-delimited) like so:</div><div><br></div><div>0 23.50 291.36<br>1 24.17 290.55<br>2 24.81 289.80<br>3 25.24 288.96<br>4 25.55 287.92<br>5 25.84 286.89<br>6 26.06 285.87<br>7 26.14 284.98<br>8 26.28 283.90<br>9 26.53 283.00 <br></div><div><br></div><div>I read this file in with GrADS using the following code and create an array for latitude and longitude based off the tstep:</div><div><br></div><div>istat = 0<br>while (istat != 2)<br>  data = read('file.txt')<br>  istat = sublin(data,1)<br>  if (istat = 2);break;endif<br><br>  line = sublin(data,2)<br>  tstep = subwrd(line,1)<br>  lat.tstep = subwrd(line,2)<br>  lon.tstep = subwrd(line,3)<br>endwhile<br>rc = close('file.txt')<br></div><div><br></div><div>So, what I want to do is grab the max/min latitude and longitude values so that I can create a domain that nicely encloses the data I have to plot. Is this possible to do within GrADS? I didn't have any luck playing with the max() function.</div><div><br></div><div>Thanks!</div><div><br clear="all"><div><div dir="ltr" class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div><b>-------</b></div>William (L.B.) LaForce IV<br>Meteorologist</div></div></div></div></div></div></div>