11 #ifndef OOPS_BASE_OBSSPACES_H_
12 #define OOPS_BASE_OBSSPACES_H_
22 #include "eckit/config/LocalConfiguration.h"
23 #include "eckit/exception/Exceptions.h"
24 #include "eckit/geometry/Point2.h"
28 #include "oops/util/ConfigFunctions.h"
29 #include "oops/util/DateTime.h"
30 #include "oops/util/Logger.h"
31 #include "oops/util/ObjectCounter.h"
32 #include "oops/util/parameters/Parameters.h"
33 #include "oops/util/Printable.h"
34 #include "oops/util/Timer.h"
39 template <
typename OBS>
41 private util::ObjectCounter<ObsSpaces<OBS> > {
47 static const std::string
classname() {
return "oops::ObsSpaces";}
49 ObsSpaces(
const std::vector<Parameters_> &,
const eckit::mpi::Comm &,
50 const util::DateTime &,
const util::DateTime &,
52 ObsSpaces(
const eckit::Configuration &,
const eckit::mpi::Comm &,
53 const util::DateTime &,
const util::DateTime &,
70 void print(std::ostream &)
const;
72 std::vector<std::shared_ptr<ObsSpace_> >
spaces_;
79 template <
typename OBS>
81 const util::DateTime & bgn,
const util::DateTime & end,
82 const eckit::mpi::Comm & time)
83 : spaces_(0), wbgn_(bgn), wend_(end)
87 Log::debug() <<
"ObsSpaces::ObsSpaces : conf " << param << std::endl;
88 auto tmp = std::make_shared<ObsSpace_>(param, comm, bgn, end, time);
89 spaces_.push_back(std::move(tmp));
96 template <
typename OBS>
98 const util::DateTime & bgn,
const util::DateTime & end,
99 const eckit::mpi::Comm & time)
102 validateAndDeserialize<
Parameters_>(
util::vectoriseAndFilter(conf,
"obs space")),
103 comm, bgn, end, time)
108 template <
typename OBS>
113 template <
typename OBS>
115 for (std::size_t jj = 0; jj < spaces_.size(); ++jj) {
122 template <
typename OBS>
124 for (std::size_t jj = 0; jj < spaces_.size(); ++jj) {
ObsSpace_::Parameters_ Parameters_
ObsSpace_ & operator[](const std::size_t ii)
const util::DateTime wend_
ObsSpace< OBS > ObsSpace_
const util::DateTime wbgn_
ObsSpaces(const std::vector< Parameters_ > &, const eckit::mpi::Comm &, const util::DateTime &, const util::DateTime &, const eckit::mpi::Comm &time=oops::mpi::myself())
ObsSpace_::Parameters_ Parameters_
static const std::string classname()
std::vector< std::shared_ptr< ObsSpace_ > > spaces_
void save() const
Save files.
const ObsSpace_ & operator[](const std::size_t ii) const
const util::DateTime & windowStart() const
Assimilation window.
const util::DateTime & windowEnd() const
std::size_t size() const
Access.
void print(std::ostream &) const
const eckit::mpi::Comm & myself()
Default communicator with each MPI task by itself.
The namespace for the main oops code.