xdas.combine_by_field#

xdas.combine_by_field(objs, dim='first', tolerance=None, squeeze=False, virtual=None, verbose=False)[source]#

Combine data collections by field along a dimension.

The data arrays nested into each data collections are first grouped by their hierachical position. Data sequences are appended to each other such as each group consist of a list of data arrays which order is first given by the order of the objs data collections, and second by the order of the data array within its data sequence (if part of any sequence). Each group is eventually combined using combined_by_coords.

Parameters:
  • objs (list of DataCollection) – The data collections to combine.

  • dim (str, optional) – The dimension along which concatenate. Default to “first”.

  • tolerance (float or timedelta64, optional) – The tolerance to consider that the end of a file is continuous with beginning of the following. For time coordinates, numeric values are considered as seconds. Zero by default.

  • squeeze (bool, optional) – Whether to return a Database instead of a DataCollection if the combinatison results in a data collection containing a unique Database.

  • virtual (bool, optional) – Whether to create a virtual dataset. It requires that all concatenated dataarrays are virtual. By default tries to create a virtual dataset if possible.

  • verbose (bool) – Whether to display a progress bar. Default to False.

Returns:

The combined data collection.

Return type:

DataCollection