Loading [MathJax]/extensions/tex2jax.js
OOPS
All Classes Namespaces Files Functions Variables Typedefs Macros Pages
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 {
45  return obsdb_.locations();
46 }
47 
48 // -----------------------------------------------------------------------------
49 
50 void ObsStreamQG::print(std::ostream & os) const {
51  os << "QG Stream observation operator TL/AD";
52 }
53 
54 // -----------------------------------------------------------------------------
55 
56 } // namespace qg
GomQG class to handle local model values for QG model.
Definition: GomQG.h:35
const int & toFortran() const
Definition: GomQG.h:62
Class to handle observation bias parameters.
const double & stream() const
ObsSpace for QG model.
Definition: ObsSpaceQG.h:81
std::unique_ptr< LocationsQG > locations() const
create locations for the whole time window
Definition: ObsSpaceQG.cc:139
ObsStreamQG(const ObsSpaceQG &, const eckit::Configuration &)
Definition: ObsStreamQG.cc:29
void print(std::ostream &) const override
Definition: ObsStreamQG.cc:50
const ObsSpaceQG & obsdb_
Definition: ObsStreamQG.h:54
void simulateObs(const GomQG &, ObsVecQG &, const ObsBias &) const override
Obs Operator.
Definition: ObsStreamQG.cc:37
std::unique_ptr< LocationsQG > locations() const override
Definition: ObsStreamQG.cc:44
ObsVecQG class to handle vectors in observation space for QG model.
Definition: ObsVecQG.h:32
const int & toFortran() const
Definition: ObsVecQG.h:69
The namespace for the qg model.
static ObsOpMaker< ObsStreamQG > makerStream_("Stream")
void qg_stream_equiv_f90(const F90gom &, const F90ovec &, const double &)