16 #include "ioda/ObsDataVector.h"
17 #include "oops/util/IntSetParser.h"
18 #include "oops/util/missingValues.h"
29 : invars_(), channels_() {
35 std::set<int> channelset = oops::parseIntSet(chlist);
36 std::copy(channelset.begin(), channelset.end(), std::back_inserter(
channels_));
53 size_t nlocs = in.
nlocs();
56 std::vector<float> clr(nlocs);
57 std::vector<float> bak(nlocs);
58 std::vector<float> obs(nlocs);
59 std::vector<float> bias(nlocs);
63 for (
size_t ich = 0; ich < SCI.nvars(); ++ich) {
71 std::fill(bias.begin(), bias.end(), 0.0f);
73 for (
size_t iloc = 0; iloc < nlocs; ++iloc) {
78 if (clr[iloc] > -1.0f && clr[iloc] < 1.0f) clr[iloc] = bak[iloc];
80 Cmod =
abs(clr[iloc] - bak[iloc]);
81 Cobs =
abs(clr[iloc] - obs[iloc] + bias[iloc]);
82 SCI[ich][iloc] = 0.5f * (Cmod + Cobs);