Filtering gates for each field for one nc file

Hi all,

I am performing objective analysis using the Barnes2 method on some mobile radar files, including dual-pol fields like CC, Kdp, and Zdr. I was wondering if there was a way for the gate filtering to only be applied to the corresponding field rather than all five filters being applied to each field, or if I am just missing something. For example, if I exclude gates with reflectivity below -100 (trying to exclude the missing value fields), it only applies to reflectivity, and if I exclude CC values below -3 (once again getting rid of the missing value gates), those gates only apply to CC, not reflectivity, and so on. When I have all the filters included, it makes my reflectivity field really ugly, and that is a key piece I need for my analysis. However, I need to make sure the interpolation for the OA isn’t using the missing values in their respective fields, which are extreme in the calculations.

Here is a snippet of my code:

Have you tried individually masking each field in place rather than using gatefilters?

Something like this:

radar.fields['DBZ']['data'] = np.ma.masked_less_equal(radar.fields['DBZ']['data'],
                                                       -100)
radar.fields['RHOHV']['data'] = np.ma.masked_less_equal(radar.fields['RHOHV']['data'],
                                                       -3)

These may carry through to the gridding then, at least they have in my quick test run with some of our data [edit].

I will definitely give this a try! Thank you!