11 #ifndef OOPS_BASE_OBSERVERSTLAD_H_
12 #define OOPS_BASE_OBSERVERSTLAD_H_
19 #include "eckit/config/Configuration.h"
29 #include "oops/util/DateTime.h"
30 #include "oops/util/Duration.h"
36 template <
typename MODEL,
typename OBS>
68 template <
typename MODEL,
typename OBS>
70 const eckit::Configuration & obsConfig)
71 : observers_(), winbgn_(obspaces.windowStart()), winend_(obspaces.windowEnd())
73 Log::trace() <<
"ObserversTLAD<MODEL, OBS>::ObserversTLAD start" << std::endl;
74 std::vector<eckit::LocalConfiguration> obsconfs = obsConfig.getSubConfigurations();
75 for (
size_t jj = 0; jj < obspaces.
size(); ++jj) {
76 bool passive = obsconfs[jj].getBool(
"monitoring only",
false);
77 std::unique_ptr<ObserverTLAD_> tmp;
78 if (!passive) tmp.reset(
new ObserverTLAD_(obspaces[jj], obsconfs[jj]));
81 Log::trace() <<
"ObserversTLAD<MODEL, OBS>::ObserversTLAD done" << std::endl;
84 template <
typename MODEL,
typename OBS>
87 Log::trace() <<
"ObserversTLAD<MODEL, OBS>::initializeTraj start" << std::endl;
88 std::shared_ptr<GetValueTLADs_> getvals(
new GetValueTLADs_(winbgn_, winend_));
89 for (
size_t jj = 0; jj < observers_.size(); ++jj) {
90 if (observers_[jj]) getvals->append(observers_[jj]->initializeTraj(geom, ybias[jj]));
93 Log::trace() <<
"ObserversTLAD<MODEL, OBS>::initializeTraj done" << std::endl;
96 template <
typename MODEL,
typename OBS>
98 Log::trace() <<
"ObserversTLAD<MODEL, OBS>::finalizeTraj start" << std::endl;
99 for (
size_t jj = 0; jj < observers_.size(); ++jj) {
100 if (observers_[jj]) observers_[jj]->finalizeTraj();
102 Log::trace() <<
"ObserversTLAD<MODEL, OBS>::finalizeTraj done" << std::endl;
105 template <
typename MODEL,
typename OBS>
107 Log::trace() <<
"ObserversTLAD<MODEL, OBS>::initializeTL start" << std::endl;
108 std::shared_ptr<GetValueTLADs_> getvals(
new GetValueTLADs_(winbgn_, winend_));
109 for (
size_t jj = 0; jj < observers_.size(); ++jj) {
110 if (observers_[jj]) getvals->append(observers_[jj]->initializeTL());
113 Log::trace() <<
"ObserversTLAD<MODEL, OBS>::initializeTL done" << std::endl;
116 template <
typename MODEL,
typename OBS>
118 Log::trace() <<
"ObserversTLAD<MODEL, OBS>::finalizeTL start" << std::endl;
119 for (
size_t jj = 0; jj < observers_.size(); ++jj) {
120 if (observers_[jj]) observers_[jj]->finalizeTL(ybias[jj], dy[jj]);
122 Log::trace() <<
"ObserversTLAD<MODEL, OBS>::finalizeTL done" << std::endl;
125 template <
typename MODEL,
typename OBS>
128 Log::trace() <<
"ObserversTLAD<MODEL, OBS>::initializeAD start" << std::endl;
129 std::shared_ptr<GetValueTLADs_> getvals(
new GetValueTLADs_(winbgn_, winend_));
130 for (
size_t jj = 0; jj < observers_.size(); ++jj) {
131 if (observers_[jj]) getvals->append(observers_[jj]->initializeAD(dy[jj], ybias[jj]));
134 Log::trace() <<
"ObserversTLAD<MODEL, OBS>::initializeAD done" << std::endl;
137 template <
typename MODEL,
typename OBS>
139 Log::trace() <<
"ObserversTLAD<MODEL, OBS>::finalizeAD start" << std::endl;
140 for (
size_t jj = 0; jj < observers_.size(); ++jj) {
141 if (observers_[jj]) observers_[jj]->finalizeAD();
143 Log::trace() <<
"ObserversTLAD<MODEL, OBS>::finalizeAD done" << std::endl;
Difference between two observation vectors.
Geometry class used in oops; subclass of interface class interface::Geometry.
Computes observation equivalent TL and AD to/from increments.
Holds a vector of ObsAuxControl.
Holds a vector of ObsAuxIncrement.
std::size_t size() const
Access.
Computes observation equivalent TL and AD to/from increments.
Computes observation equivalent TL and AD to/from increments.
ObserversTLAD(const ObsSpaces_ &, const eckit::Configuration &)
void initializeAD(const Departures_ &, ObsAuxIncrs_ &, PostProcTLAD_ &)
std::vector< std::unique_ptr< ObserverTLAD_ > > observers_
Geometry< MODEL > Geometry_
ObserverTLAD< MODEL, OBS > ObserverTLAD_
PostProcessorTLAD< MODEL > PostProcTLAD_
ObsAuxControls< OBS > ObsAuxCtrls_
ObsAuxIncrements< OBS > ObsAuxIncrs_
void finalizeTL(const ObsAuxIncrs_ &, Departures_ &)
void initializeTraj(const Geometry_ &, const ObsAuxCtrls_ &, PostProcTLAD_ &)
Observations< OBS > Observations_
void initializeTL(PostProcTLAD_ &)
ObsSpaces< OBS > ObsSpaces_
GetValueTLADs< MODEL, OBS > GetValueTLADs_
Departures< OBS > Departures_
Control model post processing.
void enrollProcessor(PostBaseTLAD_ *pp)
The namespace for the main oops code.