<div dir="ltr">Robert,<div>In the example I gave you, the "location" is the time step. E.g., maxloc(temp,t=1,t=6) will return a value between 1 and 6. So, if the max temp is at t=3, then the function should return "Result value = 3."</div>
<div>Stephen Mc</div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Thu, Jun 26, 2014 at 10:56 AM, Roberto Mera <span dir="ltr"><<a href="mailto:RMera@ucsusa.org" target="_blank">RMera@ucsusa.org</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div>
<div style="direction:ltr;font-family:Tahoma;color:#000000;font-size:10pt">Stephen,
<div><br>
</div>
<div>What I need is the actual time, which t (between t=1 and t=6) that has the max. I don't need the location, just the time of the max. That way, I can use that time to get the appropriate area average for rh.</div>
<div><br>
</div>
<div>Robert<br>
<div style="font-family:Times New Roman;color:#000000;font-size:16px">
<hr>
<div style="direction:ltr"><font face="Tahoma" color="#000000"><b>From:</b> <a href="mailto:gradsusr-bounces@gradsusr.org" target="_blank">gradsusr-bounces@gradsusr.org</a> [<a href="mailto:gradsusr-bounces@gradsusr.org" target="_blank">gradsusr-bounces@gradsusr.org</a>] on behalf of Stephen McMillan [<a href="mailto:smcmillan@planalytics.com" target="_blank">smcmillan@planalytics.com</a>]<br>
<b>Sent:</b> Thursday, June 26, 2014 10:50 AM<br>
<b>To:</b> GrADS Users Forum<br>
<b>Subject:</b> Re: [gradsusr] How do I know which time step in max(xx, t=x, t=y) is actually the max?<br>
</font><br>
</div>
<div></div>
<div><div><div class="h5">
<div dir="ltr">Robert,
<div>Use the function maxloc, e.g., maxloc(temp,t=1,t=6). If lat and lon are fixed, it should return a single value with the time step. If lat and lon are not fixed, it should return a spatial map with the max temp time step at each grid point.</div>
<div><br>
</div>
<div>Documentation in GrADS Index, but has no examples.</div>
<div><br>
</div>
<div>Stephen McMillan</div>
</div>
<div class="gmail_extra"><br>
<br>
<div class="gmail_quote">On Thu, Jun 26, 2014 at 10:20 AM, Roberto Mera <span dir="ltr">
<<a href="mailto:RMera@ucsusa.org" target="_blank">RMera@ucsusa.org</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div>
<div style="direction:ltr;font-family:Tahoma;color:#000000;font-size:10pt">All,
<div><br>
</div>
<div>I'm trying to figure out a way to output the maximum temperature and RH in a 5-day period for a month in a superensemble. </div>
<div><br>
</div>
<div>I can get the max to write out using this function:</div>
<div><br>
</div>
<div>
<div>count = 1</div>
<div>while (count < 18)</div>
<div>'set e 'count</div>
</div>
<div>'areal=aave(maskout(ave(field88,t=1,t=6),mskgrd(t=1)),x=147,x=250,y=94.1815,y=182.057)'</div>
<div>
<div>'d areal'</div>
<div>areal=subwrd(result,4)</div>
</div>
<div>
<div>say areal</div>
<div>if (rc != 0) ; break ; endif</div>
<div>count = count +1</div>
<div>endwhile</div>
</div>
<div><br>
</div>
<div><br>
</div>
<div>However, if I also want the CONCURRENT RH, then I have to know which time step was the max for the temperature. Otherwise it might be a different time step if I do max(rh,t=1,t=6).</div>
<div><br>
</div>
<div>Is there a way to query which t in the max(temp,t=1,t=6) is the actual max? i.e. timestep 3. This way I can put it in a new script and get the appropriate rh.</div>
<div><br>
</div>
<div>Robert</div>
</div>
</div>
<br>
_______________________________________________<br>
gradsusr mailing list<br>
<a href="mailto:gradsusr@gradsusr.org" target="_blank">gradsusr@gradsusr.org</a><br>
<a href="http://gradsusr.org/mailman/listinfo/gradsusr" target="_blank">http://gradsusr.org/mailman/listinfo/gradsusr</a><br>
<br>
</blockquote>
</div>
<br>
</div>
</div></div><pre>***************************************************
The information contained in this e-mail message is intended only for the use of the recipient(s) named above and may contain information that is privileged, confidential, and/or proprietary.
If you are not the intended recipient, you may not review, copy or distribute this message. If you have received this communication in error, please notify the sender immediately by e-mail, and delete the original message.
***************************************************
</pre>
</div>
</div>
</div>
</div>
</div>
<br>_______________________________________________<br>
gradsusr mailing list<br>
<a href="mailto:gradsusr@gradsusr.org">gradsusr@gradsusr.org</a><br>
<a href="http://gradsusr.org/mailman/listinfo/gradsusr" target="_blank">http://gradsusr.org/mailman/listinfo/gradsusr</a><br>
<br></blockquote></div><br></div>
<pre>***************************************************
The information contained in this e-mail message is intended only for the use of the recipient(s) named above and may contain information that is privileged, confidential, and/or proprietary.
If you are not the intended recipient, you may not review, copy or distribute this message. If you have received this communication in error, please notify the sender immediately by e-mail, and delete the original message.
***************************************************