15 : profileDataHandler_(profileDataHandler)
21 const std::vector <std::string> &variableNamesFloat,
22 const std::vector <std::string> &variableNamesString,
23 const std::vector <std::string> &variableNamesGeoVaLs,
24 const std::vector <std::string> &variableNamesObsDiags)
48 return it_profileGeoVaLs->second;
50 throw eckit::BadValue(
"GeoVaL " + fullname +
" not present in profile. "
51 "Please add it to the relevant argument in the call "
52 "to produceProfileVector()", Here());
60 return it_profileObsDiags->second;
62 throw eckit::BadValue(
"ObsDiag " + fullname +
" not present in profile. "
63 "Please add it to the relevant argument in the call "
64 "to produceProfileVector()", Here());
84 std::find(extended_obs_space.begin(),
85 extended_obs_space.end(), 1) != extended_obs_space.end())
86 throw eckit::BadValue(
"This profile is expected to be in the original ObsSpace "
87 "but has been labelled as being in the extended ObsSpace.", Here());
89 std::find(extended_obs_space.begin(),
90 extended_obs_space.end(), 0) != extended_obs_space.end())
91 throw eckit::BadValue(
"This profile is expected to be in the extended ObsSpace "
92 "but has been labelled as being in the original ObsSpace.", Here());
Retrieve and store data for individual profiles. To do this, first the vector of values in the entire...
std::vector< T > & get(const std::string &fullname)
void set(const std::string &fullname, std::vector< T > &&vec_in)
std::vector< float > & getGeoVaLVector(const std::string &variableName)
Get GeoVaLs for a particular profile.
int getNumProfileLevels() const
Return number of levels to which QC checks should be applied.
std::vector< float > & getObsDiag(const std::string &variableName)
Get ObsDiags for a particular profile.
std::vector< std::string > variableNamesInt_
Names of int variables.
std::unordered_map< std::string, boost::variant< std::vector< int >, std::vector< float >, std::vector< std::string > > > profileData_
Container of each variable in the current profile.
ProfileDataHolder(ProfileDataHandler &profileDataHandler)
std::vector< float > & getObsDiagVector(const std::string &fullname)
Retrieve an ObsDiag vector if it is present. If not, throw an exception.
void moveValuesToHandler()
Move all values to the associated ProfileDataHandler.
std::vector< std::string > variableNamesGeoVaLs_
Names of GeoVaLs.
ProfileDataHandler & profileDataHandler_
Profile data handler.
std::size_t numProfileLevels_
Number of profile levels.
void fill(const std::vector< std::string > &variableNamesInt, const std::vector< std::string > &variableNamesFloat, const std::vector< std::string > &variableNamesString, const std::vector< std::string > &variableNamesGeoVaLs, const std::vector< std::string > &variableNamesObsDiags)
Fill profile with data.
std::vector< std::string > variableNamesFloat_
Names of float variables.
std::vector< std::string > variableNamesString_
Names of string variables.
std::unordered_map< std::string, std::vector< float > > profileGeoVaLs_
Container of GeoVaLs in the current profile.
std::vector< float > & getGeoVaLVector(const std::string &fullname)
Retrieve a GeoVaL vector if it is present. If not, throw an exception.
std::vector< std::string > variableNamesObsDiags_
Names of ObsDiags.
void checkObsSpaceSection(ufo::ObsSpaceSection section)
Check this profile is in the expected ObsSpace section (original or extended).
std::unordered_map< std::string, std::vector< float > > profileObsDiags_
Container of ObsDiags in the current profile.
static constexpr const char *const extended_obs_space