UFO
|
Retrieve and store data for entire sample. This class uses lazy loading; vectors of variables are retrieved once requested and cached after that. Variables in certain groups are optional, meaning that if they are not present on the obsdb they will be filled with a default value if requested. More...
#include <EntireSampleDataHandler.h>
Public Member Functions | |
EntireSampleDataHandler (ioda::ObsSpace &obsdb, const DataHandlerParameters &options) | |
template<typename T > | |
std::vector< T > & | get (const std::string &fullname) |
void | writeQuantitiesToObsdb () |
template<typename T > | |
void | initialiseVector (const std::string fullname) |
Private Member Functions | |
template<typename T > | |
void | putDataVector (const std::string &fullname, const std::vector< T > &datavec) |
Put entire data vector on obsdb. More... | |
int | defaultValue (const std::vector< int > &vec, const std::string &groupname) |
Default value used to fill vector of integers. More... | |
float | defaultValue (const std::vector< float > &vec, const std::string &groupname) |
Default value used to fill vector of floats. More... | |
std::string | defaultValue (const std::vector< std::string > &vec, const std::string &groupname) |
Default value used to fill vector of strings. More... | |
Private Attributes | |
ioda::ObsSpace & | obsdb_ |
Observation database. More... | |
const DataHandlerParameters & | options_ |
Configurable parameters. More... | |
std::unordered_map< std::string, boost::variant< std::vector< int >, std::vector< float >, std::vector< std::string > > > | entireSampleData_ |
Container of each variable in the entire data set. More... | |
const int | missingValueInt = util::missingValue(missingValueInt) |
Missing value (int) More... | |
const float | missingValueFloat = util::missingValue(missingValueFloat) |
Missing value (float) More... | |
const std::string | missingValueString = util::missingValue(missingValueString) |
Missing value (string) More... | |
Retrieve and store data for entire sample. This class uses lazy loading; vectors of variables are retrieved once requested and cached after that. Variables in certain groups are optional, meaning that if they are not present on the obsdb they will be filled with a default value if requested.
Definition at line 44 of file EntireSampleDataHandler.h.
ufo::EntireSampleDataHandler::EntireSampleDataHandler | ( | ioda::ObsSpace & | obsdb, |
const DataHandlerParameters & | options | ||
) |
Definition at line 14 of file EntireSampleDataHandler.cc.
|
private |
Default value used to fill vector of floats.
Definition at line 55 of file EntireSampleDataHandler.cc.
|
private |
Default value used to fill vector of integers.
Definition at line 46 of file EntireSampleDataHandler.cc.
|
private |
Default value used to fill vector of strings.
Definition at line 64 of file EntireSampleDataHandler.cc.
|
inline |
Retrieve a vector containing the requested variable for the entire data sample.
Definition at line 58 of file EntireSampleDataHandler.h.
|
inline |
Initialise vector in the entire sample for a variable that is not currently stored. Fill the vector with the default value for the data type.
Definition at line 103 of file EntireSampleDataHandler.h.
|
inlineprivate |
Put entire data vector on obsdb.
Definition at line 127 of file EntireSampleDataHandler.h.
void ufo::EntireSampleDataHandler::writeQuantitiesToObsdb | ( | ) |
Write various quantities to the obsdb so they can be used in future QC checks. The particular variables written out are hardcoded but this could be changed to a configurable list if requred.
Definition at line 20 of file EntireSampleDataHandler.cc.
|
private |
Container of each variable in the entire data set.
Definition at line 157 of file EntireSampleDataHandler.h.
|
private |
Missing value (float)
Definition at line 163 of file EntireSampleDataHandler.h.
|
private |
Missing value (int)
Definition at line 160 of file EntireSampleDataHandler.h.
|
private |
Missing value (string)
Definition at line 166 of file EntireSampleDataHandler.h.
|
private |
Observation database.
Definition at line 141 of file EntireSampleDataHandler.h.
|
private |
Configurable parameters.
Definition at line 144 of file EntireSampleDataHandler.h.