Sushant,<br>I would think you could add another &quot;max&quot; loop inside the &quot;maxloc&quot; statement, i.e.,<br><br>&#39;d maxloc(max(max(variable,x=x1,x=x2),y=y1,y=y2),lev=lev1,lev=lev2)&#39;<br><br>Jeff Duda<br><br>
<div class="gmail_quote">On Mon, Oct 25, 2010 at 11:44 PM, sushant puranik <span dir="ltr">&lt;<a href="mailto:sushantpuranik@gmail.com">sushantpuranik@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
What if i want to find the level of maximum wind and also the track how maximum wind flows?<br><br>sushant<br><br><div class="gmail_quote">On Mon, Oct 25, 2010 at 10:13 PM, Charles Seman <span dir="ltr">&lt;<a href="mailto:Charles.Seman@noaa.gov" target="_blank">Charles.Seman@noaa.gov</a>&gt;</span> wrote:<br>

<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">Andrew and Jeff and GrADS Users,<br>
<br>
Kun-Hsuan Chou provided the reference code for this technique (which can be found in the attached file hurricane_tracking.txt, taken from an email exchange posted to the GrADS Listserv by Kun-Hsuan Chou and Arturo Caracas Uribe in Oct, 2004).<br>


<br>
Chuck<br>
<br>
Jeffrey Duda wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div>
Andrew,<br>
I had posted a request on this forum about this exact question in August.  I believe it was Charles Seaman who provided the answer.  The meat of the code is<br>
<br>
&#39;d maxloc(max(&#39;ans&#39;,x=&#39;x1&#39;,x=&#39;x2&#39;),y=&#39;y1&#39;,y=&#39;y2&#39;)&#39;<br>
 yline = sublin(result,2)<br>
 ymax = subwrd(yline,4)<br>
&#39;d maxloc(max(&#39;ans&#39;,y=&#39;y1&#39;,y=&#39;y2&#39;),x=&#39;x1&#39;,x=&#39;x2&#39;)&#39;<br>
 xline = sublin(result,2)<br>
 xmax = subwrd(xline,4)<br>
<br>
<br>
where &quot;ans&quot; refers to the field for which you want to find the max/min, and x1, x2 refer to x-grid values or longitude points and y1, y2 refer to y-grid values or latitude points.  xmax, ymax are the coordinates of the maximum value.  To find the minimum, just replace maxloc and max with minloc and min.<br>


<br>
Jeff Duda<br>
<br></div><div>
On Fri, Oct 22, 2010 at 7:43 PM, Andrew Revering &lt;<a href="mailto:andy@f5data.com" target="_blank">andy@f5data.com</a> &lt;mailto:<a href="mailto:andy@f5data.com" target="_blank">andy@f5data.com</a>&gt;&gt; wrote:<br>


<br>
    I&#39;d like to have the coordinates of our &#39;max value&#39;… I know about<br>
    maxloc(), and tried various examples I found in forums,<br>
    documentation and email conversations, but I can&#39;t seem to get it<br>
    to perform as I expect.<br>
<br>
     <br>
    When it supposedly works, I just see some white lines on the<br>
    bottom and right of my image (not where the max value is)… is<br>
    there a way to actually get lat/lon coordinates of the max value?<br>
<br>
     <br>
    I should note that in my situation there will be the teeniest dot<br>
    of plotted value, the rest of the grid is blank. I don&#39;t know if<br>
    that matters in these functions.<br>
<br>
     <br>
    Andrew Revering<br>
<br>
    Convective Development, Inc.<br>
<br>
    <a href="http://www.convectivedevelopment.com/" target="_blank">http://www.convectivedevelopment.com/</a><br>
<br>
     <br>
     <br>
<br>
    _______________________________________________<br>
    gradsusr mailing list<br></div>
    <a href="mailto:gradsusr@gradsusr.org" target="_blank">gradsusr@gradsusr.org</a> &lt;mailto:<a href="mailto:gradsusr@gradsusr.org" target="_blank">gradsusr@gradsusr.org</a>&gt;<div><br>
    <a href="http://gradsusr.org/mailman/listinfo/gradsusr" target="_blank">http://gradsusr.org/mailman/listinfo/gradsusr</a><br>
<br>
<br>
<br>
<br>
-- <br>
Jeff Duda<br>
Iowa State University<br>
Meteorology Graduate Student<br>
3134 Agronomy Hall<br>
</div><a href="http://www.meteor.iastate.edu/%7Ejdduda" target="_blank">www.meteor.iastate.edu/~jdduda</a> &lt;<a href="http://www.meteor.iastate.edu/%7Ejdduda" target="_blank">http://www.meteor.iastate.edu/%7Ejdduda</a>&gt;<br>


