xdas.open_mfdataarray#
- xdas.open_mfdataarray(paths, dim='first', tolerance=None, squeeze=True, engine=None, parallel=None, verbose=False, **kwargs)[source]#
Open a multiple file dataset.
Each file described by path will be opened as a data array. The data arrays are then combined along the dim dimension using combine_by_coords. If the coordinates of the data arrays are not compatible, the resulting object will be split into a sequence of data arrays.
- 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.
engine (str or callable, optional) – The type of file to open or a read function. Default to xdas netcdf format.
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.
**kwargs – Additional keyword arguments to be passed to the read function.
- Returns:
The data array containing all files data. If different acquisitions are found, a DataSequence is returned.
- Return type:
- Raises:
FileNotFound – If no file can be found.