UFO
BackgroundCheck.h
Go to the documentation of this file.
1 /*
2  * (C) Copyright 2017-2018 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_BACKGROUNDCHECK_H_
9 #define UFO_FILTERS_BACKGROUNDCHECK_H_
10 
11 #include <memory>
12 #include <ostream>
13 #include <string>
14 #include <vector>
15 
16 #include "oops/util/ObjectCounter.h"
17 #include "oops/util/Printable.h"
18 #include "ufo/filters/FilterBase.h"
19 #include "ufo/filters/QCflags.h"
20 
21 namespace eckit {
22  class Configuration;
23 }
24 
25 namespace ioda {
26  template <typename DATATYPE> class ObsDataVector;
27  class ObsSpace;
28 }
29 
30 namespace ufo {
31 
32 /// BackgroundCheck: check observation closeness to background
33 
34 class BackgroundCheck : public FilterBase,
35  private util::ObjectCounter<BackgroundCheck> {
36  public:
37  static const std::string classname() {return "ufo::BackgroundCheck";}
38 
39  BackgroundCheck(ioda::ObsSpace &, const eckit::Configuration &,
40  std::shared_ptr<ioda::ObsDataVector<int> >,
41  std::shared_ptr<ioda::ObsDataVector<float> >);
43 
44  private:
45  void print(std::ostream &) const override;
46  void applyFilter(const std::vector<bool> &, const Variables &,
47  std::vector<std::vector<bool>> &) const override;
48  int qcFlag() const override {return QCflags::fguess;}
49  const std::string abs_threshold_;
50  const std::string threshold_;
52 };
53 
54 } // namespace ufo
55 
56 #endif // UFO_FILTERS_BACKGROUNDCHECK_H_
FilterBase.h
ufo::BackgroundCheck::qcFlag
int qcFlag() const override
Definition: BackgroundCheck.h:48
ufo::BackgroundCheck::classname
static const std::string classname()
Definition: BackgroundCheck.h:37
ufo::Variables
Definition: src/ufo/filters/Variables.h:24
ufo::BackgroundCheck::threshold_
const std::string threshold_
Definition: BackgroundCheck.h:50
ufo::BackgroundCheck::abs_threshold_
const std::string abs_threshold_
Definition: BackgroundCheck.h:49
ufo::BackgroundCheck::print
void print(std::ostream &) const override
Definition: BackgroundCheck.cc:148
ufo::FilterBase
FilterBase: Base class for UFO QC filters.
Definition: FilterBase.h:42
ioda
Definition: ObsAtmSfcInterp.h:24
ufo
Definition: RunCRTM.h:27
ufo::BackgroundCheck::applyFilter
void applyFilter(const std::vector< bool > &, const Variables &, std::vector< std::vector< bool >> &) const override
Definition: BackgroundCheck.cc:63
ufo::BackgroundCheck::BackgroundCheck
BackgroundCheck(ioda::ObsSpace &, const eckit::Configuration &, std::shared_ptr< ioda::ObsDataVector< int > >, std::shared_ptr< ioda::ObsDataVector< float > >)
Definition: BackgroundCheck.cc:35
eckit
Forward declarations.
Definition: ObsAtmSfcInterp.h:20
ufo::QCflags::fguess
constexpr int fguess
Definition: QCflags.h:24
ufo::BackgroundCheck::~BackgroundCheck
~BackgroundCheck()
Definition: BackgroundCheck.cc:57
QCflags.h
ufo::BackgroundCheck
BackgroundCheck: check observation closeness to background.
Definition: BackgroundCheck.h:35
ioda::ObsDataVector
Definition: BackgroundCheck.h:26
ufo::BackgroundCheck::function_abs_threshold_
std::string function_abs_threshold_
Definition: BackgroundCheck.h:51