[gradsusr] Finding max wind over a time period

Jeff Duda jeffduda319 at gmail.com
Mon Sep 23 15:35:17 EDT 2013


Matt,
Finding the maximum wind speed over a time interval is simple.  Finding the
direction at the time of max wind speed (which I assume is what you are
looking for) is not quite so simple.

Max speed:
With your dimension environment set to varying in X and Y (but not T), 'd
max(mag(u,v,),t=t1,t=t2)', where t1 and t2 are time index values
corresponding to the start and end of the 12Z - 21Z time range in your
control file

Direction:
You need to create a dummy field of values.  This is as easy as creating a
new array (but give it the name of the final array you want), so something
like 'd maxdirection = tmp2m'.  Any existing field in your data set is fine
- you just need to create it.  You'll then use the set defval command to
overwrite the values of that new field with the values of the wind
direction.  To find the direction, you'll have to use a script and use the
maxloc command to get the value of the time index at which the maximum wind
speed occurs at a given point.  Then set the dimension environment time
index to that value and compute the wind direction at the point using the
formula

meteorological direction = 270 - mathematical direction

where you'll use the atan2(u,v) to compute the mathematical direction (as
an example, if the wind is due westerly with v = 0, the atan2 function will
return the value of 0, so 270 - 0 = 270, which is from the west like you
want).  Then you write that value to the field using the set defval
command.  After you've finished defining at every point, 'd maxdirection'.

NOTE: using set defval to essentially create a new field defined pointwise
can be a computationally expensive exercise, especially if the field is
complicated (not unlike what you're doing) and if the grid is large.  So
hopefully you don't need to do this frequently or in a short amount of
time.  There may be a better way to do this, but this is the only way I
know how.

Jeff Duda


On Mon, Sep 23, 2013 at 1:23 PM, Matt Bunkers - WFO UNR <
matthew.bunkers at noaa.gov> wrote:

> Hi,
>
> I have a gridded dataset and would like to find the maximum wind speed and
> the corresponding direction over a period of time.  For example, given u-
> and v-components for 12z, 15z, 18z, and 21z, what is the maximum wind
> speed/direction for each grid point over this time range?
>
> Thanks,
>
> -- Matt
>
> _______________________________________________
> gradsusr mailing list
> gradsusr at gradsusr.org
> http://gradsusr.org/mailman/listinfo/gradsusr
>
>


-- 
Jeff Duda
Graduate research assistant
University of Oklahoma School of Meteorology
Center for Analysis and Prediction of Storms
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://gradsusr.org/pipermail/gradsusr/attachments/20130923/b5f67e4e/attachment-0001.html 


More information about the gradsusr mailing list