XarrayLoader#
- class XarrayLoader(params=None, **kwargs)#
Bases:
LoaderAbstract[str|PathLike,Dataset]Load from single source with Xarray.
Uses
xarray.open_dataset()orxarray.open_mfdataset()to open data.- Parameters:
params (Any | None)
kwargs (Any)
- load_data_concrete(source, **kwargs)#
Load data.
- Parameters:
source (str | PathLike | Sequence[str | PathLike]) – Sequence of files containing data.
kwargs (Any) – Arguments passed to
xarray.open_dataset(). They will take precedence over the default values of the class attributeopen_dataset_kwargsandopen_mfdataset_kwargs.
- Return type:
- open_dataset_kwargs: dict[str, Any] = {}#
Options passed to
xarray.open_dataset().DataInterface.get_data()kwargs take precedence.
- open_mfdataset_kwargs: dict[str, Any] = {}#
Options passed to
xarray.open_mfdataset().DataInterface.get_data()kwargs take precedence.
- preprocess()#
Return a function to preprocess data.
If
preprocessinopen_mfdataset_kwargsis True, the function will be used for the corresponding open_mfdataset argument. The function should take in and return a dataset.