11 #ifndef OOPS_ASSIMILATION_CONTROLINCREMENT_H_ 12 #define OOPS_ASSIMILATION_CONTROLINCREMENT_H_ 18 #include "eckit/config/Configuration.h" 23 #include "oops/util/dot_product.h" 24 #include "oops/util/Logger.h" 25 #include "oops/util/ObjectCounter.h" 26 #include "oops/util/Printable.h" 46 template<
typename MODEL>
48 private util::ObjectCounter<ControlIncrement<MODEL> > {
56 static const std::string
classname() {
return "oops::ControlIncrement";}
75 void read(
const eckit::Configuration &);
76 void write(
const eckit::Configuration &)
const;
94 void print(std::ostream &)
const;
102 template<
typename MODEL>
104 : incrm4d_(jb.jbState()), modbias_(jb.resolution(), jb.jbModBias().config()),
105 obsbias_(jb.jbObsBias().config())
107 Log::trace() <<
"ControlIncrement:ControlIncrement created." << std::endl;
110 template<
typename MODEL>
112 : incrm4d_(other.incrm4d_,
copy), modbias_(other.modbias_,
copy),
113 obsbias_(other.obsbias_,
copy)
115 Log::trace() <<
"ControlIncrement:ControlIncrement copied." << std::endl;
118 template<
typename MODEL>
120 const eckit::Configuration & tlConf)
121 : incrm4d_(other.incrm4d_, tlConf), modbias_(other.modbias_, tlConf),
122 obsbias_(other.obsbias_, tlConf)
124 Log::trace() <<
"ControlIncrement:ControlIncrement copied." << std::endl;
127 template<
typename MODEL>
130 : incrm4d_(geom, other.incrm4d_), modbias_(other.modbias_,
true),
131 obsbias_(other.obsbias_,
true)
133 Log::trace() <<
"ControlIncrement:ControlIncrement copied." << std::endl;
136 template<
typename MODEL>
163 template<
typename MODEL>
171 template<
typename MODEL>
178 template<
typename MODEL>
185 template<
typename MODEL>
187 incrm4d_.read(config);
188 modbias_.read(config);
189 obsbias_.read(config);
192 template<
typename MODEL>
194 incrm4d_.write(config);
195 modbias_.write(config);
196 obsbias_.write(config);
199 template <
typename MODEL>
206 template<
typename MODEL>
209 zz += dot_product(incrm4d_, x2.
incrm4d_);
210 zz += dot_product(modbias_, x2.
modbias_);
211 zz += dot_product(obsbias_, x2.
obsbias_);
217 #endif // OOPS_ASSIMILATION_CONTROLINCREMENT_H_
ControlIncrement & operator-=(const ControlIncrement &)
void read(const eckit::Configuration &)
I/O and diagnostics.
Geometry_ geometry() const
Get geometry.
ObsAuxIncr_ & obsVar()
Get augmented observation control variable.
subroutine, public copy(self, rhs)
ModelAuxIncr_ & modVar()
Get augmented model control variable.
integer(long), parameter true
const ObsAuxIncr_ & obsVar() const
ControlIncrement & operator*=(const double)
The namespace for the main oops code.
const ModelAuxIncr_ & modVar() const
Increment4D_ & state()
Get state control variable.
ControlIncrement & operator=(const ControlIncrement &)
CostJbTotal< MODEL > JbTotal_
Control variable increment.
Increment4D< MODEL > Increment4D_
double dot_product_with(const ControlIncrement &) const
const Increment4D_ & state() const
ObsAuxIncrement< MODEL > ObsAuxIncr_
ModelAuxIncrement< MODEL > ModelAuxIncr_
Geometry_ geometry() const
Get geometry.
static const std::string classname()
Geometry< MODEL > Geometry_
void zero()
Linear algebra operators.
ControlIncrement(const JbTotal_ &)
Constructor, destructor.
void write(const eckit::Configuration &) const
void print(std::ostream &) const
ControlIncrement & operator+=(const ControlIncrement &)
void axpy(const double, const ControlIncrement &)