load_data#
- load_data(result: Dataset | DataArray | str | Path | Result, dataset_name: str | None = None, *, _stacklevel: int = 2) Dataset[source]#
Extract a single dataset from a
DatasetConvertibleobject.- Parameters:
result (DatasetConvertible | Result) – Result class instance, xarray Dataset or path to a dataset file.
dataset_name (str | None) – Name of a specific dataset contained in
result, if not provided the first dataset will be extracted. Defaults to None._stacklevel (int) – Stacklevel of the warning which is raised when
resultis of classResult, contains multiple datasets and nodataset_nameis provided. Changing this value is only required if you use this function inside of another function. Defaults to 2
- Returns:
Extracted dataset.
- Return type:
xr.Dataset
- Raises:
TypeError – If
resultisn’t aDatasetConvertibleobject.