12 #include "ioda/ObsSpace.h"
13 #include "oops/util/abor1_cpp.h"
14 #include "oops/util/Logger.h"
21 return odb_.obsvariables();
28 oops::Log::error() << name <<
" already registered in ufo::LinearObsOperatorFactory."
30 ABORT(
"Element already registered in ufo::LinearObsOperatorFactory.");
39 oops::Log::trace() <<
"LinearObsOperatorBase::create starting" << std::endl;
41 const std::string &
id = params.
name.value().value();
43 typename std::map<std::string, LinearObsOperatorFactory*>::iterator jloc =
getMakers().find(
id);
45 oops::Log::error() <<
id <<
" does not exist in ufo::LinearObsOperatorFactory." << std::endl;
46 ABORT(
"Element does not exist in ufo::LinearObsOperatorFactory.");
49 oops::Log::trace() <<
"LinearObsOperatorBase::create done" << std::endl;
55 std::unique_ptr<ObsOperatorParametersBase>
57 typename std::map<std::string, LinearObsOperatorFactory*>::iterator it =
60 throw std::runtime_error(name +
" does not exist in ufo::LinearObsOperatorFactory");
62 return it->second->makeParameters();
virtual oops::Variables simulatedVars() const
List of variables simulated by this operator.
const ioda::ObsSpace & odb_
static std::unique_ptr< ObsOperatorParametersBase > createParameters(const std::string &name)
Create and return an instance of the subclass of ObsOperatorParametersBase storing parameters of line...
LinearObsOperatorFactory(const std::string &name)
Register a maker able to create linear observation operators of type name.
static std::map< std::string, LinearObsOperatorFactory * > & getMakers()
static LinearObsOperatorBase * create(const ioda::ObsSpace &, const ObsOperatorParametersBase &)
Create and return a new linear observation operator.
Base class of classes storing configuration parameters of specific observation operators and linear o...
oops::OptionalParameter< std::string > name
Observation operator type.