12 static ProfileCheckMaker<ProfilePressure>
27 std::vector <float> &zObs =
29 const std::vector <int> &ObsType =
31 std::vector <int> &ReportFlags =
34 if (!oops::allVectorsSameNonZeroSize(zObs, ObsType, ReportFlags)) {
35 oops::Log::warning() <<
"At least one vector is the wrong size. "
36 <<
"Profile pressure routine will not run." << std::endl;
37 oops::Log::warning() <<
"Vector sizes: "
38 << oops::listOfVectorSizes(zObs, ObsType, ReportFlags)
44 const std::vector <float> &orogGeoVaLs =
46 const std::vector <float> &pressureGeoVaLs =
49 if (!oops::allVectorsSameNonZeroSize(orogGeoVaLs, pressureGeoVaLs)) {
50 oops::Log::warning() <<
"At least one GeoVaLs vector is the wrong size. "
51 <<
"Profile pressure routine will not run." << std::endl;
52 oops::Log::warning() <<
"Vector sizes: "
53 << oops::listOfVectorSizes(orogGeoVaLs, pressureGeoVaLs)
59 std::vector <float> &pressures =
62 if (pressures.empty())
66 const bool ObsHasNoPressureSensor =
74 const int NumValidPLevels = std::count_if(pressures.begin(), pressures.end(),
75 [](
float PLev){return PLev >= 0;});
76 bool AllLevelsHaveValidP = NumValidPLevels == numProfileLevels;
80 AllLevelsHaveValidP = NumValidPLevels >= std::max(numProfileLevels - 2,
81 static_cast<int>(round(numProfileLevels
90 for (
int jlev = 0; jlev < numProfileLevels; ++jlev) {
96 const int NumValidZLevels = std::count_if(zObs.begin(), zObs.end(),
97 [](
float ZLev){return ZLev >= 0.0;});
98 const bool AllLevelsHaveValidZ = NumValidZLevels == numProfileLevels;
104 if (AllLevelsHaveValidP &&
106 AllLevelsHaveValidZ) {
107 AllLevelsHaveValidP =
false;
113 if (ObsHasNoPressureSensor &&
114 !AllLevelsHaveValidP) {
118 std::vector <float> zRhoGeoVaLs;
119 std::vector <float> zThetaGeoVaLs;
Options controlling the operation of the ConventionalProfileProcessing filter.
DataHandlerParameters DHParameters
Parameters related to profile data handler.
ModelParameters ModParameters
Parameters related to the model.
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)
std::vector< float > & getGeoVaLVector(const std::string &variableName)
Get GeoVaLs for a particular profile.
int getNumProfileLevels() const
Return number of levels to which QC checks should be applied.
void runCheck(ProfileDataHandler &profileDataHandler) override
Run check.
ProfilePressure(const ConventionalProfileProcessingParameters &options)
@ PilotMobile
pilot mobile
@ NoPressureSensor
No PILOT pressure sensor.
static ProfileCheckMaker< ProfilePressure > makerProfilePressure_("Pressure")
void profileVerticalInterpolation(const std::vector< float > &coordIn, const std::vector< float > &valuesIn, const std::vector< float > &coordOut, std::vector< float > &valuesOut, const ProfileInterpolation::InterpolationMethod interpMethod, const ProfileInterpolation::CoordinateOrder coordOrder, const ProfileInterpolation::OutOfBoundsTreatment outOfBounds)
void CalculateModelHeight(const ModelParameters &options, const float orogGeoVaLs, std::vector< float > &zRhoGeoVaLs, std::vector< float > &zThetaGeoVaLs)
Calculate model heights on rho and theta levels. The calculation uses the terrain-following height co...
static constexpr const char *const qcflags_observation_report
static constexpr const char *const geovals_orog
static constexpr const char *const obs_geopotential_height
static constexpr const char *const geovals_pressure
static constexpr const char *const ObsType
static constexpr const char *const obs_air_pressure