SOCA
BkgErrGodas.cc
Go to the documentation of this file.
1 /*
2  * (C) Copyright 2017-2021 UCAR.
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  */
7 
8 #include <ostream>
9 #include <string>
10 
11 #include "eckit/config/Configuration.h"
12 
13 #include "oops/interface/LinearVariableChange.h"
14 #include "oops/util/Logger.h"
15 
16 #include "soca/Geometry/Geometry.h"
18 #include "soca/State/State.h"
19 #include "soca/Traits.h"
22 
23 using oops::Log;
24 
25 namespace soca {
26 
27  // -----------------------------------------------------------------------------
28  static oops::LinearVariableChangeMaker<Traits,
29  oops::LinearVariableChange<Traits, BkgErrGodas> >
31 
32  // -----------------------------------------------------------------------------
34  const State & traj,
35  const Geometry & geom,
36  const eckit::Configuration & conf) {
37  oops::Log::trace() << "soca::BkgErrGodas::setup " << std::endl;
38  const eckit::Configuration * configc = &conf;
39 
40  // Interpolate trajectory to the geom resolution
41  State traj_at_geomres(geom, traj);
42 
43  // Initialize the parametric background error variance
45  &configc,
46  traj_at_geomres.toFortran(),
47  geom.toFortran());
48  }
49  // -----------------------------------------------------------------------------
51  oops::Log::trace() << "soca::BkgErrGodas::delete " << std::endl;
53  }
54  // -----------------------------------------------------------------------------
55  void BkgErrGodas::multiply(const Increment & dxa, Increment & dxm) const {
56  // dxm = K dxa
57  oops::Log::trace() << "soca::BkgErrGodas::multiply " << std::endl;
59  }
60  // -----------------------------------------------------------------------------
62  Increment & dxa) const {
63  dxa = dxm;
64  }
65  // -----------------------------------------------------------------------------
66  void BkgErrGodas::multiplyAD(const Increment & dxm, Increment & dxa) const {
67  // dxa = K^T dxm
68  oops::Log::trace() << "soca::BkgErrGodas::multiplyAD " << std::endl;
70  }
71  // -----------------------------------------------------------------------------
73  Increment & dxm) const {
74  dxm = dxa;
75  }
76  // -----------------------------------------------------------------------------
77  void BkgErrGodas::print(std::ostream & os) const {
78  os << "SOCA change variable";
79  }
80  // -----------------------------------------------------------------------------
81 } // namespace soca
void print(std::ostream &) const override
Definition: BkgErrGodas.cc:77
void multiplyInverse(const Increment &, Increment &) const
Definition: BkgErrGodas.cc:61
void multiplyInverseAD(const Increment &, Increment &) const
Definition: BkgErrGodas.cc:72
void multiplyAD(const Increment &, Increment &) const
Definition: BkgErrGodas.cc:66
void multiply(const Increment &, Increment &) const
Perform linear transforms.
Definition: BkgErrGodas.cc:55
BkgErrGodas(const State &, const State &, const Geometry &, const eckit::Configuration &)
Definition: BkgErrGodas.cc:33
Geometry handles geometry for SOCA model.
Definition: Geometry.h:48
int & toFortran()
Definition: Geometry.h:61
Increment Class: Difference between two states.
Definition: Increment.h:61
int & toFortran()
Definition: Increment.h:112
SOCA model state.
Definition: State.h:48
int & toFortran()
Definition: State.h:88
void soca_bkgerrgodas_setup_f90(F90balopmat &, const eckit::Configuration *const *, const F90flds &, const F90geom &)
static oops::LinearVariableChangeMaker< Traits, oops::LinearVariableChange< Traits, BkgErrGodas > > makerLinearVariableChangeBkgErrGodas_("BkgErrGODAS")
void soca_bkgerrgodas_delete_f90(F90balopmat &)
void soca_bkgerrgodas_mult_f90(const F90balopmat &, const F90flds &, F90flds &)