glidertools.utils.group_by_profiles

glidertools.utils.group_by_profiles(ds, variables=None)

Group profiles by dives column. Each group member is one dive. The returned profiles can be evaluated statistically, e.g. by pandas.DataFrame.mean or other aggregating methods. To filter out one specific profile, use xarray.Dataset.where instead.

Parameters:
  • ds (xarray.Dataset) – 1-dimensional Glider dataset

  • variables (list of strings, optional) – specify variables if only a subset of the dataset should be grouped into profiles. Grouping only a subset is considerably faster and more memory-effective.

Returns:

  • profiles

  • dataset grouped by profiles (dives variable), as created by the

  • pandas.groupby methods.