11 #ifndef OOPS_RUNS_DIRAC_H_ 12 #define OOPS_RUNS_DIRAC_H_ 17 #include <boost/scoped_ptr.hpp> 19 #include "eckit/config/Configuration.h" 32 #include "oops/util/DateTime.h" 33 #include "oops/util/Duration.h" 34 #include "oops/util/Logger.h" 49 instantiateCovarFactory<MODEL>();
54 int execute(
const eckit::Configuration & fullConfig)
const {
56 const eckit::LocalConfiguration resolConfig(fullConfig,
"resolution");
58 Log::info() <<
"Setup resolution OK" << std::endl;
61 const eckit::LocalConfiguration varConfig(fullConfig,
"variables");
63 Log::info() <<
"Setup variables OK" << std::endl;
66 const eckit::LocalConfiguration initialConfig(fullConfig,
"initial");
68 Log::info() <<
"Setup initial state OK" << std::endl;
71 const util::DateTime bgndate(xx.
validTime());
72 Log::info() <<
"Setup times OK" << std::endl;
76 const eckit::LocalConfiguration diracConfig(fullConfig,
"dirac");
77 dxdir.
dirac(diracConfig);
86 Log::info() <<
"Setup increments OK" << std::endl;
89 const eckit::LocalConfiguration covarConfig(fullConfig,
"Covariance");
91 covarConfig, resol,
vars, xx, xx));
92 Log::info() <<
"Setup full ensemble B matrix OK" << std::endl;
94 if (covarConfig.has(
"localization")) {
96 const eckit::LocalConfiguration locConfig(covarConfig,
"localization");
97 boost::scoped_ptr<Localization_> loc_;
99 Log::trace() <<
"Setup localization OK" << std::endl;
102 loc_->multiply(dxdirout);
103 loc_->multiply(dxrndout);
104 Log::trace() <<
"Apply localization OK" << std::endl;
107 const eckit::LocalConfiguration output_localization(fullConfig,
"output_localization");
108 dxdirout.
write(output_localization);
109 Log::trace() <<
"Write increment OK" << std::endl;
110 Log::test() <<
"Increment: " << dxrndout << std::endl;
121 Log::test() <<
"Adjoint test: " <<
p1 <<
" / " <<
p2 << std::endl;
125 B->multiply(dxdir, dxdirout);
126 B->multiply(dxrnd, dxrndout);
127 Log::info() <<
"Apply B matrix OK" << std::endl;
130 const eckit::LocalConfiguration output_B(fullConfig,
"output_B");
131 dxdirout.
write(output_B);
132 Log::trace() <<
"Write increment OK" << std::endl;
133 Log::test() <<
"Increment: " << dxrndout << std::endl;
140 B->multiply(x1save, x1);
141 B->multiply(x2save, x2);
144 Log::test() <<
"Adjoint test: " <<
p1 <<
" / " <<
p2 << std::endl;
157 #endif // OOPS_RUNS_DIRAC_H_
void write(const eckit::Configuration &) const
Encapsulates the model state.
Geometry< MODEL > Geometry_
The namespace for the main oops code.
std::string appname() const
subroutine, public info(self)
Localization< MODEL > Localization_
Encapsulates the nonlinear forecast model.
double dot_product_with(const Increment &) const
int execute(const eckit::Configuration &fullConfig) const
Increment Class: Difference between two states.
Increment< MODEL > Increment_
void dirac(const eckit::Configuration &)
ModelAuxControl< MODEL > ModelAux_
const util::DateTime validTime() const
Time.