12 static ProfileCheckMaker<ProfileCheckBackgroundGeopotentialHeight>
22 oops::Log::debug() <<
" Background check for geopotential height" << std::endl;
26 const std::vector <float> &Zstation =
28 const std::vector <float> &pressures =
30 const std::vector <float> &zObs =
32 const std::vector <float> &zObsErr =
34 const std::vector <float> &zBkg =
36 std::vector <float> &zBkgErr =
38 std::vector <float> &zPGE =
40 std::vector <float> &zPGEBd =
42 std::vector <int> &zFlags =
44 const std::vector <int> &tFlags =
46 const std::vector <float> &zObsCorrection =
48 const std::vector <int> &timeFlags =
51 if (!oops::allVectorsSameNonZeroSize(Zstation, pressures,
53 zPGE, zFlags, zObsCorrection,
55 oops::Log::warning() <<
"At least one vector is the wrong size. "
56 <<
"Check will not be performed." << std::endl;
57 oops::Log::warning() <<
"Vector sizes: "
58 << oops::listOfVectorSizes(Zstation, pressures,
60 zPGE, zFlags, zObsCorrection,
66 std::vector <float> zObsFinal;
70 std::vector <float> PdBad(numProfileLevels, 0);
77 for (
int jlev = 0; jlev < numProfileLevels; ++jlev) {
81 zObsFinal[jlev] <= Zstation[jlev]) {
84 const float Plevel = pressures[jlev] / 100.0;
89 if (Plevel > PlevelThreshold) {
90 zBkgErr[jlev] = 1.2 * zBkgErrs[idx];
91 PdBad[jlev] = zBadPGEs[idx];
100 for (
int jlev = 0; jlev < numProfileLevels; ++jlev) {
102 zPGE[jlev] = 0.5 + 0.5 * zPGE[jlev];
104 zPGE[jlev] = 0.5 + 0.5 * zPGE[jlev];
Options controlling the operation of the ConventionalProfileProcessing filter.
oops::Parameter< std::vector< float > > BkCheck_PlevelThresholds
oops::Parameter< std::vector< float > > BkCheck_zBkgErrs
ProbabilityOfGrossErrorParameters PGEParameters
Parameters related to PGE calculations.
oops::Parameter< std::vector< float > > BkCheck_zBadPGEs
oops::Parameter< bool > modellevels
Have the observation and model values been averaged onto model levels?
void runCheck(ProfileDataHandler &profileDataHandler) override
Run check.
ProfileCheckBackgroundGeopotentialHeight(const ConventionalProfileProcessingParameters &options)
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.
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.
@ InterpolationFlag
Interpolation check flag.
@ HydrostaticFlag
Hydrostatic check flag.
@ SurfaceLevelFlag
Surface Level.
@ PermRejectFlag
Blacklisted data.
static ProfileCheckMaker< ProfileCheckBackgroundGeopotentialHeight > makerProfileCheckBackgroundGeopotentialHeight_("BackgroundGeopotentialHeight")
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_geopotential_height
static constexpr const char *const pge_geopotential_height
static constexpr const char *const Zstation
static constexpr const char *const pgebd_geopotential_height
static constexpr const char *const obs_geopotential_height
static constexpr const char *const obserr_geopotential_height
static constexpr const char *const qcflags_time
static constexpr const char *const hofx_geopotential_height
static constexpr const char *const obs_air_pressure
static constexpr const char *const qcflags_air_temperature
static constexpr const char *const obscorrection_geopotential_height
static constexpr const char *const qcflags_geopotential_height