21 #include "oops/util/Logger.h"
22 #include "oops/util/Random.h"
29 std::array<double, ObsBias::ntypes> zz;
31 if (params.
covariance.value() != boost::none) {
33 if (covparams.
stream.value() != boost::none) zz[0] = *covparams.
stream.value();
34 if (covparams.
uwind.value() != boost::none) zz[1] = *covparams.
uwind.value();
35 if (covparams.
vwind.value() != boost::none) zz[2] = *covparams.
vwind.value();
36 if (covparams.
wspeed.value() != boost::none) zz[3] = *covparams.
wspeed.value();
38 std::string strn =
"";
40 if (jj > 0) strn +=
", ";
41 if (std::abs(zz[jj]) > 1.0e-8) {
43 std::ostringstream strs;
51 oops::Log::info() <<
"ObsBiasCovariance created, variances = " << strn << std::endl;
77 static util::NormalDistribution<double> dist(
ObsBias::ntypes, 0.0, 1.0, 4);
80 dx[jj] = dist[jj] * std::sqrt(
variance_[jj]);
88 os <<
"ObsBiasCovariance::print not implemented";
std::array< double, ObsBias::ntypes > variance_
ObsBiasCovariance(const ObsSpaceQG &, const Parameters_ &)
Constructor, destructor.
void multiply(const ObsBiasIncrement &, ObsBiasIncrement &) const
void print(std::ostream &) const
void randomize(ObsBiasIncrement &) const
void inverseMultiply(const ObsBiasIncrement &, ObsBiasIncrement &) const
Parameters taken by the ObsBias, ObsBiasCorrection and ObsBiasCovariance classes.
oops::OptionalParameter< double > wspeed
oops::OptionalParameter< double > uwind
oops::OptionalParameter< double > stream
oops::OptionalParameter< double > vwind
static const unsigned int ntypes
oops::OptionalParameter< ObsBiasCovarianceParameters > covariance
The namespace for the qg model.