FV3 Bundle
ErrorCovarianceFV3JEDI.cc
Go to the documentation of this file.
1 /*
2  * (C) Copyright 2017 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 
9 #include <cmath>
10 
11 #include "eckit/config/Configuration.h"
12 #include "oops/base/Variables.h"
13 #include "oops/util/Logger.h"
14 
16 #include "ErrorCovarianceFV3JEDI.h"
18 #include "GeometryFV3JEDI.h"
19 #include "IncrementFV3JEDI.h"
20 #include "StateFV3JEDI.h"
21 
22 // -----------------------------------------------------------------------------
23 namespace fv3jedi {
24 // -----------------------------------------------------------------------------
25 
27  const oops::Variables &,
28  const eckit::Configuration & conf,
29  const StateFV3JEDI &,
30  const StateFV3JEDI &) {
31  time_ = util::DateTime(conf.getString("date"));
32  const eckit::Configuration * configc = &conf;
33  fv3jedi_b_setup_f90(keyFtnConfig_, &configc, resol.toFortran());
34  oops::Log::trace() << "ErrorCovarianceFV3JEDI created" << std::endl;
35 }
36 
37 // -----------------------------------------------------------------------------
38 
41  oops::Log::trace() << "ErrorCovarianceFV3JEDI destructed" << std::endl;
42 }
43 
44 // -----------------------------------------------------------------------------
45 
47  const GeometryFV3JEDI & resol) {
48  geom_.reset(new GeometryFV3JEDI(resol));
49 }
50 
51 // -----------------------------------------------------------------------------
52 
54  IncrementFV3JEDI & dxout) const {
55  dxout = dxin;
56 // fv3jedi_b_mult_f90(keyFtnConfig_, dxin.toFortran(),
57 // dxout.toFortran());
58 }
59 
60 // -----------------------------------------------------------------------------
61 
63  IncrementFV3JEDI & dxout) const {
64  dxout = dxin;
65 // fv3jedi_b_invmult_f90(keyFtnConfig_, dxin.toFortran(),
66 // dxout.toFortran());
67 }
68 
69 // -----------------------------------------------------------------------------
70 
73 }
74 
75 // -----------------------------------------------------------------------------
76 
77 void ErrorCovarianceFV3JEDI::print(std::ostream & os) const {
78  os << "ErrorCovarianceFV3JEDI::print not implemented";
79 }
80 
81 // -----------------------------------------------------------------------------
82 
83 } // namespace fv3jedi
void fv3jedi_b_randomize_f90(const F90bmat &, const F90inc &)
void linearize(const StateFV3JEDI &, const GeometryFV3JEDI &)
Definition: conf.py:1
void fv3jedi_b_setup_f90(F90bmat &, const eckit::Configuration *const *, const F90geom &)
ErrorCovarianceFV3JEDI(const GeometryFV3JEDI &, const oops::Variables &, const eckit::Configuration &, const StateFV3JEDI &, const StateFV3JEDI &)
void print(std::ostream &) const
void randomize(IncrementFV3JEDI &) const
GeometryFV3JEDI handles geometry for FV3JEDI model.
void multiply(const IncrementFV3JEDI &, IncrementFV3JEDI &) const
void inverseMultiply(const IncrementFV3JEDI &, IncrementFV3JEDI &) const
void fv3jedi_b_delete_f90(F90bmat &)
boost::scoped_ptr< const GeometryFV3JEDI > geom_