11 #ifndef OOPS_RUNS_VARIATIONAL_H_
12 #define OOPS_RUNS_VARIATIONAL_H_
18 #include "eckit/config/LocalConfiguration.h"
35 #include "oops/util/DateTime.h"
36 #include "oops/util/Logger.h"
37 #include "oops/util/printRunStats.h"
47 instantiateCostFactory<MODEL, OBS>();
48 instantiateCovarFactory<MODEL>();
49 instantiateMinFactory<MODEL, OBS>();
50 instantiateObsErrorFactory<OBS>();
51 instantiateObsFilterFactory<OBS>();
52 instantiateLinearModelFactory<MODEL>();
53 instantiateVariableChangeFactory<MODEL>();
58 int execute(
const eckit::Configuration & fullConfig)
const {
62 util::printRunStats(
"Variational start");
65 eckit::LocalConfiguration cfConf(fullConfig,
"cost function");
66 std::unique_ptr<CostFunction<MODEL, OBS>>
68 Log::trace() <<
"Variational: cost function has been set up" << std::endl;
72 Log::trace() <<
"Variational: first guess has been set up" << std::endl;
75 eckit::LocalConfiguration varConf(fullConfig,
"variational");
76 int iouter = IncrementalAssimilation<MODEL, OBS>(xx, *J, varConf);
77 Log::info() <<
"Variational: incremental assimilation done "
78 << iouter <<
" iterations." << std::endl;
82 const util::DateTime winbgn(cfConf.getString(
"window begin"));
83 const eckit::LocalConfiguration outConfig(fullConfig,
"output");
86 eckit::LocalConfiguration finalConfig(fullConfig,
"final");
87 finalConfig.set(
"iteration", iouter);
88 if (finalConfig.has(
"prints")) {
89 const eckit::LocalConfiguration prtConfig(finalConfig,
"prints");
93 J->evaluate(xx, finalConfig, post);
98 util::printRunStats(
"Variational end");
104 return "oops::Variational<" + MODEL::name() +
", " + OBS::name() +
">";
const eckit::mpi::Comm & getComm() const
ObsAuxCtrls_ & obsVar()
Get augmented observation control variable.
void write(const eckit::Configuration &) const
Control model post processing.
void enrollProcessor(PostBase_ *pp)
State class used in oops; subclass of interface class interface::State.
Handles writing-out of forecast fields.
Handles writing-out of forecast fields.
Variational(const eckit::mpi::Comm &comm=oops::mpi::world())
int execute(const eckit::Configuration &fullConfig) const
std::string appname() const
const eckit::mpi::Comm & world()
Default communicator with all MPI tasks (ie MPI_COMM_WORLD)
The namespace for the main oops code.