15 #include "eckit/config/Configuration.h"
17 #include "ioda/ObsDataVector.h"
18 #include "ioda/ObsSpace.h"
20 #include "oops/util/abor1_cpp.h"
21 #include "oops/util/Logger.h"
26 #include "ufo/GeoVaLs.h"
33 (ioda::ObsSpace & obsdb,
37 :
FilterBase(obsdb, parameters, flags, obserr), options_(parameters)
48 if (requiredGeoVaLNames.size() > 0) {
57 if (requiredObsDiagNames.size() > 0) {
64 if (validationGeoVaLNames.size() > 0) {
73 if (obsdb.obs_group_vars().empty())
74 throw eckit::BadParameter(
"group variables configuration is empty.", Here());
89 const int nprofs =
static_cast <int> (
obsdb_.nrecs());
97 for (
int jprof = 0; jprof < nprofs; ++jprof) {
98 oops::Log::debug() <<
"Profile " << (jprof + 1) <<
" / " << nprofs << std::endl;
105 const std::vector <std::string> &station_ID =
107 if (!station_ID.empty())
112 profileChecker.
runChecks(profileDataHandler,
134 oops::Log::debug() <<
"Running checks on entire profile sample..." << std::endl;
137 profileChecker.
runChecks(profileDataHandler,
150 (
const std::vector<bool> & apply,
152 std::vector<std::vector<bool>> & flagged)
const
154 print(oops::Log::trace());
171 for (
const auto& checkSubgroup : checkSubgroups) {
172 if (checkSubgroup.runOnEntireSample) {
175 profileCheckValidator,
181 profileCheckValidator,
190 for (
int jprof = 0; jprof <
obsdb_.nrecs(); ++jprof) {
192 profileCheckValidator.
validate(profileDataHandler,
obsdb_.comm().size());
201 os <<
"ConventionalProfileProcessing: config = " <<
options_ << std::endl;
~ConventionalProfileProcessing()
ConventionalProfileProcessingParameters options_
Configurable options.
void individualProfileChecks(ProfileDataHandler &profileDataHandler, ProfileCheckValidator &profileCheckValidator, ProfileChecker &profileChecker, const CheckSubgroup &subGroupChecks) const
Run checks on individual profiles sequentially.
void print(std::ostream &) const override
void entireSampleChecks(ProfileDataHandler &profileDataHandler, ProfileCheckValidator &profileCheckValidator, ProfileChecker &profileChecker, const CheckSubgroup &subGroupChecks) const
Run checks that use all of the profiles at once.
std::vector< int > nMismatches_
void applyFilter(const std::vector< bool > &, const Variables &, std::vector< std::vector< bool >> &) const override
ConventionalProfileProcessing(ioda::ObsSpace &, const Parameters_ &, std::shared_ptr< ioda::ObsDataVector< int > >, std::shared_ptr< ioda::ObsDataVector< float > >)
Options controlling the operation of the ConventionalProfileProcessing filter.
oops::Parameter< bool > PrintStationID
Print station ID.
oops::Parameter< bool > compareWithOPS
Compare with OPS values?
DataHandlerParameters DHParameters
Parameters related to profile data handler.
Base class for UFO QC filters.
ufo::Variables filtervars_
Profile QC check validator.
void validate(ProfileDataHandler &profileDataHandler, size_t commSize)
Validate check results against OPS values.
int getMismatches() const
Get number of mismatches between values produced in this code and the OPS equivalents.
void runChecks(ProfileDataHandler &profileDataHandler, const CheckSubgroup &subGroupChecks)
Run all checks requested.
oops::Variables getObsDiagNames() const
Get vector of obs diagnostic names for all checks.
oops::Variables getGeoVaLNames() const
Get vector of GeoVaL names for all checks.
oops::Variables getValidationGeoVaLNames() const
Get vector of validation GeoVaL names for all checks.
CheckSubgroupList getCheckSubgroups()
Get container of check subgroups.
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 initialiseNextProfile()
void updateProfileInformation()
void resetProfileIndices()
void writeQuantitiesToObsdb()
Information on each subgroup of checks.
static constexpr const char *const station_ID