FV3 Bundle
src/lorenz95/ObservationL95.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 #include <vector>
15 
16 #include "eckit/config/Configuration.h"
17 #include "lorenz95/GomL95.h"
18 #include "lorenz95/ObsBias.h"
19 #include "lorenz95/ObsVec1D.h"
20 #include "oops/base/Variables.h"
21 #include "oops/util/DateTime.h"
22 #include "oops/util/Logger.h"
23 
24 // -----------------------------------------------------------------------------
25 namespace lorenz95 {
26 // -----------------------------------------------------------------------------
27 
28 ObservationL95::ObservationL95(const ObsTable & ot, const eckit::Configuration & conf)
29  : obsdb_(ot), inputs_(conf)
30 {}
31 
32 // -----------------------------------------------------------------------------
33 
35 
36 // -----------------------------------------------------------------------------
37 
38 void ObservationL95::simulateObs(const GomL95 & gom, ObsVec1D & ovec,
39  const ObsBias & bias) const {
40  for (size_t jj = 0; jj < gom.size(); ++jj) {
41  const int ii = gom.getindx(jj);
42  ovec(ii) = gom[jj] + bias.value();
43  }
44 }
45 
46 // -----------------------------------------------------------------------------
47 
48 void ObservationL95::print(std::ostream & os) const {
49  os << "ObservationL95: Lorenz 95 Obs Operator";
50 }
51 
52 // -----------------------------------------------------------------------------
53 
54 } // namespace lorenz95
GomL95 class to handle locations for L95 model.
Definition: GomL95.h:32
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
The namespace for the L95 model.
void simulateObs(const GomL95 &, ObsVec1D &, const ObsBias &) const
A Simple Observation Data Handler.
Definition: ObsTable.h:39
void print(std::ostream &) const
const double & value() const
size_t size() const
Definition: GomL95.h:56
ObservationL95(const ObsTable &, const eckit::Configuration &)