SOCA
VertConv.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 
24 using oops::Log;
25 
26 namespace soca {
27 
28  // -----------------------------------------------------------------------------
29  static oops::LinearVariableChangeMaker<Traits,
30  oops::LinearVariableChange<Traits, VertConv> >
32 
33  // -----------------------------------------------------------------------------
35  const State & traj,
36  const Geometry & geom,
37  const eckit::Configuration & conf) :
38  bkg_lr_(geom, bkg), geom_(geom) {
39  oops::Log::trace() << "soca::VertConv::setup " << std::endl;
40  const eckit::Configuration * configc = &conf;
41 
42  // Compute convolution weights
44  &configc,
46  geom.toFortran());
47  }
48  // -----------------------------------------------------------------------------
50  oops::Log::trace() << "soca::VertConv::delete " << std::endl;
52  }
53  // -----------------------------------------------------------------------------
54  void VertConv::multiply(const Increment & dxa, Increment & dxm) const {
55  // dxm = K dxa
56  oops::Log::trace() << "soca::VertConv::multiply " << std::endl;
58  }
59  // -----------------------------------------------------------------------------
60  void VertConv::multiplyInverse(const Increment & dxm, Increment & dxa) const {
61  oops::Log::trace() << "soca::VertConv::multiplyInverse " << std::endl;
62  dxa = dxm;
63  }
64  // -----------------------------------------------------------------------------
65  void VertConv::multiplyAD(const Increment & dxm, Increment & dxa) const {
66  // dxa = K^T dxm
67  oops::Log::trace() << "soca::VertConv::multiplyAD " << std::endl;
69  }
70  // -----------------------------------------------------------------------------
72  Increment & dxm) const {
73  oops::Log::trace() << "soca::VertConv::multiplyInverseAD " << std::endl;
74  dxm = dxa;
75  }
76  // -----------------------------------------------------------------------------
77  void VertConv::print(std::ostream & os) const {
78  os << "SOCA change variable: VertConv";
79  }
80  // -----------------------------------------------------------------------------
81 } // namespace soca
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
const State bkg_lr_
Definition: VertConv.h:50
VertConv(const State &, const State &, const Geometry &, const eckit::Configuration &)
Definition: VertConv.cc:34
void multiplyAD(const Increment &, Increment &) const
Definition: VertConv.cc:65
void multiply(const Increment &, Increment &) const
Perform linear transforms.
Definition: VertConv.cc:54
void multiplyInverseAD(const Increment &, Increment &) const
Definition: VertConv.cc:71
int keyFtnConfig_
Definition: VertConv.h:49
void multiplyInverse(const Increment &, Increment &) const
Definition: VertConv.cc:60
void print(std::ostream &) const override
Definition: VertConv.cc:77
void soca_vertconv_mult_f90(const F90balopmat &, F90balopmat &, const F90balopmat &)
void soca_vertconv_setup_f90(F90balopmat &, const eckit::Configuration *const *, const F90flds &, const F90geom &)
void soca_vertconv_delete_f90(F90balopmat &)
void soca_vertconv_multad_f90(const F90balopmat &, F90balopmat &, const F90balopmat &)
static oops::LinearVariableChangeMaker< Traits, oops::LinearVariableChange< Traits, VertConv > > makerLinearVariableCHangeVertConv_("VertConvSOCA")