FV3 Bundle
ChangeVar.cc
Go to the documentation of this file.
1 /*
2  * (C) Copyright 2017-2018 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 "model/ChangeVar.h"
9 
10 #include <ostream>
11 #include <string>
12 
13 #include "eckit/config/Configuration.h"
14 #include "model/GeometryQG.h"
15 #include "model/IncrementQG.h"
16 #include "model/StateQG.h"
17 #include "oops/util/Logger.h"
18 
19 namespace qg {
20 // -----------------------------------------------------------------------------
22  const GeometryQG & resol, const eckit::Configuration & conf) {
23  oops::Log::trace() << "ChangeVar::ChangeVar start" << std::endl;
24  const eckit::Configuration * configc = &conf;
25  qg_setup_f90(&configc, resol.toFortran(), keyConfig_);
26  oops::Log::trace() << "ChangeVar::ChangeVar done" << std::endl;
27 }
28 // -----------------------------------------------------------------------------
30 // -----------------------------------------------------------------------------
31 void ChangeVar::multiply(const IncrementQG & dxa, IncrementQG & dxm) const {
32  dxm = dxa;
33 // ASSERT(dxm.fields().isForModel(false));
34 // qg_prepare_integration_tl_f90(keyConfig_, dxm.fields().toFortran());
35  oops::Log::debug() << "ChangeVar::multiply" << dxm << std::endl;
36 }
37 // -----------------------------------------------------------------------------
38 void ChangeVar::multiplyInverse(const IncrementQG & dxm, IncrementQG & dxa) const {
39  dxa = dxm;
40 }
41 // -----------------------------------------------------------------------------
42 void ChangeVar::multiplyAD(const IncrementQG & dxm, IncrementQG & dxa) const {
43 // ASSERT(dxm.fields().isForModel(false));
44 // qg_prepare_integration_ad_f90(keyConfig_, dxm.fields().toFortran());
45  dxa = dxm;
46  oops::Log::debug() << "ChangeVar::multiplyAD" << dxa << std::endl;
47 }
48 // -----------------------------------------------------------------------------
49 void ChangeVar::multiplyInverseAD(const IncrementQG & dxa, IncrementQG & dxm) const {
50  dxm = dxa;
51 }
52 // -----------------------------------------------------------------------------
53 void ChangeVar::print(std::ostream & os) const {
54  os << "QG change variable";
55 }
56 // -----------------------------------------------------------------------------
57 } // namespace qg
58 
F90model keyConfig_
Definition: ChangeVar.h:47
Definition: conf.py:1
logical debug
Definition: mpp.F90:1297
void qg_setup_f90(const eckit::Configuration *const *, const F90geom &, F90model &)
void multiplyInverseAD(const IncrementQG &, IncrementQG &) const
Definition: ChangeVar.cc:49
void print(std::ostream &) const override
Definition: ChangeVar.cc:53
void multiplyAD(const IncrementQG &, IncrementQG &) const
Definition: ChangeVar.cc:42
F90geom & toFortran()
Definition: GeometryQG.h:42
QG model state.
Definition: StateQG.h:50
GeometryQG handles geometry for QG model.
Definition: GeometryQG.h:33
void multiply(const IncrementQG &, IncrementQG &) const
Perform linear transforms.
Definition: ChangeVar.cc:31
ChangeVar(const StateQG &, const StateQG &, const GeometryQG &, const eckit::Configuration &)
Definition: ChangeVar.cc:21
The namespace for the qg model.
void multiplyInverse(const IncrementQG &, IncrementQG &) const
Definition: ChangeVar.cc:38
Increment Class: Difference between two states.
Definition: IncrementQG.h:55