8 #ifndef UFO_FILTERS_OBSFUNCTIONS_CONDITIONAL_H_
9 #define UFO_FILTERS_OBSFUNCTIONS_CONDITIONAL_H_
14 #include "oops/util/parameters/OptionalParameter.h"
15 #include "oops/util/parameters/Parameter.h"
16 #include "oops/util/parameters/Parameters.h"
17 #include "oops/util/parameters/RequiredParameter.h"
37 template <
typename FunctionValue>
44 oops::RequiredParameter<std::vector<WhereParameters>>
where{
"where",
this};
47 oops::RequiredParameter<FunctionValue>
value{
"value",
this};
51 template <
typename FunctionValue>
58 oops::RequiredParameter<std::vector<LocalConditionalParameters<FunctionValue>>>
cases{
63 oops::OptionalParameter<FunctionValue>
defaultvalue{
"defaultvalue",
this};
134 template <
typename FunctionValue>
137 explicit Conditional(
const eckit::LocalConfiguration & = eckit::LocalConfiguration());
Creates an array with values for specified variables selected by a series of where statements.
Conditional(const eckit::LocalConfiguration &=eckit::LocalConfiguration())
void compute(const ObsFilterData &, ioda::ObsDataVector< FunctionValue > &) const
compute the result of the function
const ufo::Variables & requiredVariables() const
geovals required to compute the function
ConditionalParameters< FunctionValue > options_
Parameters controlling the Conditional obs function.
oops::Parameter< bool > firstmatchingcase
oops::OptionalParameter< FunctionValue > defaultvalue
oops::RequiredParameter< std::vector< LocalConditionalParameters< FunctionValue > > > cases
oops::RequiredParameter< FunctionValue > value
Value to be assigned when this particular where clause is true.
oops::RequiredParameter< std::vector< WhereParameters > > where
ObsFilterData provides access to all data related to an ObsFilter.