pvtend.sampled_longest_contours

pvtend.sampled_longest_contours(field2d: ndarray, x_coords: ndarray, y_coords: ndarray, try_levels: int = 300, max_keep: int = 12, min_vertices: int = 30) list[dict][source]

Sample the longest contours on a LOCAL patch (legacy helper).

Deprecated since version 0.4.0: Prefer circumpolar_contours + crop_contour_to_patch.

Parameters:
  • field2d – 2D field to contour (e.g., geopotential height).

  • x_coords – 1D x-axis values (relative longitude degrees).

  • y_coords – 1D y-axis values (relative latitude degrees).

  • try_levels – Number of levels to probe between min/max.

  • max_keep – Maximum number of contours to retain.

  • min_vertices – Minimum vertices for valid contour.

Returns:

‘lev’, ‘x’, ‘y’.

Return type:

List of dicts with keys