11 #ifndef OOPS_INTERFACE_MODELAUXCONTROL_H_
12 #define OOPS_INTERFACE_MODELAUXCONTROL_H_
19 #include "oops/util/Logger.h"
20 #include "oops/util/ObjectCounter.h"
21 #include "oops/util/Printable.h"
22 #include "oops/util/Timer.h"
41 template <
typename MODEL>
43 private util::ObjectCounter<ModelAuxControl<MODEL> > {
48 static const std::string
classname() {
return "oops::ModelAuxControl";}
66 void read(
const eckit::Configuration &);
68 void write(
const eckit::Configuration &)
const;
74 void print(std::ostream &)
const;
75 std::unique_ptr<ModelAuxControl_>
aux_;
80 template<
typename MODEL>
82 const eckit::Configuration & conf) : aux_()
84 Log::trace() <<
"ModelAuxControl<MODEL>::ModelAuxControl starting" << std::endl;
85 util::Timer timer(
classname(),
"ModelAuxControl");
87 Log::trace() <<
"ModelAuxControl<MODEL>::ModelAuxControl done" << std::endl;
92 template<
typename MODEL>
96 Log::trace() <<
"ModelAuxControl<MODEL>::ModelAuxControl interpolated starting" << std::endl;
97 util::Timer timer(
classname(),
"ModelAuxControl");
99 Log::trace() <<
"ModelAuxControl<MODEL>::ModelAuxControl interpolated done" << std::endl;
104 template<
typename MODEL>
106 const bool copy) : aux_()
108 Log::trace() <<
"ModelAuxControl<MODEL>::ModelAuxControl copy starting" << std::endl;
109 util::Timer timer(
classname(),
"ModelAuxControl");
111 Log::trace() <<
"ModelAuxControl<MODEL>::ModelAuxControl copy done" << std::endl;
116 template<
typename MODEL>
118 Log::trace() <<
"ModelAuxControl<MODEL>::~ModelAuxControl starting" << std::endl;
119 util::Timer timer(classname(),
"~ModelAuxControl");
121 Log::trace() <<
"ModelAuxControl<MODEL>::~ModelAuxControl done" << std::endl;
126 template<
typename MODEL>
128 Log::trace() <<
"ModelAuxControl<MODEL>::read starting" << std::endl;
129 util::Timer timer(classname(),
"read");
131 Log::trace() <<
"ModelAuxControl<MODEL>::read done" << std::endl;
136 template<
typename MODEL>
138 Log::trace() <<
"ModelAuxControl<MODEL>::write starting" << std::endl;
139 util::Timer timer(classname(),
"write");
141 Log::trace() <<
"ModelAuxControl<MODEL>::write done" << std::endl;
146 template<
typename MODEL>
148 Log::trace() <<
"ModelAuxControl<MODEL>::norm starting" << std::endl;
149 util::Timer timer(classname(),
"norm");
150 double zz = aux_->norm();
151 Log::trace() <<
"ModelAuxControl<MODEL>::norm done" << std::endl;
157 template<
typename MODEL>
159 Log::trace() <<
"ModelAuxControl<MODEL>::print starting" << std::endl;
160 util::Timer timer(classname(),
"print");
162 Log::trace() <<
"ModelAuxControl<MODEL>::print done" << std::endl;
Geometry class used in oops; subclass of interface class interface::Geometry.
Auxiliary state related to model (could be e.g. model bias), not used at the moment.
ModelAuxControl(const Geometry_ &resol, const eckit::Configuration &conf)
Constructor for specified resol and conf.
MODEL::ModelAuxControl ModelAuxControl_
const ModelAuxControl_ & modelauxcontrol() const
const Accessor
double norm() const
Norm (used in tests)
ModelAuxControl & operator=(const ModelAuxControl &)
void read(const eckit::Configuration &)
Read this ModelAuxControl from file.
static const std::string classname()
~ModelAuxControl()
Destructor (defined explicitly for timing and tracing)
void write(const eckit::Configuration &) const
Write this ModelAuxControl out to file.
Geometry< MODEL > Geometry_
void print(std::ostream &) const
ModelAuxControl_ & modelauxcontrol()
Accessor.
std::unique_ptr< ModelAuxControl_ > aux_
const Geometry_ & geometry() const
The namespace for the main oops code.