8 #ifndef OOPS_BASE_GETVALUETLAD_H_ 
    9 #define OOPS_BASE_GETVALUETLAD_H_ 
   25 #include "oops/util/DateTime.h" 
   26 #include "oops/util/Duration.h" 
   27 #include "oops/util/Logger.h" 
   40 template <
typename MODEL, 
typename OBS>
 
   52                const util::DateTime &, 
const util::DateTime &,
 
   56   std::unique_ptr<GeoVaLs_> 
finalize();
 
   67   void setAD(std::unique_ptr<GeoVaLs_> &);
 
   94 template <
typename MODEL, 
typename OBS>
 
   96                                        const util::DateTime & bgn, 
const util::DateTime & end,
 
   99   : winbgn_(bgn), winend_(end), hslot_(), locations_(locations),
 
  100     geovars_(vars), geovars_sizes_(geom.variableSizes(geovars_)),
 
  101     linvars_(varl), linvars_sizes_(geom.variableSizes(linvars_)),
 
  102     getvals_(geom, locations_, conf), geovals_(), gvalsad_(nullptr)
 
  104   Log::trace() << 
"GetValueTLAD::GetValueTLAD" << std::endl;
 
  109 template <
typename MODEL, 
typename OBS>
 
  111   Log::trace() << 
"GetValueTLAD::initializeTraj start" << std::endl;
 
  113   geovals_.reset(
new GeoVaLs_(locations_, geovars_, geovars_sizes_));
 
  114   Log::trace() << 
"GetValueTLAD::initializeTraj done" << std::endl;
 
  119 template <
typename MODEL, 
typename OBS>
 
  121   Log::trace() << 
"GetValueTLAD::processTraj start" << std::endl;
 
  123   util::DateTime t1 = std::max(xx.
validTime()-hslot_, winbgn_);
 
  124   util::DateTime t2 = std::min(xx.
validTime()+hslot_, winend_);
 
  127   getvals_.setTrajectory(xx, t1, t2, *geovals_);
 
  128   Log::trace() << 
"GetValueTLAD::processTraj done" << std::endl;
 
  133 template <
typename MODEL, 
typename OBS>
 
  135   Log::trace() << 
"GetValueTLAD::initializeTL start" << std::endl;
 
  137   geovals_.reset(
new GeoVaLs_(locations_, linvars_, linvars_sizes_));
 
  138   Log::trace() << 
"GetValueTLAD::initializeTL done" << std::endl;
 
  143 template <
typename MODEL, 
typename OBS>
 
  145   Log::trace() << 
"GetValueTLAD::processTL start" << std::endl;
 
  147   util::DateTime t1 = std::max(dx.
validTime()-hslot_, winbgn_);
 
  148   util::DateTime t2 = std::min(dx.
validTime()+hslot_, winend_);
 
  151   getvals_.fillGeoVaLsTL(dx, t1, t2, *geovals_);
 
  152   Log::trace() << 
"GetValueTLAD::processTL done" << std::endl;
 
  157 template <
typename MODEL, 
typename OBS>
 
  159   Log::trace() << 
"GetValueTLAD::finalize" << std::endl;
 
  161   return std::move(geovals_);
 
  166 template <
typename MODEL, 
typename OBS>
 
  169   gvalsad_ = std::move(geovals);
 
  170   Log::trace() << 
"GetValueTLAD::setAD" << std::endl;
 
  175 template <
typename MODEL, 
typename OBS>
 
  178   Log::trace() << 
"GetValueTLAD::initializeAD" << std::endl;
 
  183 template <
typename MODEL, 
typename OBS>
 
  185   Log::trace() << 
"GetValueTLAD::processAD start" << std::endl;
 
  187   util::DateTime t1 = std::max(dx.
validTime()-hslot_, winbgn_);
 
  188   util::DateTime t2 = std::min(dx.
validTime()+hslot_, winend_);
 
  191   getvals_.fillGeoVaLsAD(dx, t1, t2, *gvalsad_);
 
  193   Log::trace() << 
"GetValueTLAD::processAD done" << std::endl;
 
  198 template <
typename MODEL, 
typename OBS>
 
Geometry class used in oops; subclass of interface class interface::Geometry.
TLAD of filling GeoVaLs with requested variables at requested locations during model run.
void initializeTraj(const util::Duration &)
Linearization trajectory.
const std::vector< size_t > linvars_sizes_
Variables needed from linear model.
const Locations_ & locations_
Half time slot.
Locations< OBS > Locations_
void initializeAD(const util::Duration &)
void processAD(Increment_ &)
const Variables & requiredVariables() const
Variables that will be required from the State.
LinearGetValues< MODEL, OBS > GetValues_
Geometry< MODEL > Geometry_
util::Duration hslot_
End of assimilation window.
void setAD(std::unique_ptr< GeoVaLs_ > &)
AD.
std::unique_ptr< GeoVaLs_ > geovals_
GetValues used to fill in GeoVaLs.
void initializeTL(const util::Duration &)
TL.
std::unique_ptr< const GeoVaLs_ > gvalsad_
GeoVaLs that are filled in.
const Variables geovars_
locations of observations
std::unique_ptr< GeoVaLs_ > finalize()
Same finalize is used for traj and TL.
void processTraj(const State_ &)
void processTL(const Increment_ &)
GetValueTLAD(const eckit::Configuration &, const Geometry_ &, const util::DateTime &, const util::DateTime &, const Locations_ &, const Variables &, const Variables &)
Saves Locations and Variables to be processed.
const std::vector< size_t > geovars_sizes_
Variables needed from model.
util::DateTime winend_
Begining of assimilation window.
Increment< MODEL > Increment_
Increment class used in oops.
sets trajectory and computes TL and AD for GetValues
Locations of observations for observation operator.
State class used in oops; subclass of interface class interface::State.
const util::DateTime validTime() const
Accessor to the time of this Increment.
const util::DateTime validTime() const
Accessor to the time of this State.
The namespace for the main oops code.