FINDLO(A,XRANGE,YRANGE) Find local minima of a variable.
Arguments: |
A |
Variable in x and y, may be a function of z and/or t |
XRANGE |
Range in data units of the X radius in which the function looks for minima |
|
YRANGE |
Range in data units of the Y radius in which the function looks for minima |
|
Result Axes: |
X |
ABSTRACT |
Y |
ABSTRACT: j=1:3 |
|
Z |
Inherited from A |
|
T |
Inherited from A |
The minima are listed along the X axis: j=1 contains the X locations of the points, j=2 contains the Y coordinates of the points, and j=3 contains the function values at the minima.
This function looks for the minimum gridded value in the neighborhood x+/- XRANGE, Y+/- YRANGE. It returns only values in the interior of the region, not on boundaries. It is an implementation of the NCAR graphics routine "minmax".
The GO script label_hi_lo.jnl makes it easy to call this function and label and label low's and high's with either their numerical value or the letters L and H. Run the demonstration script minmax_label_demo.jnl
Also try the script bullseye.jnl which locates and marks a "bullseye", i.e. a local minimum or maximum in a 2-D field within a user-specified region.
Example:
The function can find a set of local minima, but here we find the overall minimum.
In this case it's necessary to call the function on the variable after filling it with a mean value. The method stops along lon/lat in either direction that do not represent the range requested. For local minima or maxima this is useful: we do not search across a landmass for instance. But for global data we want to search all of each direction.
yes? use coads_climatology ! define a variable containing the desired region as well as any other modifications. yes? let/like=slp/title="`slp,return=title` filled with mean value" var = missing(slp[L=7], slp[l=7, x=@ave,y=@ave]) ! define the findlo operation to use yes? let low = findlo(var, 360, 180) yes? shade var ! Draw a mark at the low location found and make a label with its value. yes? plot/vs/over/nolab/color=red/thick/siz=0.2 low[i=1,j=1], low[i=1,j=2] yes? annotate/norm/xpos=1/ypos=1.05/halign=1/siz=0.1 "Location of lowest value= `low[i=1,j=3],prec=6`"
See the FINDHI documentation for more examples.