UFO
|
Retrieve and store data for individual profiles. To do this, first the vector of values in the entire data sample is retrieved then the relevant data corresponding to this profile are extracted. More...
#include <ProfileDataHandler.h>
Public Member Functions | |
ProfileDataHandler (ioda::ObsSpace &obsdb, const DataHandlerParameters &options, EntireSampleDataHandler &entireSampleDataHandler, const ProfileIndices &profileIndices) | |
template<typename T > | |
std::vector< T > & | get (const std::string &fullname) |
template<typename T > | |
void | set (const std::string &fullname, std::vector< T > &&vec_in) |
void | reset () |
template<typename T > | |
void | updateValueIfPresent (const std::vector< T > &vecIn, const size_t &idxIn, std::vector< T > &vecOut, const size_t &idxOut) |
Transfer values from one vector to another (as long as neither is empty). More... | |
void | updateEntireSampleData () |
void | setFinalReportFlags () |
Set final report flags based on the NumAnyErrors counter. More... | |
void | setFlagged (const size_t nvars, std::vector< std::vector< bool >> &flagged) |
void | getProfileIndicesInEntireSample (const std::string &groupname) |
Get indices in entire sample corresponding to current profile. More... | |
ioda::ObsSpace & | getObsdb () |
Return obsdb. More... | |
Private Attributes | |
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. More... | |
ioda::ObsSpace & | obsdb_ |
Observation database. More... | |
const DataHandlerParameters & | options_ |
Configurable parameters. More... | |
EntireSampleDataHandler & | entireSampleDataHandler_ |
Class that handles the entire data sample. More... | |
const ProfileIndices & | profileIndices_ |
Class that handles profile indices. More... | |
std::vector< size_t > | profileIndicesInEntireSample_ |
Indices in the entire data sample that correspond to the current profile. More... | |
Retrieve and store data for individual profiles. To do this, first the vector of values in the entire data sample is retrieved then the relevant data corresponding to this profile are extracted.
Definition at line 40 of file ProfileDataHandler.h.
ufo::ProfileDataHandler::ProfileDataHandler | ( | ioda::ObsSpace & | obsdb, |
const DataHandlerParameters & | options, | ||
EntireSampleDataHandler & | entireSampleDataHandler, | ||
const ProfileIndices & | profileIndices | ||
) |
Definition at line 12 of file ProfileDataHandler.cc.
|
inline |
Retrieve a vector containing the requested variable for the current profile.
Definition at line 53 of file ProfileDataHandler.h.
|
inline |
Return obsdb.
Definition at line 136 of file ProfileDataHandler.h.
void ufo::ProfileDataHandler::getProfileIndicesInEntireSample | ( | const std::string & | groupname | ) |
Get indices in entire sample corresponding to current profile.
Definition at line 27 of file ProfileDataHandler.cc.
void ufo::ProfileDataHandler::reset | ( | ) |
Reset profile information (vectors and corresponding names). This should be called every time a new profile will be retrieved.
Definition at line 22 of file ProfileDataHandler.cc.
|
inline |
Directly set a vector for the current profile. Typically used to store variables that are used locally in checks (e.g. intermediate values).
Definition at line 92 of file ProfileDataHandler.h.
void ufo::ProfileDataHandler::setFinalReportFlags | ( | ) |
Set final report flags based on the NumAnyErrors counter.
Definition at line 74 of file ProfileDataHandler.cc.
void ufo::ProfileDataHandler::setFlagged | ( | const size_t | nvars, |
std::vector< std::vector< bool >> & | flagged | ||
) |
Update the 'flagged' vector based on any flags that may have changed during the checks. The QC flag group is hardocded but this could be changed to a configurable value if required.
Definition at line 87 of file ProfileDataHandler.cc.
void ufo::ProfileDataHandler::updateEntireSampleData | ( | ) |
If any variables in the current profile were modified by the checks, the equivalent variables in the entire sample are set to the modified values. The variables that are (potentially) modified are hardcoded but this could be changed to a configurable list if requred.
Definition at line 44 of file ProfileDataHandler.cc.
|
inline |
Transfer values from one vector to another (as long as neither is empty).
Definition at line 110 of file ProfileDataHandler.h.
|
private |
Class that handles the entire data sample.
Definition at line 150 of file ProfileDataHandler.h.
|
private |
Observation database.
Definition at line 144 of file ProfileDataHandler.h.
|
private |
Configurable parameters.
Definition at line 147 of file ProfileDataHandler.h.
|
private |
Container of each variable in the current profile.
Definition at line 141 of file ProfileDataHandler.h.
|
private |
Class that handles profile indices.
Definition at line 153 of file ProfileDataHandler.h.
|
private |
Indices in the entire data sample that correspond to the current profile.
Definition at line 156 of file ProfileDataHandler.h.