-
Notifications
You must be signed in to change notification settings - Fork 270
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Possible bug in Radar.get_gate_area() #1374
Comments
@jtcarlin Thanks for the heads up! I'll take a look into this, do you have an example file or datetime for that nexrad archive that I can use for testing? |
Thanks for looking into this! I've tried to attach an example file, but just in case it doesn't work, 2022-02-25 at 13:25:14 UTC from KENX is one example (although I've now seen this in multiple cases). Let me know if I can be of any further help looking into this. |
If I understand the code correctly, trying to think would in theory, adding 360 to the diff product work. Example indexed azimuth with the values below gives the -359.5111083984375 value: azimuths[466] - azimuths[465] the actual difference is 0.4888916015625 So if we add 360 to that product should give us the same. Thinking the code: Trying to think of scenarios where this wouldn't work... |
I think that solution works and is quite elegant! I was going to propose simply adding 360 to all of the azimuths prior to taking the difference to ensure there's no wrapping, which may be equivalent to your solution but unnecessary. |
I'll submit a PR and have it reviewed! Thanks again for raising the issue! Once I get the code in, let me know if the values seem more reasonable. Area max looks to drop from: |
Can we close this? Thanks for submitting that fix @zssherman |
When using radar.get_gate_area() applied to archived NEXRAD files, I am seeing a spike in the calculated areas when the azimuth wraps from 359 back to 0 deg. It appears this wrapping is not taken into account when calculating d_azimuths, resulting in an erroneously large d_azimuth.
The text was updated successfully, but these errors were encountered: