UFO
|
Profile QC check validator. More...
#include <ProfileCheckValidator.h>
Public Member Functions | |
ProfileCheckValidator (const ConventionalProfileProcessingParameters &options) | |
void | validate (ProfileDataHandler &profileDataHandler, size_t commSize) |
Validate check results against OPS values. More... | |
int | getMismatches () const |
Get number of mismatches between values produced in this code and the OPS equivalents. More... | |
Private Member Functions | |
template<typename T > | |
void | compareOutput (const std::string &desc, const T val1, const T val2, const int offset, const float tol, int &n) |
Compare values with specified offset and tolerance. More... | |
template<typename T > | |
void | compareOutput (const std::string &desc, const std::vector< T > &vec1, const std::vector< T > &vec2, const int offset, const float tol, int &n) |
Compare vectors of values with specified offset and tolerance. More... | |
template<typename T > | |
bool | differenceWithinTol (const T A, const T B, const float tol=1e-10) const |
Determine difference between two values within a certain tolerance. More... | |
Private Attributes | |
const ConventionalProfileProcessingParameters & | options_ |
Configurable parameters. More... | |
std::map< std::string, int > | cumulativeCounters_ |
Counters that are accumulated across profiles. More... | |
int | nMismatches_ |
Number of mismatches between this code and OPS (separate for each profile). More... | |
std::set< std::string > | valuesToCompare_int_ |
Integer values to compare. More... | |
std::set< std::string > | valuesToCompare_float_ |
Float values to compare. More... | |
std::map< std::string, int > | comparison_offsets_ |
Profile QC check validator.
Compares various values produced in this code to the equivalent values produced in the OPS code.
Definition at line 27 of file ProfileCheckValidator.h.
|
explicit |
|
private |
Compare vectors of values with specified offset and tolerance.
Comparison of vectors of values.
Definition at line 205 of file ProfileCheckValidator.cc.
|
private |
Compare values with specified offset and tolerance.
Comparison of single values.
Definition at line 189 of file ProfileCheckValidator.cc.
|
inlineprivate |
Determine difference between two values within a certain tolerance.
Definition at line 59 of file ProfileCheckValidator.h.
|
inline |
Get number of mismatches between values produced in this code and the OPS equivalents.
Definition at line 36 of file ProfileCheckValidator.h.
void ufo::ProfileCheckValidator::validate | ( | ProfileDataHandler & | profileDataHandler, |
size_t | commSize | ||
) |
Validate check results against OPS values.
Special case: OPS counters have one value per profile level, and are in the MetaData rather than the Counters group. This avoids the (default) treatment which assumes that variables in the Counters group have one value per profile.
Definition at line 233 of file ProfileCheckValidator.cc.
|
private |
Values for which there is an offset between this code and OPS due to array indices starting at 0 in C++ and 1 in Fortran.
Definition at line 80 of file ProfileCheckValidator.h.
|
private |
Counters that are accumulated across profiles.
Definition at line 67 of file ProfileCheckValidator.h.
|
private |
Number of mismatches between this code and OPS (separate for each profile).
Definition at line 70 of file ProfileCheckValidator.h.
|
private |
Configurable parameters.
Definition at line 64 of file ProfileCheckValidator.h.
|
private |
Float values to compare.
Definition at line 76 of file ProfileCheckValidator.h.
|
private |
Integer values to compare.
Definition at line 73 of file ProfileCheckValidator.h.