18 #include "eckit/config/Configuration.h"
21 #include "oops/util/Logger.h"
27 : bias_(ntypes, 0.0), active_(false), geovars_(), hdiags_() {
28 oops::Log::info() <<
"ObsBias: conf = " << conf << std::endl;
29 eckit::LocalConfiguration biasconf;
30 if (conf.has(
"obs bias")) {
31 conf.get(
"obs bias", biasconf);
32 active_ = biasconf.has(
"stream") || biasconf.has(
"uwind") ||
33 biasconf.has(
"vwind") || biasconf.has(
"wspeed");
36 if (biasconf.has(
"stream"))
bias_[0] = biasconf.getDouble(
"stream");
37 if (biasconf.has(
"uwind"))
bias_[1] = biasconf.getDouble(
"uwind");
38 if (biasconf.has(
"vwind"))
bias_[2] = biasconf.getDouble(
"vwind");
39 if (biasconf.has(
"wspeed"))
bias_[3] = biasconf.getDouble(
"wspeed");
40 std::string strn =
"";
42 if (jj > 0) strn +=
", ";
43 std::ostringstream strs;
47 oops::Log::info() <<
"ObsBias::ObsBias created, bias = " << strn << std::endl;
52 : bias_(ntypes, 0.0), active_(other.active_),
53 geovars_(other.geovars_), hdiags_(other.hdiags_)
62 for (
unsigned int jj = 0; jj <
ntypes; ++jj)
bias_[jj] += dx[jj];
79 for (
unsigned int jj = 0; jj <
ntypes; ++jj) {
84 zz = std::sqrt(zz/ii);
91 std::string strn =
"";
93 if (jj > 0) strn +=
", ";
94 std::ostringstream strs;
98 os << std::endl <<
"ObsBias = " << strn;