16 const std::vector <bool> &apply)
20 profileNums_(obsdb.recnum())
32 obsdb_.obs_sort_var().empty() &&
49 if (!
obsdb_.obs_sort_var().empty() &&
50 obsdb_.obs_sort_order() ==
"descending") {
68 if (
obsdb_.obs_sort_var().empty()) {
77 if (
obsdb_.obs_sort_order() ==
"descending") {
81 auto it_profidx_sorted = profidx_sorted.begin();
87 std::advance(it_profidx_sorted, 1);
91 throw eckit::BadParameter(
"sort order is ascending.", Here());
118 if (!
obsdb_.obs_sort_var().empty() &&
119 obsdb_.obs_sort_order() ==
"descending") {
138 std::vector <size_t> allProfileNums = {profNum};
141 if (profNum_j != profNum) {
142 allProfileNums.emplace_back(profNum_j);
147 if (allProfileNums.size() !=
obsdb_.nrecs()) {
148 throw eckit::BadValue(
"incorrect number of profiles in unsorted sample", Here());
Options controlling the operation of the EntireSampleDataHandler and ProfileDataHandler classes.
oops::OptionalParameter< int > maxlev
oops::Parameter< bool > ValidateTotalNumProf
If not sorting observations, ensure number of profiles is consistent.
size_t profileNumToFind_
Next profile number to find in the sample.
ProfileIndices(ioda::ObsSpace &obsdb, const DataHandlerParameters &options, const std::vector< bool > &apply)
const std::vector< bool > & apply_
Observations to apply the filter to.
int numProfileLevels_
Number of profile levels to which QC checks should be applied.
ioda::ObsSpace & obsdb_
Observation database.
void validateTotalNumProf()
Ensure number of profiles is consistent with quantity reported by obsdb.
size_t profileNumCurrent_
Current profile number in the sample.
std::set< size_t > uniqueProfileNums_
Unique profile numbers for the entire sample.
ProfIdxIter profidx_current_
Iterator pointing to current profile index (initially points to beginning).
const std::vector< size_t > profileNums_
Profile numbers for the entire sample.
size_t getProfileNumCurrent() const
Get number of current profile, accounting for distribution across processors.
const DataHandlerParameters & options_
Configurable parameters.
void updateNextProfileIndices()
Determine indices in entire sample for the next profile.
void reset()
Reset profile indices to point to the beginning of the sample.
std::vector< size_t > profileIndices_
Indices for this profile.
float distance(const Point &a, const Point &b)
Returns the distance between the two cartesian-mapped Point arguments