FV3 Bundle
ObservationTLAD.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 
12 
13 #include <string>
14 
15 #include "eckit/config/Configuration.h"
16 #include "lorenz95/GomL95.h"
18 #include "lorenz95/ObsTable.h"
19 #include "lorenz95/ObsVec1D.h"
20 #include "oops/base/Variables.h"
21 
22 // -----------------------------------------------------------------------------
23 namespace lorenz95 {
24 // -----------------------------------------------------------------------------
25 
26 ObservationTLAD::ObservationTLAD(const ObsTable &, const eckit::Configuration & conf)
27  : inputs_(conf)
28 {}
29 
30 // -----------------------------------------------------------------------------
31 
33 
34 // -----------------------------------------------------------------------------
35 
37 
38 // -----------------------------------------------------------------------------
39 
41  const ObsBiasCorrection & bias) const {
42  for (size_t jj = 0; jj < gom.size(); ++jj) {
43  const int ii = gom.getindx(jj);
44  ovec(ii) = gom[jj] + bias.value();
45  }
46 }
47 
48 // -----------------------------------------------------------------------------
49 
51  ObsBiasCorrection & bias) const {
52  for (size_t jj = 0; jj < gom.size(); ++jj) {
53  const int ii = gom.getindx(jj);
54  gom[jj] = ovec(ii);
55  bias.value() += ovec(ii);
56  }
57 }
58 
59 // -----------------------------------------------------------------------------
60 
61 void ObservationTLAD::print(std::ostream & os) const {
62  os << "ObservationTLAD: Lorenz 95 Linear Obs Operator";
63 }
64 
65 // -----------------------------------------------------------------------------
66 
67 } // namespace lorenz95
GomL95 class to handle locations for L95 model.
Definition: GomL95.h:32
void simulateObsTL(const GomL95 &, ObsVec1D &, const ObsBiasCorrection &) const
int getindx(const int il) const
Definition: GomL95.h:59
Class to handle observation bias parameters.
Definition: conf.py:1
Vector in observation space.
Definition: ObsVec1D.h:32
void setTrajectory(const GomL95 &, const ObsBias &)
void simulateObsAD(GomL95 &, const ObsVec1D &, ObsBiasCorrection &) const
The namespace for the L95 model.
void print(std::ostream &) const
ObservationTLAD(const ObsTable &, const eckit::Configuration &)
A Simple Observation Data Handler.
Definition: ObsTable.h:39
size_t size() const
Definition: GomL95.h:56