17 #include "eckit/config/Configuration.h"
18 #include "eckit/exception/Exceptions.h"
21 #include "oops/util/Logger.h"
22 #include "oops/util/missingValues.h"
27 const std::string & name)
28 : obsdb_(ot), data_(ot.nobs()), missing_(
util::missingValue(missing_))
35 : obsdb_(other.obsdb_), data_(other.data_.size()), missing_(
util::missingValue(missing_))
56 for (
size_t jj = 0; jj <
data_.size(); ++jj) {
68 for (
size_t jj = 0; jj <
data_.size(); ++jj) {
80 for (
size_t jj = 0; jj <
data_.size(); ++jj) {
92 for (
size_t jj = 0; jj <
data_.size(); ++jj) {
118 for (
size_t jj = 0; jj <
data_.size(); ++jj) {
134 for (
size_t jj = 0; jj <
data_.size(); ++jj) {
151 if (iobs > 0.0) zz = sqrt(zz/iobs);
160 for (
size_t jj = 0; jj <
data_.size(); ++jj) {
166 for (
size_t jj = 0; jj <
data_.size(); ++jj) {
172 const float fmiss = util::missingValue(
float());
173 for (
size_t jj = 0; jj <
data_.size(); ++jj) {
174 if (rhs[jj] == fmiss) {
177 data_.at(jj) =
static_cast<double>(rhs[jj]);
190 for (
size_t jj = 0; jj <
data_.size(); ++jj) {
192 vec(ii++) =
data_[jj];
200 for (
size_t jj = 0; jj <
data_.size(); ++jj) {
213 double zmin = std::numeric_limits<double>::max();
214 double zmax = std::numeric_limits<double>::lowest();
219 if (
val < zmin) zmin =
val;
220 if (
val > zmax) zmax =
val;
226 zavg /=
static_cast<double>(iobs);
227 os <<
"Lorenz 95 nobs= " << iobs <<
" Min=" << zmin <<
", Max=" << zmax
228 <<
", Average=" << zavg;
230 os <<
"Lorenz 95 : No observations";
Data in observation space.
A Simple Observation Data Handler.
void random(std::vector< double > &) const
void getdb(const std::string &, std::vector< int > &) const
void putdb(const std::string &, const std::vector< int > &) const
Vector in observation space.
unsigned int nobs() const
void mask(const ObsData1D< int > &)
std::vector< double > data_
size_t packEigenSize(const ObsVec1D &) const
void axpy(const double &, const ObsVec1D &)
void ones()
set all values to ones (for tests)
Eigen::VectorXd packEigen(const ObsVec1D &) const
ObsVec1D & operator=(const ObsVec1D &)
ObsVec1D & operator*=(const double &)
void print(std::ostream &) const
double dot_product_with(const ObsVec1D &) const
void read(const std::string &)
ObsVec1D & operator-=(const ObsVec1D &)
ObsVec1D & operator/=(const ObsVec1D &)
void save(const std::string &) const
ObsVec1D & operator+=(const ObsVec1D &)
ObsVec1D(const ObsTable &, const std::string &name="")
The namespace for the L95 model.