11 #ifndef OOPS_RUNS_EXTERNALDFI_H_ 12 #define OOPS_RUNS_EXTERNALDFI_H_ 16 #include <boost/scoped_ptr.hpp> 17 #include <boost/shared_ptr.hpp> 19 #include "eckit/config/LocalConfiguration.h" 29 #include "oops/util/abor1_cpp.h" 30 #include "oops/util/DateTime.h" 31 #include "oops/util/Duration.h" 32 #include "oops/util/Logger.h" 48 int execute(
const eckit::Configuration & fullConfig)
const {
50 const eckit::LocalConfiguration resolConfig(fullConfig,
"resolution");
54 const eckit::LocalConfiguration modelConfig(fullConfig,
"model");
58 const eckit::LocalConfiguration initialConfig(fullConfig,
"initial");
60 Log::test() <<
"Initial state: " << xx << std::endl;
63 const ModelAux_ moderr(resol, initialConfig);
66 const util::Duration fclength(fullConfig.getString(
"forecast_length"));
67 const util::DateTime bgndate(xx.validTime());
68 const util::DateTime enddate(bgndate + fclength);
69 Log::info() <<
"Running forecast from " << bgndate <<
" to " << enddate << std::endl;
74 eckit::LocalConfiguration prtConf;
75 fullConfig.get(
"prints", prtConf);
81 const eckit::LocalConfiguration dfiConf(fullConfig,
"dfi");
82 const util::Duration dfispan(dfiConf.getString(
"filter_span"));
83 const util::DateTime dfitime(bgndate+dfispan/2);
84 boost::shared_ptr< WeightedMean<MODEL, State_> >
89 model.forecast(xx, moderr, dfispan, pp);
92 boost::scoped_ptr<State_> xdfi(pdfi->releaseMean());
93 Log::test() <<
"Filtered state: " << *xdfi << std::endl;
96 const eckit::LocalConfiguration outConfig(fullConfig,
"output");
100 const util::Duration fclen = fclength - dfispan/2;
101 if (fclength < util::Duration(0)) ABORT(
"DFI: fliter span longer than forecast");
103 model.forecast(zz, moderr, fclen, post);
104 Log::test() <<
"Final state: " << zz << std::endl;
117 #endif // OOPS_RUNS_EXTERNALDFI_H_
Handles writing-out of forecast fields.
Geometry< MODEL > Geometry_
Encapsulates the model state.
int execute(const eckit::Configuration &fullConfig) const
The namespace for the main oops code.
Handles writing-out of forecast fields.
subroutine, public info(self)
Encapsulates the nonlinear forecast model.
ModelAuxControl< MODEL > ModelAux_
Compute time average of states or increments during model run.
Control model post processing.
std::string appname() const
void enrollProcessor(PostBase_ *pp)