FV3 Bundle
ObsWSpeedQG.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/ObsWSpeedQG.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/ObsSpaceQG.h"
19 #include "model/ObsVecQG.h"
20 #include "model/QgFortran.h"
21 #include "oops/base/Variables.h"
22 #include "oops/util/Logger.h"
23 
24 // -----------------------------------------------------------------------------
25 namespace qg {
26 // -----------------------------------------------------------------------------
27 static ObsOpMaker<ObsWSpeedQG> makerWSpeed_("WSpeed");
28 // -----------------------------------------------------------------------------
29 
30 ObsWSpeedQG::ObsWSpeedQG(const ObsSpaceQG &, const eckit::Configuration & config)
31  : keyOperWspeed_(0), varin_(std::vector<std::string>{"u", "v"})
32 {
33  const eckit::Configuration * configc = &config;
34  qg_wspeed_setup_f90(keyOperWspeed_, &configc);
35  oops::Log::trace() << "ObsWSpeedQG created." << std::endl;
36 }
37 
38 // -----------------------------------------------------------------------------
39 
42  oops::Log::trace() << "ObsWSpeedQG destructed" << std::endl;
43 }
44 
45 // -----------------------------------------------------------------------------
46 
47 void ObsWSpeedQG::simulateObs(const GomQG & gom, ObsVecQG & ovec,
48  const ObsBias & bias) const {
49  qg_wspeed_eqv_f90(gom.toFortran(), ovec.toFortran(), bias.wspd());
50 }
51 
52 // -----------------------------------------------------------------------------
53 
54 void ObsWSpeedQG::print(std::ostream & os) const {
55  os << "ObsWSpeedQG::print not implemented";
56 }
57 
58 // -----------------------------------------------------------------------------
59 
60 } // namespace qg
GomQG class to handle local model values for QG model.
Definition: GomQG.h:31
void qg_wspeed_eqv_f90(const F90goms &, const F90ovec &, const double &)
static ObsOpMaker< ObsWSpeedQG > makerWSpeed_("WSpeed")
subroutine std(a, mean, stdv, area)
void simulateObs(const GomQG &, ObsVecQG &, const ObsBias &) const
Obs Operator.
Definition: ObsWSpeedQG.cc:47
Class to handle observation bias parameters.
void print(std::ostream &) const
Definition: ObsWSpeedQG.cc:54
void qg_wspeed_delete_f90(F90hop &)
int & toFortran()
Definition: ObsVecQG.h:52
void qg_wspeed_setup_f90(F90hop &, const eckit::Configuration *const *)
ObsWSpeedQG(const ObsSpaceQG &, const eckit::Configuration &)
Definition: ObsWSpeedQG.cc:30
virtual ~ObsWSpeedQG()
Definition: ObsWSpeedQG.cc:40
ObsVecQG class to handle vectors in observation space for QG model.
Definition: ObsVecQG.h:27
const double & wspd() const
Wrapper around ObsHelpQG, mostly to hide the factory.
Definition: ObsSpaceQG.h:35
F90hop keyOperWspeed_
Definition: ObsWSpeedQG.h:59
int & toFortran()
Definition: GomQG.h:59
The namespace for the qg model.