OOPS
ObsWindQG.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/ObsWindQG.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 // -----------------------------------------------------------------------------
28 // -----------------------------------------------------------------------------
29 
30 ObsWindQG::ObsWindQG(const ObsSpaceQG & odb, const eckit::Configuration & config)
31  : obsdb_(odb), varin_(std::vector<std::string>{"u", "v"})
32 {
33  oops::Log::trace() << "ObsWindQG created." << std::endl;
34 }
35 
36 // -----------------------------------------------------------------------------
37 
38 void ObsWindQG::simulateObs(const GomQG & gom, ObsVecQG & ovec,
39  const ObsBias & bias) const {
40  qg_wind_equiv_f90(gom.toFortran(), ovec.toFortran(), bias.wind());
41 }
42 
43 // -----------------------------------------------------------------------------
44 
45 std::unique_ptr<LocationsQG> ObsWindQG::locations(const util::DateTime & t1,
46  const util::DateTime & t2) const {
47  return obsdb_.locations(t1, t2);
48 }
49 
50 // -----------------------------------------------------------------------------
51 
52 void ObsWindQG::print(std::ostream & os) const {
53  os << "ObsWindQG::print not implemented";
54 }
55 
56 // -----------------------------------------------------------------------------
57 
58 } // namespace qg
ObsWindQG.h
qg::ObsWindQG::simulateObs
void simulateObs(const GomQG &, ObsVecQG &, const ObsBias &) const override
Obs Operator.
Definition: ObsWindQG.cc:38
ObsSpaceQG.h
qg
The namespace for the qg model.
Definition: qg/model/AnalyticInit.cc:13
QgFortran.h
qg::ObsBias
Class to handle observation bias parameters.
Definition: qg/model/ObsBias.h:37
qg::ObsSpaceQG
ObsSpace for QG model.
Definition: ObsSpaceQG.h:44
GomQG.h
qg::makerWind_
static ObsOpMaker< ObsWindQG > makerWind_("Wind")
qg::ObsBias::wind
const double & wind() const
Definition: qg/model/ObsBias.h:61
ObsBias.h
ObsVecQG.h
qg::GomQG
GomQG class to handle local model values for QG model.
Definition: GomQG.h:33
qg::ObsWindQG::obsdb_
const ObsSpaceQG & obsdb_
Definition: ObsWindQG.h:56
qg::ObsWindQG::ObsWindQG
ObsWindQG(const ObsSpaceQG &, const eckit::Configuration &)
Definition: ObsWindQG.cc:30
qg::ObsWindQG::locations
std::unique_ptr< LocationsQG > locations(const util::DateTime &, const util::DateTime &) const override
Definition: ObsWindQG.cc:45
qg::ObsVecQG
ObsVecQG class to handle vectors in observation space for QG model.
Definition: ObsVecQG.h:34
qg::qg_wind_equiv_f90
void qg_wind_equiv_f90(const F90gom &, const F90ovec &, const double &)
qg::GomQG::toFortran
const int & toFortran() const
Definition: GomQG.h:60
qg::ObsOpMaker
Definition: ObsOpBaseQG.h:72
qg::ObsSpaceQG::locations
std::unique_ptr< LocationsQG > locations(const util::DateTime &t1, const util::DateTime &t2) const
create locations between times (t1, t2]
Definition: ObsSpaceQG.cc:182
qg::ObsWindQG::print
void print(std::ostream &) const override
Definition: ObsWindQG.cc:52
qg::ObsVecQG::toFortran
const int & toFortran() const
Definition: ObsVecQG.h:62
Variables.h