8 #ifndef OOPS_RUNS_ENSRECENTER_H_
9 #define OOPS_RUNS_ENSRECENTER_H_
16 #include "eckit/config/LocalConfiguration.h"
23 #include "oops/util/DateTime.h"
38 int execute(
const eckit::Configuration & fullConfig)
const {
40 const eckit::LocalConfiguration resolConfig(fullConfig,
"geometry");
44 const eckit::LocalConfiguration bkgConfig(fullConfig,
"center");
45 State_ x_center(resol, bkgConfig);
48 std::vector<eckit::LocalConfiguration> ensConfig;
49 fullConfig.get(
"ensemble", ensConfig);
52 unsigned nm = ensConfig.size();
57 const double rk = 1.0/(
static_cast<double>(nm));
58 for (
unsigned jj = 0; jj < nm; ++jj) {
59 State_ x(resol, ensConfig[jj]);
61 Log::test() <<
"Original member " << jj <<
" : " << x << std::endl;
63 Log::test() <<
"Ensemble mean: " << std::endl << ensmean << std::endl;
66 const Variables vars(fullConfig,
"recenter variables");
69 for (
unsigned jj = 0; jj < nm; ++jj) {
70 State_ x(resol, ensConfig[jj]);
72 pert.
diff(x, ensmean);
77 eckit::LocalConfiguration recenterout(fullConfig,
"recentered output");
78 recenterout.set(
"member",
static_cast<int>(jj+1) );
80 Log::test() <<
"Recentered member " << jj <<
" : " << x << std::endl;
87 return "oops::EnsRecenter<" + MODEL::name() +
">";
94 #endif // OOPS_RUNS_ENSRECENTER_H_