IODA Bundle
qg/model/GetValuesTLAD.h
Go to the documentation of this file.
1 /*
2  * (C) Copyright 2019-2020 UCAR
3  *
4  * This software is licensed under the terms of the Apache Licence Version 2.0
5  * which can be obtained at http://www.apache.org/licenses/LICENSE-2.0.
6  */
7 
8 #ifndef QG_MODEL_GETVALUESTLAD_H_
9 #define QG_MODEL_GETVALUESTLAD_H_
10 
11 #include <memory>
12 #include <ostream>
13 #include <string>
14 
15 #include "eckit/config/Configuration.h"
16 
17 #include "oops/util/DateTime.h"
18 #include "oops/util/ObjectCounter.h"
19 #include "oops/util/Printable.h"
20 
21 #include "oops/qg/LocationsQG.h"
22 #include "oops/qg/QgFortran.h"
23 
24 namespace qg {
25  class GeometryQG;
26  class GomQG;
27  class IncrementQG;
28  class StateQG;
29 
30 /// \brief used for getting state values at observation locations
31 // and applying its TL & AD
32 class GetValuesTLAD : public util::Printable,
33  private util::ObjectCounter<GetValuesTLAD> {
34  public:
35  static const std::string classname() {return "qg::GetValuesTLAD";}
36 
37 /// \brief saves all locations \p locs to use during filling GeoVaLs
38  GetValuesTLAD(const GeometryQG &, const LocationsQG & locs,
39  const eckit::Configuration &);
41 
42  /// \brief fills in \p geovals for all observations in the timeframe (\p t1, \p t2],
43  // \p geovals are interpolated trilinearly from \p state at the nearest gridpoints
44  void setTrajectory(const StateQG & state, const util::DateTime & t1,
45  const util::DateTime & t2, GomQG & geovals);
46  /// \brief fills in \p geovals for all observations in the timeframe (\p t1, \p t2],
47  // as a tangent-linear operator applied to \p inc
48  void fillGeoVaLsTL(const IncrementQG & inc, const util::DateTime & t1,
49  const util::DateTime & t2, GomQG & geovals) const;
50  /// \brief fills in \p inc as adjoint operator applied to \p geovals for all
51  // observations in the timeframe (\p t1, \p t2]
52  void fillGeoVaLsAD(IncrementQG & inc, const util::DateTime & t1,
53  const util::DateTime & t2, const GomQG & geovals) const;
54 
55 /// Data
56  private:
57  void print(std::ostream &) const;
59 };
60 // -----------------------------------------------------------------------------
61 
62 } // namespace qg
63 
64 #endif // QG_MODEL_GETVALUESTLAD_H_
GeometryQG handles geometry for QG model.
Definition: GeometryQG.h:58
used for getting state values at observation locations
void fillGeoVaLsTL(const IncrementQG &inc, const util::DateTime &t1, const util::DateTime &t2, GomQG &geovals) const
fills in geovals for all observations in the timeframe (t1, t2],
void print(std::ostream &) const
Data.
GetValuesTLAD(const GeometryQG &, const LocationsQG &locs, const eckit::Configuration &)
saves all locations locs to use during filling GeoVaLs
void setTrajectory(const StateQG &state, const util::DateTime &t1, const util::DateTime &t2, GomQG &geovals)
fills in geovals for all observations in the timeframe (t1, t2],
void fillGeoVaLsAD(IncrementQG &inc, const util::DateTime &t1, const util::DateTime &t2, const GomQG &geovals) const
fills in inc as adjoint operator applied to geovals for all
static const std::string classname()
GomQG class to handle local model values for QG model.
Definition: GomQG.h:35
Increment Class: Difference between two states.
Definition: IncrementQG.h:64
LocationsQG class to handle locations for QG model.
Definition: LocationsQG.h:36
QG model state.
Definition: StateQG.h:42
The namespace for the qg model.