UFO
ProfileChecker.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_PROFILE_PROFILECHECKER_H_
9 #define UFO_PROFILE_PROFILECHECKER_H_
10 
11 #include <memory>
12 #include <ostream>
13 #include <string>
14 #include <utility>
15 #include <vector>
16 
18 
19 namespace ufo {
20  class ProfileDataHandler;
21 }
22 
23 namespace ufo {
24 
25  /// Information on each subgroup of checks.
26  struct CheckSubgroup {
27  /// \p runOnEntireSample specifies whether the checks in this subgroup run on all
28  /// profiles at once.
30  /// \p checkNames contains the names of the checks in this subgroup.
31  std::vector<std::string> checkNames;
32  };
33 
34  /// \brief Profile QC checker
35  ///
36  /// Runs the various QC checks on individual profiles and modifies flags accordingly.
38  public:
40 
41  /// Type for container of check subgroups.
42  typedef std::vector <CheckSubgroup> CheckSubgroupList;
43 
44  /// Run all checks requested
45  void runChecks(ProfileDataHandler &profileDataHandler,
46  const CheckSubgroup &subGroupChecks);
47 
48  /// Get basic check result
50 
51  /// Set basic check result
52  void setBasicCheckResult(bool result) {basicCheckResult_ = result;}
53 
54  /// Get container of check subgroups
56 
57  /// Get vector of GeoVaL names for all checks.
58  oops::Variables getGeoVaLNames() const {return GeoVaLNames_;}
59 
60  /// Get vector of validation GeoVaL names for all checks.
61  oops::Variables getValidationGeoVaLNames() const {return validationGeoVaLNames_;}
62 
63  /// Get vector of obs diagnostic names for all checks.
64  oops::Variables getObsDiagNames() const {return obsDiagNames_;}
65 
66  private:
67  /// Configurable parameters
69 
70  /// Checks to perform
71  std::vector <std::string> checks_;
72 
73  /// Basic check result
74  bool basicCheckResult_ = true;
75 
76  /// Subgroups of checks with the same mode of operation.
78 
79  /// Names of all required GeoVaLs.
80  oops::Variables GeoVaLNames_;
81 
82  /// Names of all validation GeoVaLs.
83  oops::Variables validationGeoVaLNames_;
84 
85  /// Names of all required obs diagnostics.
86  oops::Variables obsDiagNames_;
87  };
88 } // namespace ufo
89 
90 #endif // UFO_PROFILE_PROFILECHECKER_H_
Options controlling the operation of the ConventionalProfileProcessing filter.
Profile QC checker.
void runChecks(ProfileDataHandler &profileDataHandler, const CheckSubgroup &subGroupChecks)
Run all checks requested.
const ConventionalProfileProcessingParameters & options_
Configurable parameters.
oops::Variables validationGeoVaLNames_
Names of all validation GeoVaLs.
oops::Variables obsDiagNames_
Names of all required obs diagnostics.
std::vector< CheckSubgroup > CheckSubgroupList
Type for container of check subgroups.
oops::Variables getObsDiagNames() const
Get vector of obs diagnostic names for all checks.
bool getBasicCheckResult()
Get basic check result.
CheckSubgroupList checkSubgroups_
Subgroups of checks with the same mode of operation.
std::vector< std::string > checks_
Checks to perform.
bool basicCheckResult_
Basic check result.
oops::Variables getGeoVaLNames() const
Get vector of GeoVaL names for all checks.
void setBasicCheckResult(bool result)
Set basic check result.
ProfileChecker(const ConventionalProfileProcessingParameters &options)
oops::Variables getValidationGeoVaLNames() const
Get vector of validation GeoVaL names for all checks.
CheckSubgroupList getCheckSubgroups()
Get container of check subgroups.
oops::Variables GeoVaLNames_
Names of all required GeoVaLs.
Retrieve and store data for individual profiles. To do this, first the vector of values in the entire...
Definition: RunCRTM.h:27
Information on each subgroup of checks.
std::vector< std::string > checkNames
checkNames contains the names of the checks in this subgroup.