pyart icon indicating copy to clipboard operation
pyart copied to clipboard

Composite Reflectivity Function

Open dopplerchase opened this issue 2 years ago • 1 comments

Hello pyart'ers,

Since moving out west, the low level radar scans show lack luster echoes. Often times I use composite reflectivity on radar scope for quick looks at storms. One day, I wanted to plot composite Z with pyart, thinking there was a function to do this, but upon looking I could not find one. Hence I sought out to do this with some code. The trick I took here was sorting each sweeps azimuth such that the order of the matrix is the same for every single sweep. What this enables is the .max() call on the reordered matrix at the end.

Spot tests seem to work, but a full quantitative analysis has not been done.

dopplerchase avatar Aug 11 '22 02:08 dopplerchase

@dopplerchase I think you need to add it to the pyart/retrieve/__init__,py file to expose that function

mgrover1 avatar Aug 11 '22 16:08 mgrover1

@dopplerchase - I can help with some of these changes if you'd like (especially integrating the gatefilter in here). Is that something you would be interested in?

mgrover1 avatar Aug 24 '22 14:08 mgrover1

Yeah I have 0 experience implementing a gatefilter. It would be best if you can help with that

dopplerchase avatar Aug 24 '22 15:08 dopplerchase

Yeah I have 0 experience implementing a gatefilter. It would be best if you can help with that

Happy to help :)

mgrover1 avatar Aug 24 '22 15:08 mgrover1

@dopplerchase With going the radar object route, with composite reflectivity, what typically is used for other fields for this data. Example, what would fixed angle be set to? Time array? etc just trying to figure out what to set these fields to, and not entirely familiar what is used as the defaults for a composite field.

zssherman avatar Sep 13 '22 19:09 zssherman

@zssherman just let me know when this is ready for a review!

mgrover1 avatar Sep 14 '22 20:09 mgrover1

@mgrover1 I still need to do the radar object return, was waiting on dopplerchase for the response on attributes and which values to use for time, azimuth etc, if we are doing one sweep we can return a radar.extract_sweeps.

zssherman avatar Sep 14 '22 20:09 zssherman

Hey sorry guys, busy time for me right now. As for the attributes, could you elaborate more on what you need? or point me to an example?

dopplerchase avatar Sep 14 '22 22:09 dopplerchase

@dopplerchase No worries! My question more pertained, if we return a radar object, for a composite radar, should the fixed angle be 0? elevations etc, wasn't sure how these values get defined for a composite field, or if we take the mean of these fields? Because one way, i this is one sweep, is just use the radar.extract_sweeps 0 sweep and have a radar set up for that, however if we are setting the azimuth using 360 or 720 if it will differ from the nrays of one sweep. Can we define the resolution from instrument parameters so it matches the original radar, or is it better to allow the user to set that?

zssherman avatar Sep 14 '22 22:09 zssherman

@zssherman how can I help here? I think this would be great to include in the upcoming release!

mgrover1 avatar Sep 19 '22 15:09 mgrover1

@mgrover1 I think the only thing left is plugging everything into a radar class similar to what's done in the ios like the nexrad or cfradial readers. I'm trying to remember what Scott said on Thursday of values to use. Think fixed angle as 0.

zssherman avatar Sep 19 '22 15:09 zssherman

@mgrover1 I think the only thing left is plugging everything into a radar class similar to what's done in the ios like the nexrad or cfradial readers. I'm trying to remember what Scott said on Thursday of values to use. Think fixed angle as 0.

Yeah! Fixed angle of 0, treating it as a single sweep of a radar

mgrover1 avatar Sep 19 '22 15:09 mgrover1

@mgrover1 Tests failed due to a newer matplotlib version, I fixed it, but we will have to update the radarmapdisplay and gridmapdisplay plot_colorbar to make ax as a parameter and not optional.

zssherman avatar Sep 20 '22 01:09 zssherman

Okay - @zssherman @dopplerchase this should be ready to go. I added in the example in the last commit, which resulted in the following image:

test_image

mgrover1 avatar Sep 20 '22 21:09 mgrover1

@mgrover1 only thing left i see is the reference

zssherman avatar Sep 20 '22 21:09 zssherman

@zssherman after searching for a bit, I could not find a good reference. @dopplerchase any thoughts here? If we can't find one, I think we can go ahead and merge.

mgrover1 avatar Sep 21 '22 14:09 mgrover1