Go to the documentation of this file.
16 #include "eckit/config/LocalConfiguration.h"
17 #include "eckit/exception/Exceptions.h"
19 #include "oops/util/abor1_cpp.h"
20 #include "oops/util/DateTime.h"
21 #include "oops/util/Logger.h"
36 : keyConfig_(0), tstep_(), resol_(resol), traj_(),
39 eckit::LocalConfiguration(tlConf,
"trajectory"))),
42 if (tlConf.has(
"tlm variables")) linvars_ =
oops::Variables(tlConf,
"tlm variables");
43 tstep_ = util::Duration(tlConf.getString(
"tstep"));
46 oops::Log::trace() <<
"TlmQG created" << std::endl;
54 oops::Log::trace() <<
"TlmQG destructed" << std::endl;
66 oops::Log::debug() <<
"TlmQG::initializeTL" << dx.
fields() << std::endl;
71 if (itra ==
traj_.end()) {
73 ABORT(
"TlmQG: trajectory not available");
76 oops::Log::debug() <<
"TlmQG::stepTL fields in" << dx.
fields() << std::endl;
78 oops::Log::debug() <<
"TlmQG::stepTL fields out" << dx.
fields() << std::endl;
83 oops::Log::debug() <<
"TlmQG::finalizeTL" << dx.
fields() << std::endl;
88 oops::Log::debug() <<
"TlmQG::initializeAD" << dx.
fields() << std::endl;
94 if (itra ==
traj_.end()) {
96 ABORT(
"TlmQG: trajectory not available");
99 oops::Log::debug() <<
"TlmQG::stepAD fields in" << dx.
fields() << std::endl;
101 oops::Log::debug() <<
"TlmQG::stepAD fields out" << dx.
fields() << std::endl;
105 oops::Log::debug() <<
"TlmQG::finalizeAD" << dx.
fields() << std::endl;
109 os <<
"QG TLM Trajectory, nstep=" <<
traj_.size() << std::endl;
110 typedef std::map< util::DateTime, int >::const_iterator
trajICst;
111 if (
traj_.size() > 0) {
112 os <<
"QG TLM Trajectory: times are:";
114 os <<
" " << jtra->first;
115 int nx, ny, nz, nb, lq, lbc;
118 os << std::endl <<
" Resolution = " << nx <<
", " << ny <<
", " << nz;
120 os << std::endl <<
" Variable = potential vorticity";
122 os << std::endl <<
" Variable = streamfunction";
125 os << std::endl <<
" Boundary conditions are activated";
127 os << std::endl <<
" Boundary conditions are not activated";
129 std::vector<double> zstat(4*(1+nb));
131 for (
int jj = 0; jj < 1+nb; ++jj) {
132 std::ios_base::fmtflags f(os.flags());
133 os << std::endl <<
" Scaling=" << std::setprecision(4) << std::setw(7) << zstat[4*jj]
134 <<
", Min=" << std::fixed << std::setprecision(4) << std::setw(12) << zstat[4*jj+1]
135 <<
", Max=" << std::fixed << std::setprecision(4) << std::setw(12) <<zstat[4*jj+2]
136 <<
", RMS=" << std::fixed << std::setprecision(4) << std::setw(12) <<zstat[4*jj+3];
TlmQG(const GeometryQG &, const eckit::Configuration &)
The namespace for the main oops code.
void stepTL(IncrementQG &, const ModelBiasIncrement &) const override
const util::DateTime & validTime() const
The namespace for the qg model.
Model error for the QG model.
void qg_model_setup_f90(F90model &, const eckit::Configuration &)
std::map< util::DateTime, int >::const_iterator trajICst
void qg_fields_delete_f90(F90flds &)
void finalizeAD(IncrementQG &) const override
void changeResolution(const StateQG &xx)
Interpolate full fields.
void initializeTL(IncrementQG &) const override
Run TLM and its adjoint.
bool isForModel(const bool &) const
void setTrajectory(const StateQG &, StateQG &, const ModelBias &) override
Model trajectory computation.
void qg_model_delete_f90(F90model &)
void qg_model_propagate_tl_f90(const F90model &, const F90flds &, const F90flds &)
void initializeAD(IncrementQG &) const override
const int & toFortran() const
std::map< util::DateTime, int >::iterator trajIter
Increment Class: Difference between two states.
static oops::LinearModelMaker< QgTraits, TlmQG > makerQGTLM_("QgTLM")
int saveTrajectory(StateQG &, const ModelBias &) const
std::map< util::DateTime, F90flds > traj_
void finalizeTL(IncrementQG &) const override
void qg_fields_vars_f90(const F90flds &, int &, int &)
FieldsQG & fields()
Access to fields.
void qg_fields_gpnorm_f90(const F90flds &, const int &, double &)
void print(std::ostream &) const override
void qg_model_propagate_ad_f90(const F90model &, const F90flds &, const F90flds &)
GeometryQG handles geometry for QG model.
const util::DateTime & validTime() const
void qg_fields_sizes_f90(const F90flds &, int &, int &, int &, int &)
void stepAD(IncrementQG &, ModelBiasIncrement &) const override