xdas.open_mfdatacollection#

xdas.open_mfdatacollection(paths, dim='first', tolerance=None, squeeze=False, verbose=False, parallel=None)[source]#

Open a multiple file DataCollection.

Files matching the wildcarded paths string will be opened and combined into one data collection. Each opened file must be a DataCollection. The data arrays nested inside the data collections are concatenated by their position within the data collection hierarchy using combine_by_field.

For exemple, it can be used to combine daily data collections into one master data collection.

Parameters:
  • paths (str or list) – The path names given as a shell-style wildcards string or a list of paths.

  • dim (str, optional) – The dimension along which the data arrays are concatenated. Default to “first”.

  • tolerance (float or timedelta64, optional) – During concatenation, the tolerance to consider that the end of a file is continuous with beginning of the following one. For time coordinates, numeric values are considered as seconds. Default to zero tolerance.

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

  • parallel (bool or int, optional) – Whether to use multiprocessing to fetch file metadata. If False or 1, runs in single-process mode. If an integer, use that many processes. If True, use as many processes as available cores. If None, use the global xdas configuration. Default to None.

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

Returns:

The combined data collection

Return type:

DataCollection