[gradsusr] How do I know which time step in max(xx, t=x, t=y) is actually the max?

Roberto Mera RMera at ucsusa.org
Thu Jun 26 10:56:08 EDT 2014


Stephen,

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.

Robert
________________________________
From: gradsusr-bounces at gradsusr.org [gradsusr-bounces at gradsusr.org] on behalf of Stephen McMillan [smcmillan at planalytics.com]
Sent: Thursday, June 26, 2014 10:50 AM
To: GrADS Users Forum
Subject: Re: [gradsusr] How do I know which time step in max(xx, t=x, t=y) is actually the max?

Robert,
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.

Documentation in GrADS Index, but has no examples.

Stephen McMillan


On Thu, Jun 26, 2014 at 10:20 AM, Roberto Mera <RMera at ucsusa.org<mailto:RMera at ucsusa.org>> wrote:
All,

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.

I can get the max to write out using this function:

count = 1
while (count < 18)
'set e 'count
'areal=aave(maskout(ave(field88,t=1,t=6),mskgrd(t=1)),x=147,x=250,y=94.1815,y=182.057)'
'd areal'
areal=subwrd(result,4)
say areal
if (rc != 0) ; break ; endif
count = count +1
endwhile


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).

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.

Robert

_______________________________________________
gradsusr mailing list
gradsusr at gradsusr.org<mailto:gradsusr at gradsusr.org>
http://gradsusr.org/mailman/listinfo/gradsusr



***************************************************
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.
***************************************************


-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://gradsusr.org/pipermail/gradsusr/attachments/20140626/36683cc1/attachment-0001.html 


More information about the gradsusr mailing list