FV3 Bundle
ErrorCovarianceQG.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 <cmath>
14 
15 #include "eckit/config/Configuration.h"
16 #include "model/FieldsQG.h"
17 #include "model/GeometryQG.h"
18 #include "model/IncrementQG.h"
19 #include "model/QgFortran.h"
20 #include "model/StateQG.h"
21 #include "oops/base/Variables.h"
22 #include "oops/util/Logger.h"
23 
24 // -----------------------------------------------------------------------------
25 namespace qg {
26 // -----------------------------------------------------------------------------
27 
29  const eckit::Configuration & conf,
30  const StateQG &, const StateQG &) {
31  time_ = util::DateTime(conf.getString("date"));
32  const eckit::Configuration * configc = &conf;
33  qg_b_setup_f90(keyFtnConfig_, &configc, resol.toFortran());
34  oops::Log::trace() << "ErrorCovarianceQG created" << std::endl;
35 }
36 
37 // -----------------------------------------------------------------------------
38 
41  oops::Log::trace() << "ErrorCovarianceQG destructed" << std::endl;
42 }
43 
44 // -----------------------------------------------------------------------------
45 
46 void ErrorCovarianceQG::multiply(const IncrementQG & dxin, IncrementQG & dxout) const {
48  dxout.fields().toFortran());
49 }
50 
51 // -----------------------------------------------------------------------------
52 
53 void ErrorCovarianceQG::inverseMultiply(const IncrementQG & dxin, IncrementQG & dxout) const {
55  dxout.fields().toFortran());
56 }
57 
58 // -----------------------------------------------------------------------------
59 
62 }
63 
64 // -----------------------------------------------------------------------------
65 
66 void ErrorCovarianceQG::print(std::ostream & os) const {
67  os << "ErrorCovarianceQG::print not implemented";
68 }
69 
70 // -----------------------------------------------------------------------------
71 
72 } // namespace qg
int & toFortran()
Definition: FieldsQG.h:96
FieldsQG & fields()
Access to fields.
Definition: IncrementQG.h:102
void qg_b_delete_f90(F90bmat &)
ErrorCovarianceQG(const GeometryQG &, const oops::Variables &, const eckit::Configuration &, const StateQG &, const StateQG &)
Definition: conf.py:1
void qg_b_mult_f90(const F90bmat &, const F90flds &, const F90flds &)
void inverseMultiply(const IncrementQG &, IncrementQG &) const
void multiply(const IncrementQG &, IncrementQG &) const
void randomize(IncrementQG &) const
void qg_b_setup_f90(F90bmat &, const eckit::Configuration *const *, const F90geom &)
F90geom & toFortran()
Definition: GeometryQG.h:42
QG model state.
Definition: StateQG.h:50
void qg_b_randomize_f90(const F90bmat &, const F90flds &)
void print(std::ostream &) const
GeometryQG handles geometry for QG model.
Definition: GeometryQG.h:33
void qg_b_invmult_f90(const F90bmat &, const F90flds &, const F90flds &)
The namespace for the qg model.
Increment Class: Difference between two states.
Definition: IncrementQG.h:55