mpas_tools.io.open_mfdataset
- mpas_tools.io.open_mfdataset(paths, engine=None, logger=None, **kwargs)[source]
Open a multi-file
xarray.Datasetfrom NetCDF files, accounting for quirks specific to MPAS components. This is a thin wrapper aroundxarray.open_mfdataset()that selects the NetCDFenginefrommpas_tools.io.default_enginewhenengineis not given.See
mpas_tools.io.open_dataset()for why specifying anengineexplicitly (viampas_tools.io.default_engine) is useful forNETCDF3_64BIT_DATA(CDF5) files.- Parameters:
paths (str or sequence of str or path-like) – The paths to the NetCDF files to open, passed on to
xarray.open_mfdataset()engine ({'netcdf4', 'scipy', 'h5netcdf'}, optional) – The library to use for reading the NetCDF files. The default is
mpas_tools.io.default_engine, which can be modified but which defaults toNone(xarray auto-selects the backend)logger (logging.Logger, optional) – A logger to write messages to. Reserved for future diagnostics; no error recovery is performed because the CDF5 backend-sniffing failure is a hard crash that cannot be caught.
**kwargs – Additional keyword arguments passed on to
xarray.open_mfdataset()(e.g.combine,concat_dim,decode_times)
- Returns:
ds (xarray.Dataset) – The opened dataset