xradar.io.backends.discover.discover_engine#
- xradar.io.backends.discover.discover_engine(filename_or_obj)[source]#
Find the xradar engine which can open the given file.
Each xradar backend checks the file with its
guess_can_open(format signatures, e.g.AR2Vfor NEXRAD Level II,ODIM_H5conventions in HDF5 files), seelist_xradar_engines().- Parameters:
filename_or_obj (
str,os.PathLike,bytesor file-like) – Radar file.- Returns:
engine (
str) – Name of the engine, to be used with e.g.xr.open_dataset(filename, engine=engine, group="sweep_0").- Raises:
ValueError – If no xradar engine can open the file.
Examples
>>> engine = xd.io.discover_engine(filename) >>> ds = xr.open_dataset(filename, engine=engine, group="sweep_0")