Skip to content

Buddy event check

Thomas Nipen edited this page Jun 19, 2020 · 11 revisions

Similar to buddy check, except the check is done for a particular threshold. All observations are converted to yes/no values of exceeding this threshold.

In addition to some of the arguments in the buddy check, the test requires an event_threshold, which is the threshold that converts the observations into a yes/no event. The threhsold argument in this test is minimum fraction of other observations in the neighbourhood that must agree with the observation being inspected. If event_threhsold=0.2 and threshold=0.25, then an observation exceeding 0.2 requires that at least 25% of the other observations within the radius also exceed 0.2. If an observation is less than 0.2, then 25% must also be below 0.2.

Example

radius = np.full(len(lats), 5000)
num_min = np.full(len(lats), 5)
event_threshold = 0.2
threshold = 0.25
max_elev_diff = 0
elev_gradient = 0
num_iterations = 5
flags = gridpp.buddy_event_check(lats, lons, elevs, precip_obs, radius, num_min,
            event_threshold, threshold, max_elev_diff, elev_gradient, num_iterations)