15 static ProfileCheckMaker<ProfileCheckTime>
29 const std::vector <int> &ObsType =
31 const std::vector <float> &level_time =
33 const std::vector <float> &pressures =
35 std::vector <int> &uFlags =
37 std::vector <int> &vFlags =
40 if (!oops::allVectorsSameNonZeroSize(ObsType, pressures, uFlags, vFlags)) {
41 oops::Log::warning() <<
"At least one vector is the wrong size. "
42 <<
"Time checks will not be performed." << std::endl;
43 oops::Log::warning() <<
"Vector sizes: "
44 << oops::listOfVectorSizes(ObsType, pressures, uFlags, vFlags)
53 const float halfWindowLength = 0.5 * (profileDataHandler.
getObsdb().windowEnd() -
54 profileDataHandler.
getObsdb().windowStart()).toSeconds();
58 std::vector <int> timeFlags(numProfileLevels,
false);
59 if (!level_time.empty() && !ModelLevels) {
60 for (
size_t jlev = 0; jlev < numProfileLevels; ++jlev) {
61 const float leveltime = level_time[jlev];
63 timeFlags[jlev] = (leveltime < (-halfWindowLength - 0.5) ||
64 leveltime > (halfWindowLength - 0.5));
72 if (!uFlags.empty() && SondeLaunchWindRej > 0.0 &&
77 jlev < std::min(static_cast<int>(numProfileLevels), 10);
80 PSurf = pressures[jlev];
89 const float PLimit = PSurf - SondeLaunchWindRej * 100.0;
90 for (
size_t jlev = 0; jlev < numProfileLevels; ++jlev) {
91 if (pressures[jlev] > 0.0 && pressures[jlev] < PLimit)
break;
97 <<
"Psurf = " << PSurf * 0.01 <<
" hPa, "
98 <<
"NWindRej = " << NWindRej << std::endl;
Options controlling the operation of the ConventionalProfileProcessing filter.
oops::Parameter< float > TimeCheck_SondeLaunchWindRej
Threshold relative to surface pressure for rejecting levels (hPa)
oops::Parameter< bool > modellevels
Have the observation and model values been averaged onto model levels?
Profile QC checker base class.
const float missingValueFloat
Missing value (float)
const ConventionalProfileProcessingParameters & options_
Configurable parameters.
void runCheck(ProfileDataHandler &profileDataHandler) override
Run check.
ProfileCheckTime(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.
ioda::ObsSpace & getObsdb()
Return obsdb.
@ SurfaceLevelFlag
Surface Level.
@ PermRejectFlag
Blacklisted data.
static ProfileCheckMaker< ProfileCheckTime > makerProfileCheckTime_("Time")
static constexpr const char *const qcflags_eastward_wind
static constexpr const char *const qcflags_northward_wind
static constexpr const char *const qcflags_time
static constexpr const char *const obs_level_time
static constexpr const char *const ObsType
static constexpr const char *const obs_air_pressure