FV3 Bundle
ObsStreamTLAD.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/ObsStreamTLAD.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/ObsBiasIncrement.h"
19 #include "model/ObsSpaceQG.h"
20 #include "model/ObsVecQG.h"
21 #include "model/QgFortran.h"
22 #include "oops/base/Variables.h"
23 #include "oops/util/Logger.h"
24 
25 // -----------------------------------------------------------------------------
26 namespace qg {
27 // -----------------------------------------------------------------------------
28 static ObsOpTLADMaker<ObsStreamTLAD> makerStreamTL_("Stream");
29 // -----------------------------------------------------------------------------
30 
31 ObsStreamTLAD::ObsStreamTLAD(const ObsSpaceQG &, const eckit::Configuration & config)
32  : keyOperStrm_(0), varin_(std::vector<std::string>{"x"})
33 {
34  const eckit::Configuration * configc = &config;
35  qg_stream_setup_f90(keyOperStrm_, &configc);
36  oops::Log::trace() << "ObsStreamTLAD created" << std::endl;
37 }
38 
39 // -----------------------------------------------------------------------------
40 
42  oops::Log::trace() << "ObsStreamTLAD destructed" << std::endl;
43 }
44 
45 // -----------------------------------------------------------------------------
46 
47 void ObsStreamTLAD::setTrajectory(const GomQG &, const ObsBias &) {}
48 
49 // -----------------------------------------------------------------------------
50 
51 void ObsStreamTLAD::simulateObsTL(const GomQG & gom, ObsVecQG & ovec,
52  const ObsBiasIncrement & bias) const {
53  qg_stream_equiv_tl_f90(gom.toFortran(), ovec.toFortran(), bias.stream());
54 }
55 
56 // -----------------------------------------------------------------------------
57 
58 void ObsStreamTLAD::simulateObsAD(GomQG & gom, const ObsVecQG & ovec,
59  ObsBiasIncrement & bias) const {
60  qg_stream_equiv_ad_f90(gom.toFortran(), ovec.toFortran(), bias.stream());
61 }
62 
63 // -----------------------------------------------------------------------------
64 
65 void ObsStreamTLAD::print(std::ostream & os) const {
66  os << "ObsStreamTLAD::print not implemented" << std::endl;
67 }
68 
69 // -----------------------------------------------------------------------------
70 
71 } // namespace qg
void qg_stream_equiv_ad_f90(const F90goms &, const F90ovec &, double &)
GomQG class to handle local model values for QG model.
Definition: GomQG.h:31
ObsStreamTLAD(const ObsSpaceQG &, const eckit::Configuration &)
void setTrajectory(const GomQG &, const ObsBias &) override
Obs Operator.
subroutine std(a, mean, stdv, area)
void qg_stream_setup_f90(F90hop &, const eckit::Configuration *const *)
Class to handle observation bias parameters.
void qg_stream_equiv_tl_f90(const F90goms &, const F90ovec &, const double &)
virtual ~ObsStreamTLAD()
int & toFortran()
Definition: ObsVecQG.h:52
void print(std::ostream &) const override
static ObsOpTLADMaker< ObsStreamTLAD > makerStreamTL_("Stream")
void simulateObsAD(GomQG &, const ObsVecQG &, ObsBiasIncrement &) const override
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.
void simulateObsTL(const GomQG &, ObsVecQG &, const ObsBiasIncrement &) const override