UFO
MetOfficeBuddyCollectorV1.h
Go to the documentation of this file.
1 /*
2  * (C) Copyright 2020 Met Office UK
3  *
4  * This software is licensed under the terms of the Apache Licence Version 2.0
5  * which can be obtained at http://www.apache.org/licenses/LICENSE-2.0.
6  */
7 
8 #ifndef UFO_FILTERS_METOFFICEBUDDYCOLLECTORV1_H_
9 #define UFO_FILTERS_METOFFICEBUDDYCOLLECTORV1_H_
10 
12 
13 #include <vector>
14 
15 namespace ufo {
16 
17 /// \brief An implementation of the MetOfficeBuddyCollector interface intended to produce the
18 /// same results as Met Office's OPS system.
19 ///
20 /// A drawback of this implementation is that counters of buddies of certain types (e.g. those from
21 /// the same zonal band) are sometimes incremented prematurely -- before a candidate buddy has been
22 /// fully vetted -- and as a result the collector may sometimes fail to collect as many valid
23 /// as it should.
25  public:
27  const std::vector<float> &latitudes,
28  const std::vector<float> &longitudes,
29  const std::vector<int> &stationIds);
30 
31  void examinePotentialBuddy(int obsIdB) override;
32 
33  void appendBuddyPairsTo(std::vector<MetOfficeBuddyPair> &buddyPairs) const override;
34 
35  void reset(int obsIdA) override;
36 
37  private:
38  std::vector<int> potentialBuddies_;
39 };
40 
41 } // namespace ufo
42 
43 #endif // UFO_FILTERS_METOFFICEBUDDYCOLLECTORV1_H_
MetOfficeBuddyCollector.h
ufo::MetOfficeBuddyCollectorV1
An implementation of the MetOfficeBuddyCollector interface intended to produce the same results as Me...
Definition: MetOfficeBuddyCollectorV1.h:24
ufo::MetOfficeBuddyCollectorV1::appendBuddyPairsTo
void appendBuddyPairsTo(std::vector< MetOfficeBuddyPair > &buddyPairs) const override
Extend buddyPairs with MetOfficeBuddyPair objects storing the properies of all buddy pairs found sinc...
Definition: MetOfficeBuddyCollectorV1.cc:38
ufo
Definition: RunCRTM.h:27
ufo::MetOfficeBuddyCollector
Interface of classes used by MetOfficeBuddyPairFinder to select observations used as buddies of other...
Definition: MetOfficeBuddyCollector.h:22
ufo::MetOfficeBuddyCheckParameters
Options controlling the operation of the MetOfficeBuddyCheck filter.
Definition: MetOfficeBuddyCheckParameters.h:41
ufo::MetOfficeBuddyCollectorV1::examinePotentialBuddy
void examinePotentialBuddy(int obsIdB) override
Check if the observation with ID obsIdB can be selected as a buddy of obsIdB. If so,...
Definition: MetOfficeBuddyCollectorV1.cc:21
ufo::MetOfficeBuddyCollectorV1::potentialBuddies_
std::vector< int > potentialBuddies_
Definition: MetOfficeBuddyCollectorV1.h:38
ufo::MetOfficeBuddyCollectorV1::MetOfficeBuddyCollectorV1
MetOfficeBuddyCollectorV1(const MetOfficeBuddyCheckParameters &options, const std::vector< float > &latitudes, const std::vector< float > &longitudes, const std::vector< int > &stationIds)
Definition: MetOfficeBuddyCollectorV1.cc:14
ufo::MetOfficeBuddyCollectorV1::reset
void reset(int obsIdA) override
Prepare the object for examination of potential buddies of the observation with ID obsIdA.
Definition: MetOfficeBuddyCollectorV1.cc:57