Re: find location of max along a center line

From: Kara Yedinak <kyedinak_at_nyahnyahspammersnyahnyah>
Date: Wed Nov 10 2010 - 12:33:22 MST

Hi Dennis,

  I can see how that is unclear. I am looking for the physical location of
the occurrence of a maxima

I have used:

g420 = GRNHX(:,420,:) ; gwork(t,x) dimension #s 0 and 1
 printVarSummary(g420)
                              ; at each time find the max value
 gmax = dim_max_n( g420, 1) ; gmax(t)

Which returns the value (magnitude) of the maximum. I am hoping to find the
location of this maximum magnitude. I have not seen the command
dim_max_n_Wrap before. I just tried searching for it on the main NCL page
and could not find it. If you think this is the tool I need, would you mind
pointing me in the right direction?

Thanks,
Kara

On Wed, Nov 10, 2010 at 11:26 AM, Dennis Shea <shea@ucar.edu> wrote:

> Hi Kara
>
> It is not clear what you want. When you say
> "maximum value location (x)"
> Do you mean the index (subscript) at which
> the max value occurs? Or, do you want the max value?
> Something like ...
>
>
> g420 = GRNHX(:,420,:) ; gwork(t,x) dimension #s 0 and 1
> printVarSummary(g420)
> ; at each time find the max value
> gmax = dim_max_n( g420, 1) ; gmax(t)
> or
> gmax = dim_max_n_Wrap( g420, 1) ; contributed.ncl
>
> print(gmax)
>
>
>
> On 11/10/2010 12:07 PM, Kara Yedinak wrote:
>
>> Hello all,
>>
>> I would like to read in a 3D variable GRNHX(t,y,x) and find the
>> maximum value location (x) along y=420 for each time step. dim_max_n
>> returns the maximum value of GRNHX as a fxn of x and t, but over ALL
>> values of y. Likewise performing dim_max_n on GRNHX(t,420,x) returns
>> the maximum value of GRNHX as a fxn of t only. Anyone have an idea how
>>
>>

-- 
Absence of evidence is not evidence of absence.         Carl Sagan

_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Wed Nov 10 12:33:36 2010

This archive was generated by hypermail 2.1.8 : Mon Nov 15 2010 - 08:55:22 MST