UFO
VariableTransforms.h
Go to the documentation of this file.
1 /*
2  * (C) Crown copyright 2020, Met Office
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_VARIABLETRANSFORMS_H_
9 #define UFO_FILTERS_VARIABLETRANSFORMS_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>
26 class ObsDataVector;
27 class ObsSpace;
28 }
29 
30 namespace ufo {
31 class VariableTransformsParameters;
32 }
33 
34 namespace ufo {
35 
36 /// \brief Main filter to apply some variable conversion.
37 ///
38 /// See VariableTransformsParameters for the documentation of the available
39 /// parameters and options.
40 ///
41 /// \par Important:
42 /// Any new variable created is assigned to the observation space with the
43 /// "@DerivedObsValue" tag.
44 ///
46  private util::ObjectCounter<VariableTransforms> {
47  public:
48  static const std::string classname() { return "ufo::VariableTransforms"; }
49  // This Constructor function initializes an instance of the
50  // filter based on options specified in the YAML configuration file.
51  VariableTransforms(ioda::ObsSpace &, const eckit::Configuration &,
52  std::shared_ptr<ioda::ObsDataVector<int>>,
53  std::shared_ptr<ioda::ObsDataVector<float>>);
54  // Destructor
56 
57  private:
58  /// Configurable options
59  std::unique_ptr<VariableTransformsParameters> options_;
60  void print(std::ostream &) const override;
61  void applyFilter(const std::vector<bool> &, const Variables &,
62  std::vector<std::vector<bool>> &) const override;
63  int qcFlag() const override { return QCflags::pass; }
64 };
65 
66 } // namespace ufo
67 
68 #endif // UFO_FILTERS_VARIABLETRANSFORMS_H_
Base class for UFO QC filters.
Definition: FilterBase.h:45
Main filter to apply some variable conversion.
std::unique_ptr< VariableTransformsParameters > options_
Configurable options.
int qcFlag() const override
VariableTransforms(ioda::ObsSpace &, const eckit::Configuration &, std::shared_ptr< ioda::ObsDataVector< int >>, std::shared_ptr< ioda::ObsDataVector< float >>)
void applyFilter(const std::vector< bool > &, const Variables &, std::vector< std::vector< bool >> &) const override
void print(std::ostream &) const override
static const std::string classname()
Forward declarations.
Definition: ObsAodExt.h:21
Forward declarations.
Definition: ObsAodExt.h:25
constexpr int pass
Definition: QCflags.h:14
Definition: RunCRTM.h:27