Open ytao579 opened 5 years ago
I've answered the question regarding the difference from PyART on StackOverflow.
I'm going to leave this open as a reminder that we should probably do better (when we clean up the rest of the NEXRAD reading code) and do the proper ground range calculation.
https://github.com/Unidata/MetPy/blob/2e7deea7798176bcbadf0860a2cbe6c392f8954d/examples/formats/NEXRAD_Level_2_File.py#L52
Hi, I was looking at this coord calculation in Metpy and comparing how pyart calculate the coordinates (x, y = display._get_x_y(sweep, True, True)), seems very different.
In Metpy example, the coords are calculated as (NEXRAD_Level_2_File):
However, in Pyart, it's a much more complex calculation: in its antenna_to_cartesian method (called by get_gate_x_y_z in radar.py), it is doing:
And I was using both Metpy and Pyart example to plot a NEXRAD data file, the result are very different, can some one please help me to understand why they calculate the coordinates differently and which one is right?
Thanks, ytao