FV3 Bundle
StateInfo.h
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 
11 #ifndef OOPS_BASE_STATEINFO_H_
12 #define OOPS_BASE_STATEINFO_H_
13 
14 #include <string>
15 
16 #include "eckit/config/Configuration.h"
17 #include "oops/base/PostBase.h"
18 #include "oops/util/DateTime.h"
19 #include "oops/util/Logger.h"
20 
21 namespace oops {
22 
23 /// Handles writing-out of forecast fields.
24 /*!
25  * Write out forecast fields.
26  */
27 
28 template <typename FLDS> class StateInfo : public PostBase<FLDS> {
29  public:
30  StateInfo(const std::string sgrep, const eckit::Configuration & conf):
31  PostBase<FLDS>(conf), sgrep_(sgrep) {}
32  StateInfo(const std::string sgrep, const util::Duration & freq):
33  PostBase<FLDS>(freq), sgrep_(sgrep) {}
35 
36  private:
37  const std::string sgrep_;
38  void doProcessing(const FLDS & xx) override {Log::info() << sgrep_ << xx << std::endl;}
39 };
40 
41 } // namespace oops
42 
43 #endif // OOPS_BASE_STATEINFO_H_
StateInfo(const std::string sgrep, const eckit::Configuration &conf)
Definition: StateInfo.h:30
Definition: conf.py:1
const std::string sgrep_
Definition: StateInfo.h:37
StateInfo(const std::string sgrep, const util::Duration &freq)
Definition: StateInfo.h:32
Handles post-processing of model fields.
Definition: PostBase.h:33
The namespace for the main oops code.
Handles writing-out of forecast fields.
Definition: StateInfo.h:28
subroutine, public info(self)
void doProcessing(const FLDS &xx) override
Actual processing.
Definition: StateInfo.h:38