[gradsusr] Max Value Coordinates

Jeffrey Duda jdduda at iastate.edu
Tue Oct 26 12:55:03 EDT 2010


Sushant,
I would think you could add another "max" loop inside the "maxloc"
statement, i.e.,

'd maxloc(max(max(variable,x=x1,x=x2),y=y1,y=y2),lev=lev1,lev=lev2)'

Jeff Duda

On Mon, Oct 25, 2010 at 11:44 PM, sushant puranik
<sushantpuranik at gmail.com>wrote:

> What if i want to find the level of maximum wind and also the track how
> maximum wind flows?
>
> sushant
>
> On Mon, Oct 25, 2010 at 10:13 PM, Charles Seman <Charles.Seman at noaa.gov>wrote:
>
>> Andrew and Jeff and GrADS Users,
>>
>> 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).
>>
>> Chuck
>>
>> Jeffrey Duda wrote:
>>
>>> Andrew,
>>> 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
>>>
>>> 'd maxloc(max('ans',x='x1',x='x2'),y='y1',y='y2')'
>>>  yline = sublin(result,2)
>>>  ymax = subwrd(yline,4)
>>> 'd maxloc(max('ans',y='y1',y='y2'),x='x1',x='x2')'
>>>  xline = sublin(result,2)
>>>  xmax = subwrd(xline,4)
>>>
>>>
>>> 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.
>>>
>>> Jeff Duda
>>>
>>> On Fri, Oct 22, 2010 at 7:43 PM, Andrew Revering <andy at f5data.com<mailto:
>>> andy at f5data.com>> wrote:
>>>
>>>    I'd like to have the coordinates of our 'max value'… I know about
>>>    maxloc(), and tried various examples I found in forums,
>>>    documentation and email conversations, but I can't seem to get it
>>>    to perform as I expect.
>>>
>>>
>>>    When it supposedly works, I just see some white lines on the
>>>    bottom and right of my image (not where the max value is)… is
>>>    there a way to actually get lat/lon coordinates of the max value?
>>>
>>>
>>>    I should note that in my situation there will be the teeniest dot
>>>    of plotted value, the rest of the grid is blank. I don't know if
>>>    that matters in these functions.
>>>
>>>
>>>    Andrew Revering
>>>
>>>    Convective Development, Inc.
>>>
>>>    http://www.convectivedevelopment.com/
>>>
>>>
>>>
>>>
>>>    _______________________________________________
>>>    gradsusr mailing list
>>>    gradsusr at gradsusr.org <mailto:gradsusr at gradsusr.org>
>>>
>>>    http://gradsusr.org/mailman/listinfo/gradsusr
>>>
>>>
>>>
>>>
>>> --
>>> Jeff Duda
>>> Iowa State University
>>> Meteorology Graduate Student
>>> 3134 Agronomy Hall
>>> www.meteor.iastate.edu/~jdduda <http://www.meteor.iastate.edu/%7Ejdduda><
>>> http://www.meteor.iastate.edu/%7Ejdduda>
>>> ------------------------------------------------------------------------
>>>
>>>
>>> _______________________________________________
>>> gradsusr mailing list
>>> gradsusr at gradsusr.org
>>> http://gradsusr.org/mailman/listinfo/gradsusr
>>>
>>>
>>
>> --
>>
>> Please note that Charles.Seman at noaa.gov should be considered my NOAA
>> email address, not cjs at gfdl.noaa.gov.
>>
>> ********************************************************************
>> Charles Seman                                Charles.Seman at noaa.gov
>> U.S. Department of Commerce / NOAA / OAR
>> Geophysical Fluid Dynamics Laboratory         voice: (609) 452-6547
>> 201 Forrestal Road                              fax: (609) 987-5063
>> Princeton, NJ  08540-6649            http://www.gfdl.noaa.gov/~cjs/<http://www.gfdl.noaa.gov/%7Ecjs/>
>> ********************************************************************
>>
>> "The contents of this message are mine personally and do not reflect any
>> official or unofficial position of the United States Federal Government,
>> the United States Department of Commerce, or NOAA."
>>
>>
>> *
>> *
>> * Subject: Re: Tracking Hurricanes
>> * From: Kun-Hsuan Chou <cwujou at TYPHOON.AS.NTU.EDU.TW>
>> * Date: Fri, 8 Oct 2004 08:03:20 +0800
>> * To: GRADSUSR at LIST.CINECA.IT
>> *
>> * Hi,
>> *
>> * I write a sample to track the maxminum wind speed, it should be the
>> script that you want.
>> *
>> 'd maxloc(max(mag(u,v),lon=120,lon=130),lat=15,lat=25)'
>>  line=sublin(result,2)
>>  ygrd=subwrd(line,4)
>> 'd maxloc(max(mag(u,v),lat=15,lat=25),lon=120,lon=130)'
>>  line=sublin(result,2)
>>  xgrd=subwrd(line,4)
>> 'set x 'xgrd
>> lonval = subwrd(result,4)
>> 'set y 'ygrd
>> latval = subwrd(result,4)
>> 'q w2xy 'lonval' 'latval
>> xpos = subwrd(result,3)
>> ypos = subwrd(result,6)
>> 'draw mark 1 'xpos' 'ypos' .2'
>>
>>
>> *============================================================================
>> *Kun-Hsuan Chou
>> *Postdoctoral Researcher
>> *Department of Atmospheric Sciences
>> *National Taiwan University
>> *No. 1, Sec. 4, Roosevelt Rd., Taipei 106, Taiwan.
>> *Phone:   886-2-23625896 ext. 243
>> *Mobile:  0920079247
>> *E-mail:   cwujou at typhoon.as.ntu.edu.tw
>> *----- Original Message -----
>> *From: Arturo Caracas Uribe
>> *To: GRADSUSR at LIST.CINECA.IT
>> *Sent: Thursday, October 07, 2004 11:48 PM
>> *Subject: Tracking Hurricanes
>> *
>> *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.
>> *Thanks in advance
>> *
>> *Arturo Caracas
>> *Atmospheric Sciences, México.
>>
>>
>> _______________________________________________
>> gradsusr mailing list
>> gradsusr at gradsusr.org
>> http://gradsusr.org/mailman/listinfo/gradsusr
>>
>>
>
>
>
>
>
> _______________________________________________
> gradsusr mailing list
> gradsusr at gradsusr.org
> http://gradsusr.org/mailman/listinfo/gradsusr
>
>


-- 
Jeff Duda
Iowa State University
Meteorology Graduate Student
3134 Agronomy Hall
www.meteor.iastate.edu/~jdduda
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://gradsusr.org/pipermail/gradsusr/attachments/20101026/83b676ad/attachment-0003.html 


More information about the gradsusr mailing list