FV3 Bundle
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 // -----------------------------------------------------------------------------
27 static ObsOpMaker<ObsWindQG> makerWind_("Wind");
28 // -----------------------------------------------------------------------------
29 
30 ObsWindQG::ObsWindQG(const ObsSpaceQG &, const eckit::Configuration & config)
31  : keyOperWind_(0), varin_(std::vector<std::string>{"u", "v"})
32 {
33  const eckit::Configuration * configc = &config;
34  qg_wind_setup_f90(keyOperWind_, &configc);
35  oops::Log::trace() << "ObsWindQG created." << std::endl;
36 }
37 
38 // -----------------------------------------------------------------------------
39 
42 }
43 
44 // -----------------------------------------------------------------------------
45 
46 void ObsWindQG::simulateObs(const GomQG & gom, ObsVecQG & ovec,
47  const ObsBias & bias) const {
48  qg_wind_equiv_f90(gom.toFortran(), ovec.toFortran(), bias.wind());
49 }
50 
51 // -----------------------------------------------------------------------------
52 
53 void ObsWindQG::print(std::ostream & os) const {
54  os << "ObsWindQG::print not implemented";
55 }
56 
57 // -----------------------------------------------------------------------------
58 
59 } // namespace qg
void qg_wind_equiv_f90(const F90goms &, F90ovec &, const double &)
GomQG class to handle local model values for QG model.
Definition: GomQG.h:31
void simulateObs(const GomQG &, ObsVecQG &, const ObsBias &) const
Obs Operator.
Definition: ObsWindQG.cc:46
subroutine std(a, mean, stdv, area)
void qg_wind_setup_f90(F90hop &, const eckit::Configuration *const *)
const double & wind() const
void qg_wind_delete_f90(F90hop &)
Class to handle observation bias parameters.
F90hop keyOperWind_
Definition: ObsWindQG.h:59
int & toFortran()
Definition: ObsVecQG.h:52
ObsWindQG(const ObsSpaceQG &, const eckit::Configuration &)
Definition: ObsWindQG.cc:30
virtual ~ObsWindQG()
Definition: ObsWindQG.cc:40
void print(std::ostream &) const
Definition: ObsWindQG.cc:53
static ObsOpMaker< ObsWindQG > makerWind_("Wind")
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
int & toFortran()
Definition: GomQG.h:59
The namespace for the qg model.