12 static ProfileCheckMaker<ProfileCheckBackgroundRelativeHumidity>
22 oops::Log::debug() <<
" Background check for relative humidity" << std::endl;
26 const std::vector <float> &rhObs =
28 const std::vector <float> &rhObsErr =
30 const std::vector <float> &rhBkg =
32 const std::vector <float> &rhBkgErr =
34 std::vector <float> &rhPGE =
36 std::vector <float> &rhPGEBd =
38 std::vector <int> &rhFlags =
40 const std::vector <int> &timeFlags =
43 if (!oops::allVectorsSameNonZeroSize(rhObs, rhObsErr, rhBkg, rhBkgErr,
44 rhPGE, rhFlags, timeFlags)) {
45 oops::Log::warning() <<
"At least one vector is the wrong size. "
46 <<
"Check will not be performed." << std::endl;
47 oops::Log::warning() <<
"Vector sizes: "
48 << oops::listOfVectorSizes(rhObs, rhObsErr, rhBkg, rhBkgErr,
49 rhPGE, rhFlags, timeFlags)
57 std::vector <float> BackgrErrRH(numProfileLevels, 0.0);
59 std::vector <float> ObErrRH(numProfileLevels, 0.0);
62 const float sqrt2 = std::sqrt(2.0);
63 for (
int jlev = 0; jlev < numProfileLevels; ++jlev) {
67 BackgrErrRH[jlev] = sqrt2 * rhBkgErr[jlev];
69 ObErrRH[jlev] = sqrt2 * rhObsErr[jlev];
Options controlling the operation of the ConventionalProfileProcessing filter.
oops::Parameter< float > BkCheck_ErrVarMax_rh
Maximum error variance for RH.
oops::Parameter< float > BkCheck_PdBad_rh
Prior probability of 'bad' observations for RH.
ProbabilityOfGrossErrorParameters PGEParameters
Parameters related to PGE calculations.
oops::Parameter< bool > modellevels
Have the observation and model values been averaged onto model levels?
void runCheck(ProfileDataHandler &profileDataHandler) override
Run check.
ProfileCheckBackgroundRelativeHumidity(const ConventionalProfileProcessingParameters &options)
Profile QC checker base class.
const float missingValueFloat
Missing value (float)
const ConventionalProfileProcessingParameters & options_
Configurable parameters.
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.
std::vector< float > & getObsDiag(const std::string &variableName)
Get ObsDiags for a particular profile.
@ PermRejectFlag
Blacklisted data.
static ProfileCheckMaker< ProfileCheckBackgroundRelativeHumidity > makerProfileCheckBackgroundRelativeHumidity_("BackgroundRelativeHumidity")
void BayesianPGEUpdate(const ProbabilityOfGrossErrorParameters &options, const std::vector< float > &obsVal, const std::vector< float > &obsErr, const std::vector< float > &bkgVal, const std::vector< float > &bkgErr, const std::vector< float > &PdBad, const bool ModelLevels, std::vector< int > &flags, std::vector< float > &PGE, std::vector< float > &PGEBd, float ErrVarMax, const std::vector< float > *obsVal2, const std::vector< float > *bkgVal2)
Bayesian update of probability of gross error (PGE)
static constexpr const char *const bkgerr_relative_humidity
static constexpr const char *const obs_relative_humidity
static constexpr const char *const pge_relative_humidity
static constexpr const char *const qcflags_relative_humidity
static constexpr const char *const qcflags_time
static constexpr const char *const hofx_relative_humidity
static constexpr const char *const pgebd_relative_humidity
static constexpr const char *const obserr_relative_humidity