UFO
PrimitiveVariables.cc
Go to the documentation of this file.
1 /*
2  * (C) Copyright 2021 Met Office UK
3  *
4  * This software is licensed under the terms of the Apache Licence Version 2.0
5  * which can be obtained at http://www.apache.org/licenses/LICENSE-2.0.
6  */
7 
8 #include "eckit/utils/StringTools.h"
11 
12 namespace ufo {
13 
15  if (variableIndex_ < variables_.size()) {
16  const Variable &variable = variables_[variableIndex_];
18  if (eckit::StringTools::endsWith(variable.group(), "ObsFunction")) {
19  data_.get(variable, *vector_);
20  } else {
21  for (size_t i = 0; i < variable.size(); ++i) {
22  data_.get(variable[i], (*vector_)[i]);
23  }
24  }
25  }
26 }
27 
28 } // namespace ufo
ioda::ObsSpace & obsspace() const
Returns reference to ObsSpace associated with ObsFilterData.
void get(const Variable &varname, std::vector< float > &values) const
Fills a std::vector with values of the specified variable.
std::unique_ptr< ioda::ObsDataVector< float > > vector_
const std::string & group() const
Definition: Variable.cc:116
oops::Variables toOopsVariables() const
Definition: Variable.cc:139
size_t size() const
Definition: Variable.cc:78
size_t size() const
Return the number of constituent Variable objects (some of which may contain multiple channels).
Definition: Variables.cc:92
Definition: RunCRTM.h:27