20 const std::vector <float> &pressures,
21 const std::vector <float> &tObs,
22 const std::vector <int> &tFlags)
29 StdLev_.assign(numProfileLevels, -1);
32 LogP_.assign(numProfileLevels, 0.0);
33 IndStd_.assign(numProfileLevels, -1);
36 const float missingValueFloat = util::missingValue(1.0f);
40 for (
int jlev = 0; jlev < numProfileLevels; ++jlev) {
43 if (tObs[jlev] != missingValueFloat &&
45 LogP_[jlev] = (pressures[jlev] > 0 ? std::log(pressures[jlev]) : 0.0);
57 for (
int jlevStd = jlevStdA; jlevStd <
NumStd_; ++jlevStd) {
67 for (
int jlevstd = 0; jlevstd <
NumStd_; ++jlevstd) {
70 int IPStd = std::round(pressures[jlev] * 0.01);
73 IndStd_[jlevstd] =
static_cast<int> (i);
85 for (
size_t jstdlev = 0; jstdlev <
StandardLevels_.size() - 1; ++jstdlev) {
87 throw eckit::BadValue(
"Standard levels in wrong order", Here());
99 const std::vector <float> &pressures,
100 const std::vector <float> &uObs,
101 const std::vector <float> &vObs,
102 const std::vector <int> &uFlags)
104 oops::Log::debug() <<
" Finding standard levels for U and V data" << std::endl;
109 StdLev_.assign(numProfileLevels, -1);
112 LogP_.assign(numProfileLevels, 0.0);
115 const float missingValueFloat = util::missingValue(1.0f);
120 for (
int jlev = 0; jlev < numProfileLevels; ++jlev) {
121 if (uObs[jlev] != missingValueFloat && vObs[jlev] != missingValueFloat) {
122 LogP_[jlev] = std::log(pressures[jlev]);
129 for (
int jlevstd = jlevStdA; jlevstd <
NumStd_; ++jlevstd) {
Options controlling the operation of the ConventionalProfileProcessing filter.
oops::Parameter< std::vector< float > > BigGaps
Big gaps (hPa) used in interpolation check.
oops::Parameter< float > FS_MinP
Min P for finding standard levels (Pa)
oops::Parameter< std::vector< float > > StandardLevels
Standard Levels (hPa)
int Ind925_
Standard level index closest to 925 hPa.
void calcStdLevelsUV(const int numProfileLevels, const std::vector< float > &pressures, const std::vector< float > &uObs, const std::vector< float > &vObs, const std::vector< int > &uFlags)
Calculate standard levels for U and V data.
int Ind100_
Standard level index closest to 100 hPa.
std::vector< float > BigGaps_
Big gaps (hPa) used in interpolation check.
std::vector< int > StdLev_
Index of standard levels.
ProfileStandardLevels(const ConventionalProfileProcessingParameters &options)
void findHCheckStdLevs()
Compute indices of particular standard levels for the hydrostatic check.
const ConventionalProfileProcessingParameters & optionsSL_
Configurable parameters.
void calcStdLevels(const int numProfileLevels, const std::vector< float > &pressures, const std::vector< float > &tObs, const std::vector< int > &tFlags)
Calculate standard levels.
std::vector< float > StandardLevels_
Standard levels (hPa)
std::vector< float > LogP_
Log(Pressure) - used for vertical interpolation.
int NumStd_
Number of standard levels.
std::vector< int > IndStd_
Indices of standard levels.
std::vector< int > SigBelow_
Significant level below standard level.
std::vector< int > SigAbove_
Significant level above standard level.
int NumSig_
Number of significant levels.
@ SurfaceLevelFlag
Surface Level.
@ StandardLevelFlag
Standard Level.
@ FinalRejectFlag
Final QC flag.
float distance(const Point &a, const Point &b)
Returns the distance between the two cartesian-mapped Point arguments