8 #ifndef UFO_FILTERS_METOFFICEBUDDYCOLLECTOR_H_
9 #define UFO_FILTERS_METOFFICEBUDDYCOLLECTOR_H_
18 struct MetOfficeBuddyPair;
35 const std::vector<float> &latitudes,
36 const std::vector<float> &longitudes,
37 const std::vector<int> &stationIds);
51 virtual void reset(
int obsIdA) = 0;
77 double &deltaLatInRad,
double &deltaLonInRad,
78 double &distanceInKm)
const;
81 double deltaLatInRad,
double deltaLonInRad,
82 double distanceInKm)
const;
Options controlling the operation of the MetOfficeBuddyCheck filter.
oops::Parameter< int > maxTotalNumBuddies
oops::Parameter< int > maxNumBuddiesFromSingleBand
Interface of classes used by MetOfficeBuddyPairFinder to select observations used as buddies of other...
bool foundEnoughBuddies() const
Returns true if the number of observations selected as buddies of the observation passed to reset() s...
int numBuddiesWithSameStationId_
const std::vector< float > & latitudes_
MetOfficeBuddyCollector(MetOfficeBuddyCollector &&)=delete
virtual void examinePotentialBuddy(int obsIdB)=0
Check if the observation with ID obsIdB can be selected as a buddy of obsIdB. If so,...
const std::vector< int > & stationIds_
MetOfficeBuddyPair createBuddyPair(int obsIdB, double deltaLatInRad, double deltaLonInRad, double distanceInKm) const
int numBuddiesInCurrentBand_
virtual void appendBuddyPairsTo(std::vector< MetOfficeBuddyPair > &buddyPairs) const =0
Extend buddyPairs with MetOfficeBuddyPair objects storing the properies of all buddy pairs found sinc...
MetOfficeBuddyCollector(const MetOfficeBuddyCollector &)=delete
virtual void reset(int obsIdA)=0
Prepare the object for examination of potential buddies of the observation with ID obsIdA.
bool foundEnoughBuddiesInCurrentBand() const
Returns true if the number of observations selected as buddies of the observation passed to reset() s...
const MetOfficeBuddyCheckParameters & options_
double maxLatDifferenceBetweenBuddiesInDeg_
void startProcessingNextBand()
Called to indicate that observations passed to subsequent calls to examinePotentialBuddy() will belon...
virtual ~MetOfficeBuddyCollector()=default
MetOfficeBuddyCollector & operator=(const MetOfficeBuddyCollector &)=delete
MetOfficeBuddyCollector & operator=(MetOfficeBuddyCollector &&)=delete
void calcDeltaLatLonAndDistanceTo(int obsIdB, double &deltaLatInRad, double &deltaLonInRad, double &distanceInKm) const
const std::vector< float > & longitudes_
MetOfficeBuddyCollector(const MetOfficeBuddyCheckParameters &options, const std::vector< float > &latitudes, const std::vector< float > &longitudes, const std::vector< int > &stationIds)
Constructor.
Properties of a pair of observations checked against each other during buddy check.