11 #ifndef OOPS_RUNS_GENENSPERTB_H_
12 #define OOPS_RUNS_GENENSPERTB_H_
19 #include "eckit/config/Configuration.h"
32 #include "oops/util/DateTime.h"
33 #include "oops/util/Duration.h"
34 #include "oops/util/Logger.h"
48 instantiateCovarFactory<MODEL>();
53 int execute(
const eckit::Configuration & fullConfig)
const {
55 const eckit::LocalConfiguration resolConfig(fullConfig,
"geometry");
59 const eckit::LocalConfiguration modelConfig(fullConfig,
"model");
60 const Model_ model(resol, modelConfig);
63 const eckit::LocalConfiguration initialConfig(fullConfig,
"initial condition");
64 const State_ xx(resol, initialConfig);
65 Log::test() <<
"Initial state: " << xx << std::endl;
68 const ModelAux_ moderr(resol, fullConfig.getSubConfiguration(
"model aux control"));
71 const util::Duration fclength(fullConfig.getString(
"forecast length"));
72 const util::DateTime bgndate(xx.
validTime());
73 const util::DateTime enddate(bgndate + fclength);
74 Log::info() <<
"Running forecast from " << bgndate <<
" to " << enddate << std::endl;
77 const Variables vars(fullConfig,
"perturbed variables");
80 const eckit::LocalConfiguration covar(fullConfig,
"background error");
81 std::unique_ptr< ModelSpaceCovarianceBase<MODEL> >
86 const int members = fullConfig.getInt(
"members");
87 for (
int jm = 0; jm < members; ++jm) {
98 eckit::LocalConfiguration outConfig(fullConfig,
"output");
99 outConfig.set(
"member", jm+1);
104 model.
forecast(xp, moderr, fclength, post);
105 Log::test() <<
"Member " << jm <<
" final state: " << xp << std::endl;
const eckit::mpi::Comm & getComm() const
Geometry< MODEL > Geometry_
std::string appname() const
int execute(const eckit::Configuration &fullConfig) const
GenEnsPertB(const eckit::mpi::Comm &comm=oops::mpi::world())
ModelAuxControl< MODEL > ModelAux_
Increment< MODEL > Increment_
Geometry class used in oops; subclass of interface class interface::Geometry.
Increment class used in oops.
Abstract nonlinear forecast model used by high level algorithms and applications.
void forecast(State_ &xx, const ModelAux_ &, const util::Duration &len, PostProcessor< State_ > &post) const
Run the forecast from state xx for len time, with post postprocessors Does not need to be implemented...
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.
const util::DateTime validTime() const
Accessor to the time of this State.
const eckit::mpi::Comm & world()
Default communicator with all MPI tasks (ie MPI_COMM_WORLD)
The namespace for the main oops code.