adokter / bioRad

R package for analysis and visualisation of biological signals in weather radar data
http://adokter.github.io/bioRad
Other
29 stars 16 forks source link

incorrect range gate start attribute #650

Open adokter opened 9 months ago

adokter commented 9 months ago

reported by @jbuler:

I was using the bioRad function scan_to_spatial on the attached KDOX20130902_230351_V07.gz & KDOX20190101_000328_V06 NEXRAD files from KDOX. I noticed it assigns the first range gate as 125 m, instead of 2125 m, which is what other software show (Weather and Climate Toolkit). The pvol object for this file has an "rstart" value of 0. Is this the range to start of first gate? If so, it should be 2000. I can add the range gate offset myself, but wanted to bring this up in case there is a problem with bioRad in reading the range to first gate variable from the raw Level II files. I'm using bioRad version 0.7.3 and vol2birdR 1.0.1

adokter commented 2 months ago

This is strictly not a bug. The current implementation adds empty (nodata values) range gates for NEXRAD scans that do not start the first range gate at zero. In above example, the first 2000 m therefore contain empty values. See https://github.com/adokter/vol2birdR/blob/a45432284d07a5e9aadd87e5ba585c8baa6e8b0e/src/libvol2bird/librsl.c#L207 where the scan object is initialized. I agree it would be better to use a nonzero rstart value. This issue will need to be transferred to vol2birdR repo in order to fix