------------------------------------------------------------------------<div><br>
<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>
</div></blockquote>
<br>
-- <br>
<br>
Please note that <a href="mailto:Charles.Seman@noaa.gov" target="_blank">Charles.Seman@noaa.gov</a> should be considered my NOAA<br>
email address, not <a href="mailto:cjs@gfdl.noaa.gov" target="_blank">cjs@gfdl.noaa.gov</a>.<br>
<br>
********************************************************************<br>
Charles Seman                                <a href="mailto:Charles.Seman@noaa.gov" target="_blank">Charles.Seman@noaa.gov</a><br>
U.S. Department of Commerce / NOAA / OAR<br>
Geophysical Fluid Dynamics Laboratory         voice: (609) 452-6547<br>
201 Forrestal Road                              fax: (609) 987-5063<br>
Princeton, NJ  08540-6649            <a href="http://www.gfdl.noaa.gov/%7Ecjs/" target="_blank">http://www.gfdl.noaa.gov/~cjs/</a><br>
********************************************************************<br>
<br>
&quot;The contents of this message are mine personally and do not reflect any<br>
official or unofficial position of the United States Federal Government,<br>
the United States Department of Commerce, or NOAA.&quot;<br>
<br>
<br>*<br>
*<br>
* Subject: Re: Tracking Hurricanes<br>
* From: Kun-Hsuan Chou &lt;<a href="mailto:cwujou@TYPHOON.AS.NTU.EDU.TW" target="_blank">cwujou@TYPHOON.AS.NTU.EDU.TW</a>&gt;<br>
* Date: Fri, 8 Oct 2004 08:03:20 +0800<br>
* To: <a href="mailto:GRADSUSR@LIST.CINECA.IT" target="_blank">GRADSUSR@LIST.CINECA.IT</a><br>
*<br>
* Hi,<br>
*<br>
* I write a sample to track the maxminum wind speed, it should be the script that you want.<br>
*<br>
&#39;d maxloc(max(mag(u,v),lon=120,lon=130),lat=15,lat=25)&#39;<br>
  line=sublin(result,2)<br>
  ygrd=subwrd(line,4)<br>
&#39;d maxloc(max(mag(u,v),lat=15,lat=25),lon=120,lon=130)&#39;<br>
  line=sublin(result,2)<br>
  xgrd=subwrd(line,4)<br>
&#39;set x &#39;xgrd<br>
lonval = subwrd(result,4)<br>
&#39;set y &#39;ygrd<br>
latval = subwrd(result,4)<br>
&#39;q w2xy &#39;lonval&#39; &#39;latval<br>
xpos = subwrd(result,3)<br>
ypos = subwrd(result,6)<br>
&#39;draw mark 1 &#39;xpos&#39; &#39;ypos&#39; .2&#39;<br>
<br>
*============================================================================<br>
*Kun-Hsuan Chou<br>
*Postdoctoral Researcher<br>
*Department of Atmospheric Sciences<br>
*National Taiwan University<br>
*No. 1, Sec. 4, Roosevelt Rd., Taipei 106, Taiwan.<br>
*Phone:   886-2-23625896 ext. 243<br>
*Mobile:  0920079247<br>
*E-mail:   <a href="mailto:cwujou@typhoon.as.ntu.edu.tw" target="_blank">cwujou@typhoon.as.ntu.edu.tw</a><br>
*----- Original Message -----<br>
*From: Arturo Caracas Uribe<br>
*To: <a href="mailto:GRADSUSR@LIST.CINECA.IT" target="_blank">GRADSUSR@LIST.CINECA.IT</a><br>
*Sent: Thursday, October 07, 2004 11:48 PM<br>
*Subject: Tracking Hurricanes<br>
*<br>
*Does anyone know how to get the maximum values of vorticity of a domain? (the value, lat and lon).I need the positions in order to track a hurricane.<br>
*Thanks in advance<br>
*<br>
*Arturo Caracas<br>
*Atmospheric Sciences, México.<br>
<br>
<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><br clear="all"><br><br><br>
<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><br clear="all"><br>-- <br>Jeff Duda<br>Iowa State University<br>Meteorology Graduate Student<br>3134 Agronomy Hall<br><a href="http://www.meteor.iastate.edu/~jdduda">www.meteor.iastate.edu/~jdduda</a><br>