Skip to main content
  • Home
  • Documentation
  • FAQ
  • Downloads
  • Support
  • Current Release Notes
  • Ferret Users Guide
    • Users Guide Index
    • Commands Reference
    • 1. Introduction
    • 2. Data Set Basics
    • 3. Variables & Expressions
    • 4. Grids & Regions
    • 5. Animations & Gif Images
    • 6. Customizing Plots
    • 7. Handling String Data Symbols
    • 8. Working with Special Data Sets
    • 9. Computing Environment
    • 10. Converting to NetCDF
    • 11. Writing External Functions
    • Glossary
    • Appendix A: Functions
    • Appendix B: PPLUS Guide
    • Appendix C: Ferret-Specific PPLUS Enhancements
  • Previous Release Notes
  • Tutorials and Demos
    • Ferret Tour
    • DSG files: Discrete Sampling Geometries Demo
    • Ferret sorting demo
    • Fast Fourier Transforms demo
    • Empirical Orthogonal Functions demo
    • Ferret objective analysis demo
    • Ferret Palette Demo
    • Map projections
    • Ferret polygon vector demo
    • Ferret Graticules demo
    • Ferret Polytube Demo
    • Ferret Polymark Demo
    • Ferret Constant-Array demo
    • Ferret land_detail demo
    • COADS Tour
    • Levitus Tour
    • Use OPeNDAP
    • Ferret binary read demo
  • PyFerret
    • PyFerret Downloads and Install ../../faq/ferret-faqs.html
    • What is PyFerret?
    • Why use PyFerret?
    • PyFerret for the Ferret user
    • PyFerret command syntax: quick-start notes
    • PyFerret for the Python user
    • Graphics in PyFerret ?
    • New Ferret functionality
    • PyFerret Python functions and constants
    • PyFerret Python objects and methods
    • Ferret external functions in Python
    • Ferret Fortran external functions
    • PyFerret metadata-and-data dictionaries
  • OPeNDAP
    • OPeNDAP usage in Ferret
    • Use OPeNDAP Demo
    • Test OPeNDAP

FINDLO

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.