Sushant,<br>I would think you could add another "max" loop inside the "maxloc" statement, i.e.,<br><br>'d maxloc(max(max(variable,x=x1,x=x2),y=y1,y=y2),lev=lev1,lev=lev2)'<br><br>Jeff Duda<br><br>
<div class="gmail_quote">On Mon, Oct 25, 2010 at 11:44 PM, sushant puranik <span dir="ltr"><<a href="mailto:sushantpuranik@gmail.com">sushantpuranik@gmail.com</a>></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"><<a href="mailto:Charles.Seman@noaa.gov" target="_blank">Charles.Seman@noaa.gov</a>></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>
'd maxloc(max('ans',x='x1',x='x2'),y='y1',y='y2')'<br>
yline = sublin(result,2)<br>
ymax = subwrd(yline,4)<br>
'd maxloc(max('ans',y='y1',y='y2'),x='x1',x='x2')'<br>
xline = sublin(result,2)<br>
xmax = subwrd(xline,4)<br>
<br>
<br>
where "ans" 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 <<a href="mailto:andy@f5data.com" target="_blank">andy@f5data.com</a> <mailto:<a href="mailto:andy@f5data.com" target="_blank">andy@f5data.com</a>>> wrote:<br>
<br>
I'd like to have the coordinates of our 'max value'… I know about<br>
maxloc(), and tried various examples I found in forums,<br>
documentation and email conversations, but I can'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'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> <mailto:<a href="mailto:gradsusr@gradsusr.org" target="_blank">gradsusr@gradsusr.org</a>><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> <<a href="http://www.meteor.iastate.edu/%7Ejdduda" target="_blank">http://www.meteor.iastate.edu/%7Ejdduda</a>><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>
"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."<br>
<br>
<br>*<br>
*<br>
* Subject: Re: Tracking Hurricanes<br>
* From: Kun-Hsuan Chou <<a href="mailto:cwujou@TYPHOON.AS.NTU.EDU.TW" target="_blank">cwujou@TYPHOON.AS.NTU.EDU.TW</a>><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>
'd maxloc(max(mag(u,v),lon=120,lon=130),lat=15,lat=25)'<br>
line=sublin(result,2)<br>
ygrd=subwrd(line,4)<br>
'd maxloc(max(mag(u,v),lat=15,lat=25),lon=120,lon=130)'<br>
line=sublin(result,2)<br>
xgrd=subwrd(line,4)<br>
'set x 'xgrd<br>
lonval = subwrd(result,4)<br>
'set y 'ygrd<br>
latval = subwrd(result,4)<br>
'q w2xy 'lonval' 'latval<br>
xpos = subwrd(result,3)<br>
ypos = subwrd(result,6)<br>
'draw mark 1 'xpos' 'ypos' .2'<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>