nasa/PyTDA

Issues computing radar gate location

meteoswiss-mdr opened this issue · 3 comments

I was trying to use PyTDA with data from the MeteoSwiss radars. I encountered issues because some of the radar gates coordinates computed using the PyTDA functions resulted in NaN values and function "_calc_tree" was consequently crashing.

I solved my problems by using the radar gate coordinates directly from the Py-ART radar object instead of those computed by PyTDA. To do so I added a keyword compute_gate_pos to PyTDA. You can check what I did in my forked version of PyTDA:
https://github.com/meteoswiss-mdr/PyTDA/blob/master/pytda/pytda.py
At least visually it looks like I get the same data regardless of whether the coordinates are computed inside PyTDA or a given (I tested it using elevations where I did not get any NaN value).

You may want to add the possibility to not compute the coordinates (it saves time) and investigate why you get NaN values for certain geometries and what to do about them. If you need further clarifications let me know.

Greetings from Switzerland!

Thanks, this looks like a useful change. That original lat/lon code is old and stems from the days when Py-ART didn't provide such things as easily. Your suggested fix is a nice way to enable new Py-ART functionality while ensuring backwards compatibility with the old method. Can you submit this as a PR?

Hi @tjlang. I submitted the PR as requested. Let me know if there is something that needs clarifying.

Addressed by #13, closing ...