Buddy check¶

The buddy check compares an observation to its neighbours in order to determine whether it is grossly in error. The basic method is as follows.

  • Read in all the input reports.

  • Grid all the accepted reports at 1x1xpentad resolution by taking means of anomalies of all the obs in each grid-box.

  • Get the input standard deviation for each 1x1xpentad (call this \(\sigma\)).

  • For each grid-box calculate an acceptable range of data (call this \(R\)) as follows:

    • Identify all other grid boxes within \(\pm2\) pentads and a distance equal to \(1^{\circ}\) at the equator. The angular range is \(1/\cos\left(lat\right)\) (Step 1)

    • Find the arithmetic mean of those grid box values (call this ), and the total number of obs in those grid boxes (call this \(n\)).

      • If \(n>100:\ R=\mu\pm2.5\sigma\) (for DPT \(4.0\sigma\))

      • If \(15<n<100:\ R=\mu\pm3.0\sigma\) (for DPT 4.5)

      • If \(5<n<15:\ R=\mu\pm3.5\sigma\) (for DPT 5.0)

      • If \(0<n<5:\ R=\mu\pm4.0\sigma\) (for DPT 5.5)

      • If \(n = 0\) Try again using grid boxes within \(\pm2\) pentads and \(\pm2\) degrees at the equator.

      • If \(n>0\ R=\mu\pm4.0\sigma\) (for DPT 5:5).

      • If \(n\) still \(=0\); Go back to step 1 but expand the time separation to 4 pentads.

      • If \(n\) still \(=0\) using \(\pm4\) pentads and \(\pm2\) degrees \(R\) is infinite (I.e. all obs in this grid-box will pass buddy QC)

  • Compare the anomaly for each observation to R for the 1x1xpentad grid box that contains the observation.

  • If the range of R covers the observation anomaly, set the buddy check flag to 0. Otherwise, it has failed and the buddy flag is set to 1.