geocat.viz.util.findLocalExtrema

geocat.viz.util.findLocalExtrema#

geocat.viz.util.findLocalExtrema(da, highVal=0, lowVal=1000, eType='Low', eps=10)#

Deprecated since version 2023.02.0: The findLocalExtrema function is deprecated due to naming conventions. Use find_local_extrema() instead.

Utility function to find local low/high field variable coordinates on a contour map. To classify as a local high, the data point must be greater than highval, and to classify as a local low, the data point must be less than lowVal.

Parameters:
  • da (xarray.DataArray) – Xarray data array containing the lat, lon, and field variable (ex. pressure) data values

  • highVal (int) – Data value that the local high must be greater than to qualify as a “local high” location. Default highVal is 0.

  • lowVal (int) – Data value that the local low must be less than to qualify as a “local low” location. Default lowVal is 1000.

  • eType (str) – ‘Low’ or ‘High’ Determines which extrema are being found- minimum or maximum, respectively. Default eType is ‘Low’.

  • eps (float) – Parameter supplied to sklearn.cluster.DBSCAN determining the maximum distance between two samples for one to be considered as in the neighborhood of the other. Default eps is 10.

Returns:

clusterExtremas (list) – List of coordinate tuples in GPS form (lon in degrees, lat in degrees) that specify local low/high locations

Examples

See this example notebook: find_local_extrema.

More in-depth plotting examples that utilize this function are in the GeoCAT-Examples Gallery. To see more usage cases, search the function on the website.