FV3 Bundle
ObsWindTLAD.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/ObsWindTLAD.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 // -----------------------------------------------------------------------------
28 static ObsOpTLADMaker<ObsWindTLAD> makerWindTL_("Wind");
29 // -----------------------------------------------------------------------------
30 
31 ObsWindTLAD::ObsWindTLAD(const ObsSpaceQG &, const eckit::Configuration & config)
32  : keyOperWind_(0), varin_(std::vector<std::string>{"u", "v"})
33 {
34  const eckit::Configuration * configc = &config;
35  qg_wind_setup_f90(keyOperWind_, &configc);
36  oops::Log::trace() << "ObsWindTLAD created" << std::endl;
37 }
38 
39 // -----------------------------------------------------------------------------
40 
42  oops::Log::trace() << "ObsWindTLAD destructed" << std::endl;
43 }
44 
45 // -----------------------------------------------------------------------------
46 
47 void ObsWindTLAD::setTrajectory(const GomQG &, const ObsBias &) {}
48 
49 // -----------------------------------------------------------------------------
50 
51 void ObsWindTLAD::simulateObsTL(const GomQG & gom, ObsVecQG & ovec,
52  const ObsBiasIncrement & bias) const {
53  qg_wind_equiv_tl_f90(gom.toFortran(), ovec.toFortran(), bias.wind());
54 }
55 
56 // -----------------------------------------------------------------------------
57 
58 void ObsWindTLAD::simulateObsAD(GomQG & gom, const ObsVecQG & ovec,
59  ObsBiasIncrement & bias) const {
60  qg_wind_equiv_ad_f90(gom.toFortran(), ovec.toFortran(), bias.wind());
61 }
62 
63 // -----------------------------------------------------------------------------
64 
65 void ObsWindTLAD::print(std::ostream & os) const {
66  os << "ObsStreamTLAD::print not implemented" << std::endl;
67 }
68 
69 // -----------------------------------------------------------------------------
70 
71 } // namespace qg
virtual ~ObsWindTLAD()
Definition: ObsWindTLAD.cc:41
GomQG class to handle local model values for QG model.
Definition: GomQG.h:31
subroutine std(a, mean, stdv, area)
static ObsOpTLADMaker< ObsWindTLAD > makerWindTL_("Wind")
void qg_wind_setup_f90(F90hop &, const eckit::Configuration *const *)
Class to handle observation bias parameters.
void print(std::ostream &) const override
Definition: ObsWindTLAD.cc:65
void simulateObsTL(const GomQG &, ObsVecQG &, const ObsBiasIncrement &) const override
Definition: ObsWindTLAD.cc:51
void simulateObsAD(GomQG &, const ObsVecQG &, ObsBiasIncrement &) const override
Definition: ObsWindTLAD.cc:58
int & toFortran()
Definition: ObsVecQG.h:52
void qg_wind_equiv_tl_f90(const F90goms &, const F90ovec &, const double &)
void setTrajectory(const GomQG &, const ObsBias &) override
Obs Operator.
Definition: ObsWindTLAD.cc:47
ObsVecQG class to handle vectors in observation space for QG model.
Definition: ObsVecQG.h:27
Wrapper around ObsHelpQG, mostly to hide the factory.
Definition: ObsSpaceQG.h:35
void qg_wind_equiv_ad_f90(const F90goms &, const F90ovec &, double &)
int & toFortran()
Definition: GomQG.h:59
The namespace for the qg model.
ObsWindTLAD(const ObsSpaceQG &, const eckit::Configuration &)
Definition: ObsWindTLAD.cc:31