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