load_from_folder#
- rojak.core.data.load_from_folder(path_to_folder, glob_pattern='*.nc', chunks=None, engine=NetcdfEngine.NETCDF4, is_decoded=True, **open_kwargs)[source]#
Lazily load and concatenate every file matching
glob_patternin a folder into a single DatasetThin wrapper around
rojak.core.sources.open_dataset()with aFilesLocation, kept for backwards compatibility. Prefer configuring aDataLocationinstead.- Parameters:
path_to_folder (Path) – Directory containing the data files
glob_pattern (str) – Glob pattern (relative to
path_to_folder) matching the files to load. Defaults to"*.nc".chunks (Mapping | None) – Dask chunking to use, passed to
xarray.open_mfdataset(). Must not beNone.engine (NetcdfEngine) – Backend engine used to read the files. Defaults to
"netcdf4".is_decoded (bool) – Whether to decode coordinates, CF conventions, and timedeltas on load. Defaults to
True.**open_kwargs (Any) – Additional keyword arguments passed to
xarray.open_mfdataset(), seerojak.core.sources.open_dataset()
- Returns:
Dataset formed by concatenating every matching file
- Raises:
ValueError – If
chunksisNone- Return type:
xr.Dataset