Go to the documentation of this file.
12 static ProfileCheckMaker<ProfileCheckBackgroundTemperature>
20 :
ProfileCheckBase(options, profileIndices, profileDataHandler, profileCheckValidator)
29 const std::vector <float> &Latitude =
31 const std::vector <float> &pressures =
33 const std::vector <float> &tObs =
35 const std::vector <float> &tObsErr =
37 const std::vector <float> &tBkg =
39 const std::vector <float> &tBkgErr =
41 std::vector <float> &tPGE =
43 std::vector <float> &tPGEBd =
45 std::vector <int> &tFlags =
47 const std::vector <int> &timeFlags =
49 const std::vector <float> &tObsCorrection =
52 if (!oops::allVectorsSameNonZeroSize(Latitude, pressures,
53 tObs, tObsErr, tBkg, tBkgErr,
54 tPGE, tFlags, timeFlags, tObsCorrection)) {
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(Latitude, pressures,
59 tObs, tObsErr, tBkg, tBkgErr,
60 tPGE, tFlags, timeFlags, tObsCorrection)
65 std::vector <float> tObsFinal;
71 std::vector <float> BackgrErrT(numLevelsToCheck, 0);
72 for (
int jlev = 0; jlev < numLevelsToCheck; ++jlev) {
73 BackgrErrT[jlev] = tBkgErr[jlev];
81 for (
int jlev = 0; jlev < numLevelsToCheck; ++jlev) {
82 if (pressures[jlev] <= Psplit) {
95 for (
int jlev = 0; jlev < numLevelsToCheck; ++jlev) {
97 tPGE[jlev] = 0.5 + 0.5 * tPGE[jlev];
99 tPGE[jlev] = 0.5 + 0.5 * tPGE[jlev];
101 tPGE[jlev] = 0.5 + 0.5 * tPGE[jlev];
Retrieve and store data for individual profiles. To do this, first the vector of values in the entire...
static constexpr const char *const pgebd_air_temperature
@ 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.
void runCheck() override
Run check.
int getNumLevelsToCheck() const
Return number of levels to which QC checks should be applied.
static constexpr const char *const bkgerr_air_temperature
Profile QC check validator.
ProbabilityOfGrossErrorParameters PGEParameters
Parameters related to PGE calculations.
oops::Parameter< float > BkCheck_Psplit_latitude_tropics
static constexpr const char *const pge_air_temperature
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?
Profile QC checker base class.
oops::Parameter< float > BkCheck_PdBad_t
Prior probability of 'bad' observations for T.
@ SuperadiabatFlag
Superadiabatic check flag.
const ProfileConsistencyCheckParameters & options_
Configurable parameters.
oops::Parameter< float > BkCheck_Psplit_tropics
Pressure threshold above which extra representivity error occurs in tropics (Pa).
static constexpr const char *const Latitude
ProfileCheckBackgroundTemperature(const ProfileConsistencyCheckParameters &options, const ProfileIndices &profileIndices, ProfileDataHandler &profileDataHandler, ProfileCheckValidator &profileCheckValidator)
static constexpr const char *const obs_air_pressure
const float missingValueFloat
Missing value (float)
static constexpr const char *const obserr_air_temperature
static constexpr const char *const hofx_air_temperature
static constexpr const char *const qcflags_time
oops::Parameter< float > BkCheck_Psplit_extratropics
Pressure threshold above which extra representivity error occurs in extratropics (Pa).
Options controlling the operation of the ProfileConsistencyChecks filter.
void correctVector(const std::vector< T > &v1, const std::vector< T > &v2, std::vector< T > &vout)
Apply correction to vector of values.
static ProfileCheckMaker< ProfileCheckBackgroundTemperature > makerProfileCheckBackgroundTemperature_("BackgroundTemperature")
static constexpr const char *const obscorrection_air_temperature
@ HydrostaticFlag
Hydrostatic check flag.
static constexpr const char *const qcflags_air_temperature
@ InterpolationFlag
Interpolation check flag.
oops::Parameter< float > BkCheck_ErrorInflationAbovePsplit
Error inflation factor above Psplit.
oops::Parameter< float > BkCheck_ErrorInflationBelowPsplit
Error inflation factor below Psplit.
std::vector< T > & get(const std::string &fullname)
static constexpr const char *const obs_air_temperature