UFO
BlackList.h
Go to the documentation of this file.
1 /*
2  * (C) Copyright 2018-2019 UCAR
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_BLACKLIST_H_
9 #define UFO_FILTERS_BLACKLIST_H_
10 
11 #include <memory>
12 #include <ostream>
13 #include <string>
14 #include <vector>
15 
16 #include "oops/util/ObjectCounter.h"
17 #include "ufo/filters/FilterBase.h"
18 #include "ufo/filters/QCflags.h"
19 
20 namespace eckit {
21  class Configuration;
22 }
23 
24 namespace ioda {
25  template <typename DATATYPE> class ObsDataVector;
26  class ObsSpace;
27 }
28 
29 namespace ufo {
30 
31 /// BlackList: generic black listing of observations
32 
33 // Filters observations out regardless of obs value
34 // The same effect can be achieved with opposite criteria through the "Domain Check",
35 // the choice is a matter of convenience or which seems more natural.
36 
37 class BlackList : public FilterBase,
38  private util::ObjectCounter<BlackList> {
39  public:
40  static const std::string classname() {return "ufo::BlackList";}
41 
42  BlackList(ioda::ObsSpace &, const eckit::Configuration &,
43  std::shared_ptr<ioda::ObsDataVector<int> >,
44  std::shared_ptr<ioda::ObsDataVector<float> >);
45  ~BlackList();
46 
47  private:
48  void print(std::ostream &) const override;
49  void applyFilter(const std::vector<bool> &, const Variables &,
50  std::vector<std::vector<bool>> &) const override;
51  int qcFlag() const override {return QCflags::black;}
52 };
53 
54 } // namespace ufo
55 
56 #endif // UFO_FILTERS_BLACKLIST_H_
FilterBase.h
ufo::BlackList::applyFilter
void applyFilter(const std::vector< bool > &, const Variables &, std::vector< std::vector< bool >> &) const override
Definition: BlackList.cc:42
ufo::BlackList
BlackList: generic black listing of observations.
Definition: BlackList.h:38
ufo::Variables
Definition: src/ufo/filters/Variables.h:24
ufo::QCflags::black
constexpr int black
Definition: QCflags.h:19
ufo::FilterBase
FilterBase: Base class for UFO QC filters.
Definition: FilterBase.h:42
ioda
Definition: ObsAtmSfcInterp.h:24
ufo::BlackList::print
void print(std::ostream &) const override
Definition: BlackList.cc:61
ufo
Definition: RunCRTM.h:27
eckit
Forward declarations.
Definition: ObsAtmSfcInterp.h:20
ufo::BlackList::classname
static const std::string classname()
Definition: BlackList.h:40
QCflags.h
ufo::BlackList::BlackList
BlackList(ioda::ObsSpace &, const eckit::Configuration &, std::shared_ptr< ioda::ObsDataVector< int > >, std::shared_ptr< ioda::ObsDataVector< float > >)
Definition: BlackList.cc:28
ioda::ObsDataVector< int >
ufo::BlackList::qcFlag
int qcFlag() const override
Definition: BlackList.h:51
ufo::BlackList::~BlackList
~BlackList()
Definition: BlackList.cc:38