openradar / xradar

A tool to work in weather radar data in xarray
https://docs.openradarscience.org/projects/xradar
MIT License
85 stars 17 forks source link

integer overflow when calculating azimuth in FURUNO scn files #137

Closed giacant closed 8 months ago

giacant commented 8 months ago

Description

Problem with calculation of the azimuth values in a specific file at these lines: https://github.com/openradar/xradar/blob/6880b0cbfaff92a084e07bfefcc0f63bdc826535/xradar/io/backends/furuno.py#L365-L366

1010_radar.scn[22020].gz

What I Did

If you look this post, you can see what i did

https://openradar.discourse.group/t/problem-with-snc-file/335/3

kmuehlbauer commented 8 months ago

OMG, what a terrible bug. Here we have a nice example of integer overflow.

My guess why this did not surface earlier is, that the azimuth_offset was always less than 29526 (65536 - 36000).