FV3-JEDI
ModelFV3LM.cc
Go to the documentation of this file.
1 /*
2  * (C) Copyright 2017-2020 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/Configuration.h"
11 
12 #include "oops/util/abor1_cpp.h"
13 #include "oops/util/DateTime.h"
14 #include "oops/util/Logger.h"
15 
19 #include "fv3jedi/State/State.h"
21 
22 namespace fv3jedi {
23 // -------------------------------------------------------------------------------------------------
24 static oops::ModelMaker<Traits, ModelFV3LM> makermodel_("FV3LM");
25 // -------------------------------------------------------------------------------------------------
26 ModelFV3LM::ModelFV3LM(const Geometry & resol, const eckit::Configuration & mconf)
27  : keyConfig_(0), tstep_(0), geom_(resol), vars_(mconf, "model variables")
28 {
29  oops::Log::trace() << "ModelFV3LM::ModelFV3LM" << std::endl;
30  tstep_ = util::Duration(mconf.getString("tstep"));
31  const eckit::Configuration * configc = &mconf;
32  stageFv3Files(mconf, geom_.getComm());
35  oops::Log::trace() << "ModelFV3LM created" << std::endl;
36 }
37 // -------------------------------------------------------------------------------------------------
40  oops::Log::trace() << "ModelFV3LM destructed" << std::endl;
41 }
42 // -------------------------------------------------------------------------------------------------
43 void ModelFV3LM::initialize(State & xx) const {
45  oops::Log::debug() << "ModelFV3LM::initialize" << std::endl;
46 }
47 // -------------------------------------------------------------------------------------------------
48 void ModelFV3LM::step(State & xx, const ModelBias &) const {
49  xx.validTime() += tstep_;
50  util::DateTime * dtp = &xx.validTime();
52  oops::Log::debug() << "ModelFV3LM::step" << std::endl;
53 }
54 // -------------------------------------------------------------------------------------------------
55 void ModelFV3LM::finalize(State & xx) const {
57  oops::Log::debug() << "ModelFV3LM::finalize" << std::endl;
58 }
59 // -------------------------------------------------------------------------------------------------
60 void ModelFV3LM::print(std::ostream & os) const {
61  os << "ModelFV3LM::print not implemented";
62 }
63 // -------------------------------------------------------------------------------------------------
64 } // namespace fv3jedi
fv3jedi::ModelFV3LM::ModelFV3LM
ModelFV3LM(const Geometry &, const eckit::Configuration &)
Definition: ModelFV3LM.cc:26
fv3jedi::Geometry::getComm
const eckit::mpi::Comm & getComm() const
Definition: Geometry.h:55
fv3jedi::fv3jedi_fv3lm_delete_f90
void fv3jedi_fv3lm_delete_f90(F90model &)
fv3jedi::ModelFV3LM::keyConfig_
F90model keyConfig_
Definition: ModelFV3LM.h:58
fv3jedi::fv3jedi_fv3lm_step_f90
void fv3jedi_fv3lm_step_f90(const F90model &, const F90state &, const F90geom &, util::DateTime *const *)
Utilities.h
fv3jedi::Geometry::toFortran
F90geom & toFortran()
Definition: Geometry.h:53
fv3jedi::ModelFV3LM::initialize
void initialize(State &) const
Prepare model integration.
Definition: ModelFV3LM.cc:43
ModelFV3LM.h
fv3jedi::ModelFV3LM::geom_
const Geometry geom_
Definition: ModelFV3LM.h:60
fv3jedi::ModelFV3LM::finalize
void finalize(State &) const
Finish model integration.
Definition: ModelFV3LM.cc:55
Geometry.h
fv3jedi::ModelFV3LM::tstep_
util::Duration tstep_
Definition: ModelFV3LM.h:59
fv3jedi::ModelFV3LM::~ModelFV3LM
~ModelFV3LM()
Definition: ModelFV3LM.cc:38
fv3jedi::ModelBias
Model error for the FV3JEDI model.
Definition: ModelBias.h:41
fv3jedi::State::toFortran
int & toFortran()
Definition: State.h:87
fv3jedi::State::validTime
const util::DateTime & validTime() const
Definition: State.h:83
fv3jedi::fv3jedi_fv3lm_finalize_f90
void fv3jedi_fv3lm_finalize_f90(const F90model &, const F90inc &)
fv3jedi::Geometry
Geometry handles geometry for FV3JEDI model.
Definition: Geometry.h:41
ModelBias.h
fv3jedi::ModelFV3LM::step
void step(State &, const ModelBias &) const
Model integration.
Definition: ModelFV3LM.cc:48
fv3jedi::State
Definition: State.h:45
fv3jedi::stageFv3Files
void stageFv3Files(const eckit::Configuration &conf, const eckit::mpi::Comm &comm)
Definition: Utilities.cc:53
fv3jedi::ModelFV3LM::print
void print(std::ostream &) const
Definition: ModelFV3LM.cc:60
fv3jedi
Configuration files should be formatted as e.g.
Definition: ErrorCovariance.cc:20
fv3jedi::removeFv3Files
void removeFv3Files(const eckit::mpi::Comm &comm)
Definition: Utilities.cc:130
fv3jedi::fv3jedi_fv3lm_create_f90
void fv3jedi_fv3lm_create_f90(const eckit::Configuration *const *, const F90geom &, F90model &)
fv3jedi::fv3jedi_fv3lm_initialize_f90
void fv3jedi_fv3lm_initialize_f90(const F90model &, const F90state &)
State.h
fv3jedi::makermodel_
static oops::ModelMaker< Traits, ModelFV3LM > makermodel_("FV3LM")