13 static ProfileCheckMaker<ProfileCheckUnstableLayer>
27 const std::vector <float> &pressures =
29 const std::vector <float> &tObs =
31 const std::vector <float> &tBkg =
33 std::vector <int> &tFlags =
35 std::vector <int> &NumAnyErrors =
37 std::vector <int> &NumSuperadiabat =
39 const std::vector <float> &tObsCorrection =
42 if (!oops::allVectorsSameNonZeroSize(pressures, tObs, tBkg, tFlags, tObsCorrection)) {
43 oops::Log::warning() <<
"At least one vector is the wrong size. "
44 <<
"Check will not be performed." << std::endl;
45 oops::Log::warning() <<
"Vector sizes: "
46 << oops::listOfVectorSizes(pressures, tObs, tBkg, tFlags, tObsCorrection)
51 std::vector <float> tObsFinal;
57 for (
int jlev = 0; jlev < numProfileLevels; ++jlev) {
66 const float Tadiabat = tObsFinal[jlevprev] *
75 oops::Log::debug() <<
" -> Failed unstable layer/superadiabat check for levels "
76 << jlevprev <<
" and " << jlev << std::endl;
80 <<
"P = " << pressures[jlevprev] * 0.01 <<
"hPa, tObs = "
83 <<
"tObs - Tadiabat = " << tObsFinal[jlev] - Tadiabat
86 <<
"P = " << pressures[jlev] * 0.01 <<
"hPa, tObs = "
Options controlling the operation of the ConventionalProfileProcessing filter.
oops::Parameter< float > ULCheck_PBThresh
Bottom pressure threshold for unstable layer/superadiabat check (Pa)
oops::Parameter< float > ULCheck_MinP
Min P for unstable layer/superadiabat check (Pa)
oops::Parameter< float > ULCheck_SuperadiabatTol
Tolerance for unstable layer/superadiabat 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.
void runCheck(ProfileDataHandler &profileDataHandler) override
Run check.
void fillValidationData(ProfileDataHandler &profileDataHandler) override
Fill variables in validator.
ProfileCheckUnstableLayer(const ConventionalProfileProcessingParameters &options)
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)
void set(const std::string &fullname, std::vector< T > &&vec_in)
int getNumProfileLevels() const
Return number of levels to which QC checks should be applied.
@ SuperadiabatFlag
Superadiabatic check flag.
@ FinalRejectFlag
Final QC flag.
static ProfileCheckMaker< ProfileCheckUnstableLayer > makerProfileCheckUnstableLayer_("UnstableLayer")
static constexpr double rd_over_cp
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 PBottom
static constexpr const char *const counter_NumSuperadiabat
static constexpr const char *const obs_air_pressure
static constexpr const char *const qcflags_air_temperature
static constexpr const char *const obscorrection_air_temperature