argopy.ArgoIndex.iterfloats

argopy.ArgoIndex.iterfloats#

ArgoIndex.iterfloats(index=False, chunksize: int | None = None)#

Iterate over unique Argo floats in the full index or search results

By default, iterate over a single float, otherwise use the chunksize argument to iterate over chunk of floats.

Parameters:
  • index (bool, optional, default=False) – Passed to ArgoIndex.read_wmo in order to choose if we iterate over all WMOs of the index or only those matching search results.

  • chunksize (int, optional) –

    Maximum chunk size

    Eg: A value of 5 will create chunks with as many as 5 WMOs each.

Return type:

Iterator of ArgoFloat

Examples

Example of iteration#
# Make a search on Argo index of profiles:
idx = ArgoIndex().search_lat_lon([lon_min, lon_max, lat_min, lat_max])

# Then iterate over float matching the results:
for float in idx.iterfloats():
    float # is a ArgoFloat instance