8 #ifndef UFO_PROFILE_PROFILECHECKBASE_H_
9 #define UFO_PROFILE_PROFILECHECKBASE_H_
20 #include "eckit/exception/Exceptions.h"
21 #include "eckit/types/FloatCompare.h"
23 #include "oops/util/CompareNVectors.h"
24 #include "oops/util/Logger.h"
25 #include "oops/util/missingValues.h"
26 #include "oops/util/PropertiesOfNVectors.h"
74 const std::vector <T> &v2,
75 std::vector <T> &vout)
77 ASSERT(v1.size() == v2.size());
78 vout.assign(v1.size(), 0);
79 std::transform(v1.begin(), v1.end(), v2.begin(), vout.begin(), std::plus<T>());
89 if (vec.size() > jlev) vec[jlev] |= flag;
95 template <
typename T,
typename... Args>
98 std::vector <T> &vec1,
101 if (vec1.size() > jlev) vec1[jlev] |= flag;
120 static std::unique_ptr<ProfileCheckBase>
create(
const std::string&,
126 virtual std::unique_ptr<ProfileCheckBase>
make
129 static std::map <std::string, ProfileCheckFactory*> &
getMakers()
131 static std::map <std::string, ProfileCheckFactory*> makers_;
139 virtual std::unique_ptr<ProfileCheckBase>
142 return std::unique_ptr<ProfileCheckBase>(
new T(options));
Options controlling the operation of the ConventionalProfileProcessing filter.
Profile QC checker base class.
const float missingValueFloat
Missing value (float)
virtual ~ProfileCheckBase()
virtual oops::Variables getValidationGeoVaLNames()
List of names of GeoVaLs used in check validation.
const ConventionalProfileProcessingParameters & options_
Configurable parameters.
ProfileCheckBase(const ConventionalProfileProcessingParameters &options)
void SetQCFlag(const int &flag, const size_t &jlev, std::vector< T > &vec)
void SetQCFlag(const int &flag, const size_t &jlev, std::vector< T > &vec1, Args &... vecs)
void correctVector(const std::vector< T > &v1, const std::vector< T > &v2, std::vector< T > &vout)
Apply correction to vector of values.
virtual void runCheck(ProfileDataHandler &profileDataHandler)=0
Run check.
virtual bool runOnEntireSample()
Run this check on the entire sample?
virtual void fillValidationData(ProfileDataHandler &profileDataHandler)
virtual bool getResult()
Get result of check (default fail)
virtual oops::Variables getGeoVaLNames()
List of names of required GeoVaLs.
virtual oops::Variables getObsDiagNames()
List of names of required obs diagnostics.
const int missingValueInt
Missing value (int)
ProfileCheckFactory(const std::string &)
virtual std::unique_ptr< ProfileCheckBase > make(const ConventionalProfileProcessingParameters &)=0
static std::unique_ptr< ProfileCheckBase > create(const std::string &, const ConventionalProfileProcessingParameters &)
static std::map< std::string, ProfileCheckFactory * > & getMakers()
virtual ~ProfileCheckFactory()=default
ProfileCheckMaker(const std::string &name)
virtual std::unique_ptr< ProfileCheckBase > make(const ConventionalProfileProcessingParameters &options)
Retrieve and store data for individual profiles. To do this, first the vector of values in the entire...