Summary
For IRIS/Sigmet RAW files, DB_HCLASS (type 55, 8-bit hydrometeor class) is returned as unsplit int16 words — each element packs TWO 8-bit class values — instead of one class per range bin like the other 8-bit types.
MRE (public IDEAM file)
import fsspec, numpy as np
from xradar.io.backends.iris import open_iris_datatree
url = "s3://s3-radaresideam/l2_data/2024/06/01/Guaviare/GUA240601000308.RAWFXK0"
with fsspec.open(f"simplecache::{url}", s3={"anon": True}) as f:
local = f.name
ds = open_iris_datatree(local)["sweep_0"].ds
print(ds["DB_HCLASS"].dtype, np.unique(ds["DB_HCLASS"].values)[:8])
# int16 [ 0 9 17 105 106 108 2304 2313]
4369 == 0x1111 and 27756 == 0x6C6C are two packed uint8 classes. A byte-level decode of the same rays gives per-bin classes {0, 9, 17, 105–108}, and word == byte0 + 256*byte1 holds element-for-element over the first nbins // 2 columns — the rest of the range dim is not meaningful per-bin data.
Expected
Per-bin uint8 classes (the same 2-bins-per-word unpacking the scaled 8-bit types get). Likely cause: SIGMET_DATA_TYPES[55] has func=None, and the func-less path skips the pair unpacking.
xradar 0.12.1.dev9+gd723857f2 (main), Python 3.12.
Summary
For IRIS/Sigmet RAW files,
DB_HCLASS(type 55, 8-bit hydrometeor class) is returned as unsplit int16 words — each element packs TWO 8-bit class values — instead of one class per range bin like the other 8-bit types.MRE (public IDEAM file)
4369 == 0x1111and27756 == 0x6C6Care two packed uint8 classes. A byte-level decode of the same rays gives per-bin classes{0, 9, 17, 105–108}, andword == byte0 + 256*byte1holds element-for-element over the firstnbins // 2columns — the rest of the range dim is not meaningful per-bin data.Expected
Per-bin
uint8classes (the same 2-bins-per-word unpacking the scaled 8-bit types get). Likely cause:SIGMET_DATA_TYPES[55]hasfunc=None, and the func-less path skips the pair unpacking.xradar
0.12.1.dev9+gd723857f2(main), Python 3.12.