IODA Bundle
BackgroundCheck.h
Go to the documentation of this file.
1 /*
2  * (C) Copyright 2020-2020 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 LORENZ95_BACKGROUNDCHECK_H_
9 #define LORENZ95_BACKGROUNDCHECK_H_
10 
11 #include <memory>
12 #include <ostream>
13 
15 #include "oops/base/Variables.h"
16 #include "oops/util/parameters/OptionalParameter.h"
17 #include "oops/util/parameters/RequiredParameter.h"
18 #include "oops/util/Printable.h"
19 
20 namespace lorenz95 {
21  class GomL95;
22  template <typename DATATYPE> class ObsData1D;
23  class ObsTable;
24  class ObsDiags1D;
25  class ObsVec1D;
26 
27 /// Parameters for L95 BackgroundCheck
28 /// background check: all obs for which {|y-H(x)| < threshold} pass QC
30  OOPS_CONCRETE_PARAMETERS(BackgroundCheckParameters, ObsFilterParametersBase)
31 
32  public:
33  /// threshold for background check
34  oops::RequiredParameter<double> threshold{"threshold", this};
35 
36  /// optional inflation factor: if this parameter is present, obs error stddev
37  /// for obs that don't pass the check is multiplied by the specified factor.
38  /// Otherwise, obs that don't pass the check are rejected.
39  oops::OptionalParameter<double> inflation{"inflate obs error", this};
40 };
41 
42 /// Simple background check: all obs for which {|y-H(x)| < threshold} pass QC
43 class BackgroundCheck : public util::Printable {
44  public:
46 
47  BackgroundCheck(const ObsTable &, const Parameters_ &,
48  std::shared_ptr<ObsData1D<int> >, std::shared_ptr<ObsData1D<float> >);
49 
50  void preProcess() const {}
51  void priorFilter(const GomL95 &) const {}
52  void postFilter(const ObsVec1D &, const ObsDiags1D &) const;
53 
56 
57  private:
58  void print(std::ostream & os) const;
59 
60  const ObsTable & obsdb_;
62  std::shared_ptr<ObsData1D<int> > qcflags_; // QC flags
63  std::shared_ptr<ObsData1D<float> > obserr_; // obs error stddev
65 };
66 
67 } // namespace lorenz95
68 
69 #endif // LORENZ95_BACKGROUNDCHECK_H_
Simple background check: all obs for which {|y-H(x)| < threshold} pass QC.
const oops::Variables novars_
BackgroundCheckParameters Parameters_
oops::Variables requiredHdiagnostics() const
std::shared_ptr< ObsData1D< int > > qcflags_
void priorFilter(const GomL95 &) const
std::shared_ptr< ObsData1D< float > > obserr_
void print(std::ostream &os) const
oops::Variables requiredVars() const
BackgroundCheck(const ObsTable &, const Parameters_ &, std::shared_ptr< ObsData1D< int > >, std::shared_ptr< ObsData1D< float > >)
void postFilter(const ObsVec1D &, const ObsDiags1D &) const
oops::RequiredParameter< double > threshold
threshold for background check
oops::OptionalParameter< double > inflation
GomL95 class to handle locations for L95 model.
Definition: GomL95.h:33
Data in observation space.
Definition: ObsData1D.h:35
A Simple Observation Data Handler.
Definition: ObsTable.h:41
Vector in observation space.
Definition: ObsVec1D.h:33
Base class of classes storing parameters controlling specific observation filters.
The namespace for the L95 model.
string ObsTable