OOPS
ObsWSpeedTLAD.cc
Go to the documentation of this file.
1 /*
2  * (C) Copyright 2009-2016 ECMWF.
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  * In applying this licence, ECMWF does not waive the privileges and immunities
7  * granted to it by virtue of its status as an intergovernmental organisation nor
8  * does it submit to any jurisdiction.
9  */
10 
11 #include "model/ObsWSpeedTLAD.h"
12 
13 #include <vector>
14 
15 #include "eckit/config/Configuration.h"
16 #include "model/GomQG.h"
17 #include "model/ObsBias.h"
18 #include "model/ObsBiasIncrement.h"
19 #include "model/ObsSpaceQG.h"
20 #include "model/ObsVecQG.h"
21 #include "model/QgFortran.h"
22 #include "oops/base/Variables.h"
23 #include "oops/util/Logger.h"
24 
25 // -----------------------------------------------------------------------------
26 namespace qg {
27 // -----------------------------------------------------------------------------
29 // -----------------------------------------------------------------------------
30 
31 ObsWSpeedTLAD::ObsWSpeedTLAD(const ObsSpaceQG & odb, const eckit::Configuration & config)
32  : traj_(), varin_(std::vector<std::string>{"u", "v"})
33 {
34  qg_wspeed_gettraj_f90(odb.nobs(), varin_, traj_.toFortran());
35  oops::Log::trace() << "ObsWSpeedTLAD created" << std::endl;
36 }
37 
38 // -----------------------------------------------------------------------------
39 
40 void ObsWSpeedTLAD::setTrajectory(const GomQG & gom, const ObsBias &) {
42  oops::Log::trace() << "ObsWSpeedTLAD trajectory was set " << traj_ << std::endl;
43 }
44 
45 // -----------------------------------------------------------------------------
46 
47 void ObsWSpeedTLAD::simulateObsTL(const GomQG & gom, ObsVecQG & ovec,
48  const ObsBiasIncrement & bias) const {
50  traj_.toFortran(), bias.wspd());
51 }
52 
53 // -----------------------------------------------------------------------------
54 
55 void ObsWSpeedTLAD::simulateObsAD(GomQG & gom, const ObsVecQG & ovec,
56  ObsBiasIncrement & bias) const {
58  traj_.toFortran(), bias.wspd());
59 }
60 
61 // -----------------------------------------------------------------------------
62 
63 void ObsWSpeedTLAD::print(std::ostream & os) const {
64  os << "ObsStreamTLAD::print not implemented" << std::endl;
65 }
66 
67 // -----------------------------------------------------------------------------
68 
69 } // namespace qg
ObsSpaceQG.h
qg
The namespace for the qg model.
Definition: qg/model/AnalyticInit.cc:13
ObsBiasIncrement.h
QgFortran.h
qg::qg_wspeed_equiv_tl_f90
void qg_wspeed_equiv_tl_f90(const F90gom &, const F90ovec &, const F90gom &, const double &)
qg::ObsBias
Class to handle observation bias parameters.
Definition: qg/model/ObsBias.h:37
qg::qg_wspeed_settraj_f90
void qg_wspeed_settraj_f90(const F90gom &, const F90gom &)
qg::ObsSpaceQG
ObsSpace for QG model.
Definition: ObsSpaceQG.h:44
qg::ObsWSpeedTLAD::setTrajectory
void setTrajectory(const GomQG &, const ObsBias &) override
Obs Operator.
Definition: ObsWSpeedTLAD.cc:40
GomQG.h
qg::ObsOpTLADMaker
Definition: ObsOpBaseTLAD.h:71
qg::makerWSpeedTL_
static ObsOpTLADMaker< ObsWSpeedTLAD > makerWSpeedTL_("WSpeed")
ObsBias.h
ObsVecQG.h
qg::GomQG
GomQG class to handle local model values for QG model.
Definition: GomQG.h:33
qg::ObsWSpeedTLAD::print
void print(std::ostream &) const override
Definition: ObsWSpeedTLAD.cc:63
qg::ObsVecQG
ObsVecQG class to handle vectors in observation space for QG model.
Definition: ObsVecQG.h:34
qg::qg_wspeed_equiv_ad_f90
void qg_wspeed_equiv_ad_f90(const F90gom &, const F90ovec &, const F90gom &, double &)
qg::ObsWSpeedTLAD::traj_
GomQG traj_
Definition: ObsWSpeedTLAD.h:53
qg::GomQG::toFortran
const int & toFortran() const
Definition: GomQG.h:60
qg::ObsBiasIncrement
Definition: ObsBiasIncrement.h:31
qg::ObsWSpeedTLAD::ObsWSpeedTLAD
ObsWSpeedTLAD(const ObsSpaceQG &, const eckit::Configuration &)
Definition: ObsWSpeedTLAD.cc:31
qg::ObsWSpeedTLAD::simulateObsTL
void simulateObsTL(const GomQG &, ObsVecQG &, const ObsBiasIncrement &) const override
Definition: ObsWSpeedTLAD.cc:47
qg::qg_wspeed_gettraj_f90
void qg_wspeed_gettraj_f90(const int &, const oops::Variables &, const F90gom &)
qg::ObsVecQG::toFortran
const int & toFortran() const
Definition: ObsVecQG.h:62
qg::ObsWSpeedTLAD::simulateObsAD
void simulateObsAD(GomQG &, const ObsVecQG &, ObsBiasIncrement &) const override
Definition: ObsWSpeedTLAD.cc:55
ObsWSpeedTLAD.h
Variables.h
qg::ObsBiasIncrement::wspd
double & wspd()
Definition: ObsBiasIncrement.h:60