xradar.io.backends.imd.group_imd_files#
- xradar.io.backends.imd.group_imd_files(paths)[source]#
Group IMD sweep files into volumes by filename stem.
IMD distributes one sweep per file. Files of a single volume share a common stem ending in
.nc; additional sweeps in the same volume get numeric suffixes:GOA210515003646-IMD-C.nc <- sweep 0 GOA210515003646-IMD-C.nc.1 <- sweep 1 ... GOA210515003646-IMD-C.nc.9 <- sweep 9
A new volume changes the timestamp component of the stem.
- Parameters:
paths (
str,Path, oriterableofthose) –A directory path – all IMD files inside are grouped.
A glob pattern string – files matching the glob are grouped.
An iterable of file paths – grouped as-is.
- Returns:
list[list[str]]– One list of absolute paths per detected volume, inner lists in sweep order (.nc,.nc.1, …).
Examples
>>> import xradar as xd >>> for group in xd.io.group_imd_files("/data/goa"): ... dtree = xd.io.open_imd_datatree(group)