FV3 Bundle
ObsStreamQG.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/ObsStreamQG.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 "oops/base/Variables.h"
21 #include "oops/util/Logger.h"
22 
23 // -----------------------------------------------------------------------------
24 namespace qg {
25 // -----------------------------------------------------------------------------
26 static ObsOpMaker<ObsStreamQG> makerStream_("Stream");
27 // -----------------------------------------------------------------------------
28 
29 ObsStreamQG::ObsStreamQG(const ObsSpaceQG &, const eckit::Configuration & config)
30  : keyOperStrm_(0), varin_(std::vector<std::string>{"x"})
31 {
32  const eckit::Configuration * configc = &config;
33  qg_stream_setup_f90(keyOperStrm_, &configc);
34  oops::Log::trace() << "ObsStreamQG created." << std::endl;
35 }
36 
37 // -----------------------------------------------------------------------------
38 
41  oops::Log::trace() << "ObsStreamQG destructed." << std::endl;
42 }
43 
44 // -----------------------------------------------------------------------------
45 
46 void ObsStreamQG::simulateObs(const GomQG & gom, ObsVecQG & ovec,
47  const ObsBias & bias) const {
48  qg_stream_equiv_f90(gom.toFortran(), ovec.toFortran(), bias.stream());
49 }
50 
51 // -----------------------------------------------------------------------------
52 
53 void ObsStreamQG::print(std::ostream & os) const {
54  os << "ObsStreamQG::print not implemented";
55 }
56 
57 // -----------------------------------------------------------------------------
58 
59 } // namespace qg
GomQG class to handle local model values for QG model.
Definition: GomQG.h:31
ObsStreamQG(const ObsSpaceQG &, const eckit::Configuration &)
Definition: ObsStreamQG.cc:29
subroutine std(a, mean, stdv, area)
void qg_stream_setup_f90(F90hop &, const eckit::Configuration *const *)
const double & stream() const
void qg_stream_delete_f90(F90hop &)
Class to handle observation bias parameters.
virtual ~ObsStreamQG()
Definition: ObsStreamQG.cc:39
static ObsOpMaker< ObsStreamQG > makerStream_("Stream")
int & toFortran()
Definition: ObsVecQG.h:52
F90hop keyOperStrm_
Definition: ObsStreamQG.h:58
void simulateObs(const GomQG &, ObsVecQG &, const ObsBias &) const
Obs Operator.
Definition: ObsStreamQG.cc:46
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_stream_equiv_f90(const F90goms &, const F90ovec &, const double &)
int & toFortran()
Definition: GomQG.h:59
The namespace for the qg model.
void print(std::ostream &) const
Definition: ObsStreamQG.cc:53