vertices = [(0, 0), (0, 3), (4, 3), (4, 0), (3, 0), (3, 2), (1, 2), (1, 1),
    (2, 1), (2, 0)]
for cell in polygon(vertices):
    pass
Find irregular region in 4D numpy array of gridded data (lat/lon)