25 const std::vector <float> &pressures =
27 const std::vector <float> &tObs =
29 const std::vector <float> &tBkg =
31 std::vector <int> &tFlags =
33 std::vector <int> &NumAnyErrors =
35 std::vector <int> &NumSignChange =
37 std::vector <float> &tObsCorrection =
40 if (!oops::allVectorsSameNonZeroSize(pressures, tObs, tBkg,
41 tFlags, tObsCorrection)) {
42 oops::Log::warning() <<
"At least one vector is the wrong size. "
43 <<
"Check will not be performed." << std::endl;
44 oops::Log::warning() <<
"Vector sizes: "
45 << oops::listOfVectorSizes(pressures, tObs, tBkg,
46 tFlags, tObsCorrection)
52 const std::vector <float> &pressureGeoVaLs =
54 if (pressureGeoVaLs.empty())
55 throw eckit::BadValue(
"Air pressure GeoVaLs vector is empty.", Here());
58 const float Pstar = pressureGeoVaLs[0];
60 for (
int jlev = 0; jlev < numProfileLevels; ++jlev) {
74 oops::Log::debug() <<
" -> Failed sign check for level " << jlev << std::endl;
84 oops::Log::debug() <<
" -> Uncorrected tObs: " << tObs[jlev] <<
"C" << std::endl;
86 << tObsCorrection[jlev] <<
"C" << std::endl;
88 << tObs[jlev] + tObsCorrection[jlev] <<
"C" << std::endl;
95 oops::Log::debug() <<
" -> Passed test but have large T difference for level "
97 <<
"P = " << pressures[jlev] * 0.01 <<
"hPa, tObs = "
Options controlling the operation of the ConventionalProfileProcessing filter.
oops::Parameter< float > SCheck_tObstBkgThresh
Threshold used for |tObs - tBkg| in sign check (K)
oops::Parameter< float > SCheck_PrintLargeTThresh
P threshold over which to print large T differences (Pa)
oops::Parameter< float > SCheck_ProfileSignTol
Tolerance used for sign check (K)
oops::Parameter< float > SCheck_PstarThresh
Threshold used for Pstar difference in sign check (Pa)
oops::Parameter< bool > SCheck_CorrectT
Correct tObs in the sign check?
Profile QC checker base class.
const float missingValueFloat
Missing value (float)
const ConventionalProfileProcessingParameters & options_
Configurable parameters.
ProfileCheckSign(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)
std::vector< float > & getGeoVaLVector(const std::string &variableName)
Get GeoVaLs for a particular profile.
int getNumProfileLevels() const
Return number of levels to which QC checks should be applied.
@ FinalRejectFlag
Final QC flag.
@ DataCorrectFlag
Eg sign correction.
static ProfileCheckMaker< ProfileCheckSign > makerProfileCheckSign_("Sign")
util::Duration abs(const util::Duration &duration)
static constexpr double t0c
static constexpr const char *const hofx_air_temperature
static constexpr const char *const obs_air_temperature
static constexpr const char *const counter_NumAnyErrors
static constexpr const char *const geovals_pressure
static constexpr const char *const counter_NumSignChange
static constexpr const char *const obs_air_pressure
static constexpr const char *const qcflags_air_temperature
static constexpr const char *const obscorrection_air_temperature