22 oops::Log::debug() <<
" Test for same pressure and different temperature" << std::endl;
28 const std::vector <float> &pressures =
30 const std::vector <float> &tObs =
32 const std::vector <float> &tBkg =
34 std::vector <int> &tFlags =
36 std::vector <int> &NumAnyErrors =
38 std::vector <int> &NumSamePErrObs =
40 const std::vector <float> &tObsCorrection =
43 if (!oops::allVectorsSameNonZeroSize(pressures, tObs, tBkg, tFlags, tObsCorrection)) {
44 oops::Log::warning() <<
"At least one vector is the wrong size. "
45 <<
"Check will not be performed." << std::endl;
46 oops::Log::warning() <<
"Vector sizes: "
47 << oops::listOfVectorSizes(pressures, tObs, tBkg, tFlags, tObsCorrection)
52 std::vector <float> tObsFinal;
55 for (
int jlev = 0; jlev < numProfileLevels; ++jlev) {
63 if (pressures[jlev] == pressures[jlevprev]) {
64 int jlevuse = jlevprev;
70 if (
std::abs(tObsFinal[jlev] - tBkg[jlev]) <=
71 std::abs(tObsFinal[jlevprev] - tBkg[jlevprev])) {
81 << jlevprev <<
" and " << jlev << std::endl;
83 <<
"P = " << pressures[jlevprev] * 0.01 <<
"hPa, tObs = "
88 <<
"P = " << pressures[jlev] * 0.01 <<
"hPa, tObs = "
92 oops::Log::debug() <<
" -> tObs difference: " << tObsFinal[jlev] - tObsFinal[jlevprev]
101 if (NumErrors > 0) NumSamePErrObs[0]++;
Options controlling the operation of the ConventionalProfileProcessing filter.
oops::Parameter< float > SPDTCheck_TThresh
Threshold used for same P/different T check (K)
Profile QC checker base class.
const float missingValueFloat
Missing value (float)
const ConventionalProfileProcessingParameters & options_
Configurable parameters.
void correctVector(const std::vector< T > &v1, const std::vector< T > &v2, std::vector< T > &vout)
Apply correction to vector of values.
ProfileCheckSamePDiffT(const ConventionalProfileProcessingParameters &options)
void runCheck(ProfileDataHandler &profileDataHandler) override
Run check.
Retrieve and store data for individual profiles. To do this, first the vector of values in the entire...
std::vector< T > & get(const std::string &fullname)
int getNumProfileLevels() const
Return number of levels to which QC checks should be applied.
@ InterpolationFlag
Interpolation check flag.
@ FinalRejectFlag
Final QC flag.
static ProfileCheckMaker< ProfileCheckSamePDiffT > makerProfileCheckSamePDiffT_("SamePDiffT")
util::Duration abs(const util::Duration &duration)
static constexpr double t0c
static constexpr const char *const hofx_air_temperature
static constexpr const char *const counter_NumSamePErrObs
static constexpr const char *const obs_air_temperature
static constexpr const char *const counter_NumAnyErrors
static constexpr const char *const obs_air_pressure
static constexpr const char *const qcflags_air_temperature
static constexpr const char *const obscorrection_air_temperature