numbacs.extraction.elliptic

Module Contents

numbacs.extraction.elliptic.rotcohvrt(lavd, x, y, r, convexity_method='convex_hull', convexity_deficiency=0.005, min_val=-1.0, nlevs=20, start_level=0.0, end_level=0.0, min_len=0.0)[source]

Compute rotationally coherent vortices which are (approximately) convex closed contours of the lavd (or ivd) field.

Parameters:
  • lavd (np.ndarray, shape = (nx,ny)) – array containing lavd values.

  • x (np.ndarray, shape = (nx,)) – array containing x-values.

  • y (np.ndarray, shape = (ny,)) – array containing y-values.

  • r (float) – radius in which points will be discared after a maximum is found at the center.

  • convexity_method (str, optional) – method used to determine if closed curve is convex, options are ‘convex_hull’ which calculates the relative difference in area of the curve and its convex hull, ‘angle’ which checks if angle between succesive edges exceeds convexity_deficiency in the negative direction. The default is ‘convex_hull’.

  • convexity_deficiency (float, optional) – value used to allow convexity deficiency up to this value, if ‘convex_hull’ method is used this is the allowable relative difference in area, if ‘angle’ method is used this is the allowable angle. The default is 5e-3.

  • min_val (float, optional) – minimum value allowed for maxima of the lavd field, if equals -1.0, the 80th percentile of the lavd is used. The default is -1.0.

  • nlevs (int, optional) – number of levels of contours to use when searching for convex curves. The default is 20.

  • start_level (float, optional) – starting level of contours for search, if equals 0.0 then the 70th percentile of the lavd is used. The default is 0.0.

  • end_level (float, optional) – value for last contour level to be checked, if equals 0.0 then the maximum of the lavd is used. The default is 0.0.

Returns:

rcv – list containing rotationally coherent vortices and corresponding vortex centers.

Return type:

list