8 #ifndef UFO_FILTERS_THINNING_H_
9 #define UFO_FILTERS_THINNING_H_
16 #include "ioda/ObsDataVector.h"
17 #include "oops/util/ObjectCounter.h"
18 #include "oops/util/parameters/OptionalParameter.h"
19 #include "oops/util/parameters/Parameter.h"
20 #include "oops/util/parameters/RequiredParameter.h"
29 template <
typename DATATYPE>
class ObsDataVector;
41 oops::RequiredParameter<float>
amount{
"amount",
this};
45 oops::OptionalParameter<int>
randomSeed{
"random seed",
this};
48 oops::Parameter<int>
member{
"member", 0,
this};
56 private util::ObjectCounter<Thinning> {
62 static const std::string
classname() {
return "ufo::Thinning";}
70 void print(std::ostream &)
const override;
72 std::vector<std::vector<bool>> &)
const override;
Base class for UFO QC filters.
Parameters shared by all filters having a default action (typically "reject").
Randomly thin a given percentage of observations.
static const std::string classname()
void applyFilter(const std::vector< bool > &, const Variables &, std::vector< std::vector< bool >> &) const override
ThinningParameters Parameters_
void print(std::ostream &) const override
int qcFlag() const override
Thinning(ioda::ObsSpace &, const Parameters_ &, std::shared_ptr< ioda::ObsDataVector< int > >, std::shared_ptr< ioda::ObsDataVector< float > >)
Parameters controlling the operation of the Thinning filter.
oops::Parameter< int > member
Index of the ensemble member.
oops::OptionalParameter< int > randomSeed
oops::RequiredParameter< float > amount
(Approximate) fraction of observations to be thinned.