pyart icon indicating copy to clipboard operation
pyart copied to clipboard

changes to comp_z

Open dopplerchase opened this issue 1 year ago • 6 comments
trafficstars

Code for issue #1559, where composite reflectivity code carried artifacts through with poor quality radar data from velocity sweeps. I also made a change to the interpolator because it was flagged as depreciated (e.g., scipy.interpolate.interp2d).

  • [X] Closes #1559

This is now open for comment from the maintainers! Happy to make changes as needed.

Example usage:

compz = pyart.retrieve.composite_reflectivity(radar, field="reflectivity")

image

The code is flexible, and allows you to still have the old functionality through the simple bool:

compz = pyart.retrieve.composite_reflectivity(radar, field="reflectivity",same_nyquist=False)

image

dopplerchase avatar Apr 15 '24 16:04 dopplerchase

@dopplerchase Thanks for the PR! The errors seem to be PEP8 fixes.

zssherman avatar Apr 15 '24 17:04 zssherman

@dopplerchase - is there anything we can do to help here?

mgrover1 avatar Apr 29 '24 14:04 mgrover1

@mgrover1 find me some more time? lol We need to think carefully about Ryan's comments noted on https://github.com/ARM-DOE/pyart/issues/1559

dopplerchase avatar Apr 29 '24 15:04 dopplerchase

no worries 😄 that is a good point!!

mgrover1 avatar Apr 29 '24 15:04 mgrover1

I'm glad to hear that someone has encountered a similar bug. When directly using the function pyart.retrieve.composite_reflectivity, I found that the interpolated composite reflectivity values are all NaN. Upon diving into the source code, I was prompted to change the interpolation method. However, when attempting to modify it with alternative interpolation methods, I encountered an error indicating that the number of azimuth angles per layer in my radar data is inconsistent, thereby preventing a smooth interpolation process.

decadeneo avatar May 13 '24 03:05 decadeneo

@mgrover1 I'm seeing the testing fail due to the depreciation of interp2d, we might need to do a PR just with the depreciation change. I can work on that.

zssherman avatar Jun 25 '24 15:06 zssherman