UFO
|
An implementation of the MetOfficeBuddyCollector interface intended to produce the same results as Met Office's OPS system. More...
#include <MetOfficeBuddyCollectorV1.h>
Public Member Functions | |
MetOfficeBuddyCollectorV1 (const MetOfficeBuddyCheckParameters &options, const std::vector< float > &latitudes, const std::vector< float > &longitudes, const std::vector< int > &stationIds) | |
void | examinePotentialBuddy (int obsIdB) override |
Check if the observation with ID obsIdB can be selected as a buddy of obsIdB. If so, record its ID internally. More... | |
void | appendBuddyPairsTo (std::vector< MetOfficeBuddyPair > &buddyPairs) const override |
Extend buddyPairs with MetOfficeBuddyPair objects storing the properies of all buddy pairs found since the last call to reset(). More... | |
void | reset (int obsIdA) override |
Prepare the object for examination of potential buddies of the observation with ID obsIdA . More... | |
![]() | |
MetOfficeBuddyCollector (const MetOfficeBuddyCheckParameters &options, const std::vector< float > &latitudes, const std::vector< float > &longitudes, const std::vector< int > &stationIds) | |
Constructor. More... | |
virtual | ~MetOfficeBuddyCollector ()=default |
MetOfficeBuddyCollector (const MetOfficeBuddyCollector &)=delete | |
MetOfficeBuddyCollector (MetOfficeBuddyCollector &&)=delete | |
MetOfficeBuddyCollector & | operator= (const MetOfficeBuddyCollector &)=delete |
MetOfficeBuddyCollector & | operator= (MetOfficeBuddyCollector &&)=delete |
void | startProcessingNextBand () |
Called to indicate that observations passed to subsequent calls to examinePotentialBuddy() will belong to a new zonal band. More... | |
bool | foundEnoughBuddiesInCurrentBand () const |
Returns true if the number of observations selected as buddies of the observation passed to reset() since the last call to startProcessingNextBand() has reached the limit set by the max_num_buddies_from_single_band parameter. More... | |
bool | foundEnoughBuddies () const |
Returns true if the number of observations selected as buddies of the observation passed to reset() since the last call to startProcessingNextBand() has reached the limit set by the max_total_num_buddies parameter. More... | |
Private Attributes | |
std::vector< int > | potentialBuddies_ |
Additional Inherited Members | |
![]() | |
void | calcDeltaLatLonAndDistanceTo (int obsIdB, double &deltaLatInRad, double &deltaLonInRad, double &distanceInKm) const |
MetOfficeBuddyPair | createBuddyPair (int obsIdB, double deltaLatInRad, double deltaLonInRad, double distanceInKm) const |
![]() | |
const MetOfficeBuddyCheckParameters & | options_ |
const std::vector< float > & | latitudes_ |
const std::vector< float > & | longitudes_ |
const std::vector< int > & | stationIds_ |
double | maxLatDifferenceBetweenBuddiesInDeg_ |
int | obsIdA_ = 0 |
int | numBuddiesInCurrentBand_ = 0 |
int | numBuddiesWithSameStationId_ = 0 |
int | totalNumBuddies_ = 0 |
An implementation of the MetOfficeBuddyCollector interface intended to produce the same results as Met Office's OPS system.
A drawback of this implementation is that counters of buddies of certain types (e.g. those from the same zonal band) are sometimes incremented prematurely – before a candidate buddy has been fully vetted – and as a result the collector may sometimes fail to collect as many valid as it should.
Definition at line 24 of file MetOfficeBuddyCollectorV1.h.
ufo::MetOfficeBuddyCollectorV1::MetOfficeBuddyCollectorV1 | ( | const MetOfficeBuddyCheckParameters & | options, |
const std::vector< float > & | latitudes, | ||
const std::vector< float > & | longitudes, | ||
const std::vector< int > & | stationIds | ||
) |
Definition at line 14 of file MetOfficeBuddyCollectorV1.cc.
|
overridevirtual |
Extend buddyPairs
with MetOfficeBuddyPair objects storing the properies of all buddy pairs found since the last call to reset().
Implements ufo::MetOfficeBuddyCollector.
Definition at line 38 of file MetOfficeBuddyCollectorV1.cc.
|
overridevirtual |
Check if the observation with ID obsIdB
can be selected as a buddy of obsIdB. If so, record its ID internally.
Implements ufo::MetOfficeBuddyCollector.
Definition at line 21 of file MetOfficeBuddyCollectorV1.cc.
|
overridevirtual |
Prepare the object for examination of potential buddies of the observation with ID obsIdA
.
Implements ufo::MetOfficeBuddyCollector.
Definition at line 57 of file MetOfficeBuddyCollectorV1.cc.
|
private |
Definition at line 38 of file MetOfficeBuddyCollectorV1.h.