FV3 Bundle
TlmIdFV3JEDI.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 #include <vector>
9 
10 #include "eckit/config/LocalConfiguration.h"
11 #include "oops/util/abor1_cpp.h"
12 #include "oops/util/DateTime.h"
13 #include "oops/util/Logger.h"
14 
15 #include "src/Model/TlmIdFV3JEDI.h"
16 #include "GeometryFV3JEDI.h"
17 #include "FV3JEDITraits.h"
18 #include "IncrementFV3JEDI.h"
19 #include "TlmFV3JEDIFortran.h"
20 #include "StateFV3JEDI.h"
21 #include "UtilitiesFV3JEDI.h"
22 
23 namespace fv3jedi {
24 
25 // -----------------------------------------------------------------------------
27  makerFV3JEDIIdTLM_("FV3JEDIIdTLM");
28 // -----------------------------------------------------------------------------
30  const eckit::Configuration & tlConf)
31  : keyConfig_(0), tstep_(), resol_(resol),
32  linvars_(std::vector<std::string>{"ua", "va", "t", "ps",
33  "q", "qi", "ql", "o3"})
34 {
35  tstep_ = util::Duration(tlConf.getString("tstep"));
36 
37  const eckit::Configuration * configc = &tlConf;
38  stageFv3Files(tlConf);
39  fv3jedi_tlm_create_f90(&configc, resol_.toFortran(), keyConfig_);
41 
42  oops::Log::trace() << "TlmIdFV3JEDI created" << std::endl;
43 }
44 // -----------------------------------------------------------------------------
47  oops::Log::trace() << "TlmIdFV3JEDI destructed" << std::endl;
48 }
49 // -----------------------------------------------------------------------------
51  const ModelBiasFV3JEDI &) {}
52 // -----------------------------------------------------------------------------
54  oops::Log::debug() << "TlmIdFV3JEDI::initializTL" << std::endl;
55 }
56 // -----------------------------------------------------------------------------
58  const ModelBiasIncrementFV3JEDI &) const {
59  dx.updateTime(tstep_);
60 }
61 // -----------------------------------------------------------------------------
63  oops::Log::debug() << "TlmIdFV3JEDI::finalizeTL" << std::endl;
64 }
65 // -----------------------------------------------------------------------------
67  oops::Log::debug() << "TlmIdFV3JEDI::initializAD" << std::endl;
68 }
69 // -----------------------------------------------------------------------------
71  ModelBiasIncrementFV3JEDI &) const {
72  dx.updateTime(-tstep_);
73 }
74 // -----------------------------------------------------------------------------
76  oops::Log::debug() << "TlmIdFV3JEDI::finalizeAD" << std::endl;
77 }
78 // -----------------------------------------------------------------------------
79 void TlmIdFV3JEDI::print(std::ostream & os) const {
80  os << "FV3JEDI IdTLM" << std::endl;
81 }
82 // -----------------------------------------------------------------------------
83 } // namespace fv3jedi
void fv3jedi_tlm_delete_f90(F90tlm &)
TlmIdFV3JEDI(const GeometryFV3JEDI &, const eckit::Configuration &)
Definition: TlmIdFV3JEDI.cc:29
void removeFv3Files()
void stageFv3Files(const eckit::Configuration &conf)
subroutine std(a, mean, stdv, area)
void finalizeTL(IncrementFV3JEDI &) const override
Definition: TlmIdFV3JEDI.cc:62
void initializeTL(IncrementFV3JEDI &) const override
Run TLM and its adjoint.
Definition: TlmIdFV3JEDI.cc:53
Model error for the FV3JEDI model.
void finalizeAD(IncrementFV3JEDI &) const override
Definition: TlmIdFV3JEDI.cc:75
logical debug
Definition: mpp.F90:1297
void fv3jedi_tlm_create_f90(const eckit::Configuration *const *, const F90geom &, F90tlm &)
void setTrajectory(const StateFV3JEDI &, StateFV3JEDI &, const ModelBiasFV3JEDI &) override
Model trajectory computation.
Definition: TlmIdFV3JEDI.cc:50
void initializeAD(IncrementFV3JEDI &) const override
Definition: TlmIdFV3JEDI.cc:66
void stepAD(IncrementFV3JEDI &, ModelBiasIncrementFV3JEDI &) const override
Definition: TlmIdFV3JEDI.cc:70
util::Duration tstep_
Definition: TlmIdFV3JEDI.h:69
void print(std::ostream &) const override
Definition: TlmIdFV3JEDI.cc:79
GeometryFV3JEDI handles geometry for FV3JEDI model.
void updateTime(const util::Duration &dt)
static oops::LinearModelMaker< FV3JEDITraits, TlmIdFV3JEDI > makerFV3JEDIIdTLM_("FV3JEDIIdTLM")
void stepTL(IncrementFV3JEDI &, const ModelBiasIncrementFV3JEDI &) const override
Definition: TlmIdFV3JEDI.cc:57