FV3 Bundle
ObsSpaceQG.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 QG_MODEL_OBSSPACEQG_H_
12 #define QG_MODEL_OBSSPACEQG_H_
13 
14 #include <map>
15 #include <ostream>
16 #include <string>
17 
19 #include "oops/util/DateTime.h"
20 #include "oops/util/Printable.h"
21 
22 #include "model/LocationsQG.h"
23 #include "model/ObsHelpQG.h"
24 #include "model/QgFortran.h"
25 
26 namespace eckit {
27  class Configuration;
28 }
29 
30 namespace qg {
31  class ObsVecQG;
32 
33 /// Wrapper around ObsHelpQG, mostly to hide the factory
34 
36  public:
37  ObsSpaceQG(const eckit::Configuration &, const util::DateTime &, const util::DateTime &);
38  ~ObsSpaceQG();
39 
40  void getdb(const std::string & col, int & keyData) const {
41  helper_->getdb(obsname_, col, keyData);
42  }
43  void putdb(const std::string & col, const int & keyData) const {
44  helper_->putdb(obsname_, col, keyData);
45  }
46 
47  LocationsQG * locations(const util::DateTime & t1, const util::DateTime & t2) const {
48  int key_locs = helper_->locations(obsname_, t1, t2);
49  return new LocationsQG(key_locs);
50  }
51 
52  void generateDistribution(const eckit::Configuration & conf) {
54  }
55 
56  void printJo(const ObsVecQG &, const ObsVecQG &);
57 
58  int nobs() const {return nobs_;}
59  int nvin() const {return nvin_;}
60  int nout() const {return nout_;}
61  const std::string & obsname() const {return obsname_;}
62 
63  int & toFortran() {return helper_->toFortran();}
64  const int & toFortran() const {return helper_->toFortran();}
65 
66  private:
67  void print(std::ostream &) const;
68  std::string ref_;
69  mutable ObsHelpQG * helper_;
70  std::string obsname_;
71  unsigned int nobs_;
72  unsigned int nvin_;
73  unsigned int nout_;
74  const util::DateTime winbgn_;
75  const util::DateTime winend_;
76 
77  static std::map < std::string, int > theObsFileCount_;
78 };
79 
80 } // namespace qg
81 
82 #endif // QG_MODEL_OBSSPACEQG_H_
LocationsQG * locations(const util::DateTime &t1, const util::DateTime &t2) const
Definition: ObsSpaceQG.h:47
void generateDistribution(const eckit::Configuration &, const std::string &, const util::DateTime &, const util::DateTime &, unsigned int &)
Definition: ObsHelpQG.cc:65
void putdb(const std::string &col, const int &keyData) const
Definition: ObsSpaceQG.h:43
ObsHelpQG * helper_
Definition: ObsSpaceQG.h:69
unsigned int nobs_
Definition: ObsSpaceQG.h:71
std::string obsname_
Definition: ObsSpaceQG.h:70
int nout() const
Definition: ObsSpaceQG.h:60
int & toFortran()
Definition: ObsSpaceQG.h:63
Definition: conf.py:1
std::string ref_
Definition: ObsSpaceQG.h:68
int nobs() const
Definition: ObsSpaceQG.h:58
real, parameter t2
const util::DateTime winbgn_
Definition: ObsSpaceQG.h:74
unsigned int nout_
Definition: ObsSpaceQG.h:73
unsigned int nvin_
Definition: ObsSpaceQG.h:72
const util::DateTime winend_
Definition: ObsSpaceQG.h:75
F90locs locations(const std::string &, const util::DateTime &, const util::DateTime &) const
Definition: ObsHelpQG.cc:54
void printJo(const ObsVecQG &, const ObsVecQG &)
Definition: ObsSpaceQG.cc:85
int nvin() const
Definition: ObsSpaceQG.h:59
Base class for observation spaces.
Definition: ObsSpaceBase.h:25
void getdb(const std::string &col, int &keyData) const
Definition: ObsSpaceQG.h:40
void print(std::ostream &) const
Definition: ObsSpaceQG.cc:102
real, parameter t1
Observation Data Handler for QG Model.
Definition: ObsHelpQG.h:30
void getdb(const std::string &, const std::string &, int &keyOvec) const
Definition: ObsHelpQG.cc:47
const int & toFortran() const
Definition: ObsSpaceQG.h:64
LocationsQG class to handle locations for QG model.
Definition: LocationsQG.h:26
ObsSpaceQG(const eckit::Configuration &, const util::DateTime &, const util::DateTime &)
Definition: ObsSpaceQG.cc:28
void putdb(const std::string &, const std::string &, const int &keyOvec)
Definition: ObsHelpQG.cc:40
ObsVecQG class to handle vectors in observation space for QG model.
Definition: ObsVecQG.h:27
Wrapper around ObsHelpQG, mostly to hide the factory.
Definition: ObsSpaceQG.h:35
void generateDistribution(const eckit::Configuration &conf)
Pure virtual methods.
Definition: ObsSpaceQG.h:52
const std::string & obsname() const
Definition: ObsSpaceQG.h:61
The namespace for the qg model.
static std::map< std::string, int > theObsFileCount_
Definition: ObsSpaceQG.h:77
int & toFortran()
Definition: ObsHelpQG.h:46