11 #ifndef LORENZ95_OBSTABLE_H_
12 #define LORENZ95_OBSTABLE_H_
20 #include "eckit/mpi/Comm.h"
23 #include "oops/util/DateTime.h"
24 #include "oops/util/ObjectCounter.h"
25 #include "oops/util/parameters/OptionalParameter.h"
26 #include "oops/util/parameters/Parameters.h"
27 #include "oops/util/parameters/RequiredParameter.h"
38 oops::RequiredParameter<util::Duration>
begin{
"begin",
this};
39 oops::OptionalParameter<util::Duration>
end{
"end",
this};
40 oops::RequiredParameter<util::Duration>
obsFrequency{
"obs_frequency",
this};
42 oops::RequiredParameter<int>
obsDensity{
"obs_density",
this};
43 oops::RequiredParameter<double>
obsError{
"obs_error",
this};
53 oops::OptionalParameter<std::string>
obsdatain{
"obsdatain",
this};
55 oops::OptionalParameter<std::string>
obsdataout{
"obsdataout",
this};
57 oops::OptionalParameter<ObsGenerateParameters>
generate{
"generate",
this};
67 private util::ObjectCounter<ObsTable> {
69 static const std::string
classname() {
return "lorenz95::ObsTable";}
74 const util::DateTime &,
const util::DateTime &,
const eckit::mpi::Comm &);
79 void putdb(
const std::string &,
const std::vector<int> &)
const;
80 void putdb(
const std::string &,
const std::vector<float> &)
const;
81 void putdb(
const std::string &,
const std::vector<double> &)
const;
82 void getdb(
const std::string &, std::vector<int> &)
const;
83 void getdb(
const std::string &, std::vector<float> &)
const;
84 void getdb(
const std::string &, std::vector<double> &)
const;
86 bool has(
const std::string & col)
const;
88 void random(std::vector<double> &)
const;
91 const std::vector<util::DateTime> &
times()
const {
return times_; }
101 void print(std::ostream &)
const;
102 void otOpen(
const std::string &);
103 void otWrite(
const std::string &)
const;
110 mutable std::map<std::string, std::vector<double> >
data_;
Options controlling generation of artificial observations.
oops::RequiredParameter< util::Duration > begin
oops::RequiredParameter< util::Duration > obsFrequency
oops::RequiredParameter< int > obsDensity
Number of observations to generate in each time slot.
oops::OptionalParameter< util::Duration > end
oops::RequiredParameter< double > obsError
Iterator over all observations.
A Simple Observation Data Handler.
void random(std::vector< double > &) const
ObsTableParameters Parameters_
const std::vector< double > & locations() const
std::vector< double > locations_
static const std::string classname()
void print(std::ostream &) const
bool has(const std::string &col) const
void getdb(const std::string &, std::vector< int > &) const
const std::string obsname_
unsigned int nobs() const
void otWrite(const std::string &) const
const oops::Variables obsvars_
const eckit::mpi::Comm & comm_
ObsIterator begin() const
iterator to the first observation
const util::DateTime winbgn_
void generateDistribution(const ObsGenerateParameters ¶ms)
const util::DateTime winend_
std::map< std::string, std::vector< double > > data_
const std::string & obsname() const
const oops::Variables & obsvariables() const
ObsIterator end() const
iterator to the observation past-the-last
const std::vector< util::DateTime > & times() const
std::vector< util::DateTime > times_
void otOpen(const std::string &)
void putdb(const std::string &, const std::vector< int > &) const
ObsTable(const Parameters_ &, const eckit::mpi::Comm &, const util::DateTime &, const util::DateTime &, const eckit::mpi::Comm &)
Configuration parameters for the L95 model's ObsSpace.
oops::OptionalParameter< std::string > obsdatain
File from which to load observations.
oops::OptionalParameter< std::string > obsdataout
File to which to save observations and analysis.
oops::OptionalParameter< ObsGenerateParameters > generate
Options controlling generation of artificial observations.
Base class for observation spaces.
Base class for configuration parameters of observation spaces.
The namespace for the L95 model.