Go to the documentation of this file.
12 #ifndef OOPS_RUNS_HOFX_H_
13 #define OOPS_RUNS_HOFX_H_
17 #include "eckit/config/LocalConfiguration.h"
18 #include "eckit/exception/Exceptions.h"
32 #include "oops/util/DateTime.h"
33 #include "oops/util/Duration.h"
34 #include "oops/util/Logger.h"
52 instantiateObsErrorFactory<OBS>();
53 instantiateObsFilterFactory<OBS>();
58 int execute(
const eckit::Configuration & fullConfig)
const {
60 const util::Duration winlen(fullConfig.getString(
"window length"));
61 const util::DateTime winbgn(fullConfig.getString(
"window begin"));
62 const util::DateTime winend(winbgn + winlen);
63 Log::info() <<
"Observation window from " << winbgn <<
" to " << winend << std::endl;
66 const eckit::LocalConfiguration geometryConfig(fullConfig,
"geometry");
70 const eckit::LocalConfiguration modelConfig(fullConfig,
"model");
74 const eckit::LocalConfiguration initialConfig(fullConfig,
"initial condition");
75 State_ xx(geometry, initialConfig);
76 const util::Duration flength(fullConfig.getString(
"forecast length"));
77 Log::test() <<
"Initial state: " << xx << std::endl;
81 Log::error() <<
"Observation window can not be outside of forecast window." << std::endl;
82 Log::error() <<
"Obs window: " << winbgn <<
" to " << winend << std::endl;
83 Log::error() <<
"Forecast runs from: " << xx.
validTime() <<
" for " << flength << std::endl;
84 throw eckit::BadValue(
"Observation window can not be outside of forecast window.");
90 eckit::LocalConfiguration prtConf;
91 fullConfig.get(
"prints", prtConf);
103 Log::test() <<
"Final state: " << xx << std::endl;
104 Log::test() <<
"H(x): " << std::endl << yobs <<
"End H(x)" << std::endl;
108 bool obspert = fullConfig.getBool(
"obs perturbations",
false);
112 Log::test() <<
"Perturbed H(x): " << std::endl << yobs <<
"End Perturbed H(x)" << std::endl;
116 const bool makeobs = fullConfig.getBool(
"make obs",
false);
118 yobs.
save(
"ObsValue");
128 return "oops::HofX<" + MODEL::name() +
", " + OBS::name() +
">";
135 #endif // OOPS_RUNS_HOFX_H_
const util::DateTime validTime() const
Time.
The namespace for the main oops code.
void perturb(const ObsErrors_ &)
Perturbations.
ObsSpaces< OBS > ObsSpaces_
Computes observation operator (while running model, or with State4D)
void saveQcFlags(const std::string &) const
saves QC flags to ObsSpaces
Geometry< MODEL > Geometry_
std::string appname() const
\biref Container for ObsErrors for all observation types that are used in DA
ObsErrors< OBS > ObsErrors_
HofX(const eckit::mpi::Comm &comm=oops::mpi::world())
Observations< OBS > Observations_
const Observations_ & compute(const Model_ &, State_ &, PostProcessor_ &, const util::Duration &)
Computes 4D H(x) (running the model)
void enrollProcessor(PostBase_ *pp)
const eckit::mpi::Comm & getComm() const
void saveObsErrors(const std::string &) const
saves obs error variances (modified in QC) to ObsSpaces
Handles writing-out of forecast fields.
Geometry class used in oops; subclass of interface class above.
Encapsulates the model state.
Control model post processing.
const eckit::mpi::Comm & world()
Default communicator with all MPI tasks (ie MPI_COMM_WORLD)
int execute(const eckit::Configuration &fullConfig) const
Encapsulates the nonlinear forecast model Note: to see methods that need to be implemented in the for...
void save(const std::string &) const
Save/read observations values.