UFO
ObsDomainErrCheck.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_OBSDOMAINERRCHECK_H_
9 #define UFO_FILTERS_OBSDOMAINERRCHECK_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 /// Domain check: AMSU-A scattering check and obserr inflation
32 // that obs are within domain
33 
34 // Domain is defined by metadata criteria regardless of obs value.
35 // If obs value is required, use ObsBoundsCheck.
36 
37 // The same effect can be achieved with opposite criteria through BlackList,
38 // the choice is a matter of convenience or which seems more natural.
39 
41  private util::ObjectCounter<ObsDomainErrCheck> {
42  public:
43  static const std::string classname() {return "ufo::ObsDomainErrCheck";}
44 
45  ObsDomainErrCheck(ioda::ObsSpace &, const eckit::Configuration &,
46  std::shared_ptr<ioda::ObsDataVector<int> >,
47  std::shared_ptr<ioda::ObsDataVector<float> >);
49 
50  private:
51  void print(std::ostream &) const override;
52  void applyFilter(const std::vector<bool> &, const Variables &,
53  std::vector<std::vector<bool>> &) const override;
54  int qcFlag() const override {return QCflags::domain;}
55 
56  float parameter_;
57 };
58 
59 } // namespace ufo
60 
61 #endif // UFO_FILTERS_OBSDOMAINERRCHECK_H_
FilterBase.h
ufo::ObsDomainErrCheck::print
void print(std::ostream &) const override
Definition: ObsDomainErrCheck.cc:87
ufo::Variables
Definition: src/ufo/filters/Variables.h:24
ufo::ObsDomainErrCheck::parameter_
float parameter_
Definition: ObsDomainErrCheck.h:56
ufo::ObsDomainErrCheck::classname
static const std::string classname()
Definition: ObsDomainErrCheck.h:43
ufo::FilterBase
FilterBase: Base class for UFO QC filters.
Definition: FilterBase.h:42
ufo::QCflags::domain
constexpr int domain
Definition: QCflags.h:18
ioda
Definition: ObsAtmSfcInterp.h:24
ufo
Definition: RunCRTM.h:27
ufo::ObsDomainErrCheck::qcFlag
int qcFlag() const override
Definition: ObsDomainErrCheck.h:54
ufo::ObsDomainErrCheck::applyFilter
void applyFilter(const std::vector< bool > &, const Variables &, std::vector< std::vector< bool >> &) const override
Definition: ObsDomainErrCheck.cc:48
eckit
Forward declarations.
Definition: ObsAtmSfcInterp.h:20
ufo::ObsDomainErrCheck::~ObsDomainErrCheck
~ObsDomainErrCheck()
Definition: ObsDomainErrCheck.cc:44
QCflags.h
ioda::ObsDataVector< int >
ufo::ObsDomainErrCheck
Domain check: AMSU-A scattering check and obserr inflation.
Definition: ObsDomainErrCheck.h:41
ufo::ObsDomainErrCheck::ObsDomainErrCheck
ObsDomainErrCheck(ioda::ObsSpace &, const eckit::Configuration &, std::shared_ptr< ioda::ObsDataVector< int > >, std::shared_ptr< ioda::ObsDataVector< float > >)
Definition: ObsDomainErrCheck.cc:28