Go to the documentation of this file.
12 static ProfileCheckMaker<ProfileCheckBackgroundRelativeHumidity>
20 :
ProfileCheckBase(options, profileIndices, profileDataHandler, profileCheckValidator)
25 oops::Log::debug() <<
" Background check for relative humidity" << std::endl;
29 const std::vector <float> &rhObs =
31 const std::vector <float> &rhObsErr =
33 const std::vector <float> &rhBkg =
35 const std::vector <float> &rhBkgErr =
37 std::vector <float> &rhPGE =
39 std::vector <float> &rhPGEBd =
41 std::vector <int> &rhFlags =
43 const std::vector <int> &timeFlags =
46 if (!oops::allVectorsSameNonZeroSize(rhObs, rhObsErr, rhBkg, rhBkgErr,
47 rhPGE, rhFlags, timeFlags)) {
48 oops::Log::warning() <<
"At least one vector is the wrong size. "
49 <<
"Check will not be performed." << std::endl;
50 oops::Log::warning() <<
"Vector sizes: "
51 << oops::listOfVectorSizes(rhObs, rhObsErr, rhBkg, rhBkgErr,
52 rhPGE, rhFlags, timeFlags)
60 std::vector <float> BackgrErrRH(numLevelsToCheck, 0.0);
62 std::vector <float> ObErrRH(numLevelsToCheck, 0.0);
65 const float sqrt2 = std::sqrt(2.0);
66 for (
int jlev = 0; jlev < numLevelsToCheck; ++jlev) {
70 BackgrErrRH[jlev] = sqrt2 * rhBkgErr[jlev];
72 ObErrRH[jlev] = sqrt2 * rhObsErr[jlev];
Retrieve and store data for individual profiles. To do this, first the vector of values in the entire...
@ PermRejectFlag
Blacklisted data.
const ProfileIndices & profileIndices_
Indices of profile's observations in the entire sample.
Determine indices of observations making up individual profiles. The indices are computed with respec...
ProfileDataHandler & profileDataHandler_
Profile data handler.
static constexpr const char *const hofx_relative_humidity
static constexpr const char *const obserr_relative_humidity
int getNumLevelsToCheck() const
Return number of levels to which QC checks should be applied.
static constexpr const char *const pgebd_relative_humidity
Profile QC check validator.
ProbabilityOfGrossErrorParameters PGEParameters
Parameters related to PGE calculations.
static constexpr const char *const qcflags_relative_humidity
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) for scalar (1D) or vector (2D) observables....
oops::Parameter< bool > modellevels
Have the observation and model values been averaged onto model levels?
ProfileCheckBackgroundRelativeHumidity(const ProfileConsistencyCheckParameters &options, const ProfileIndices &profileIndices, ProfileDataHandler &profileDataHandler, ProfileCheckValidator &profileCheckValidator)
Profile QC checker base class.
const ProfileConsistencyCheckParameters & options_
Configurable parameters.
oops::Parameter< float > BkCheck_PdBad_rh
Prior probability of 'bad' observations for RH.
oops::Parameter< float > BkCheck_ErrVarMax_rh
Maximum error variance for RH.
const float missingValueFloat
Missing value (float)
void runCheck() override
Run check.
static constexpr const char *const bkgerr_relative_humidity
static constexpr const char *const qcflags_time
Options controlling the operation of the ProfileConsistencyChecks filter.
static ProfileCheckMaker< ProfileCheckBackgroundRelativeHumidity > makerProfileCheckBackgroundRelativeHumidity_("BackgroundRelativeHumidity")
static constexpr const char *const obs_relative_humidity
std::vector< T > & get(const std::string &fullname)
static constexpr const char *const pge_relative_humidity