FV3 Bundle
|
Implementation of IodaIO for ODB API. More...
#include <OdbApiIO.h>
Public Member Functions | |
OdbApiIO (const std::string &FileName, const std::string &FileMode, const std::size_t &Nlocs, const std::size_t &Nobs, const std::size_t &Nrecs, const std::size_t &Nvars) | |
~OdbApiIO () | |
void | ReadVar (const std::string &VarName, int *VarData) |
void | ReadVar (const std::string &VarName, float *VarData) |
void | ReadVar (const std::string &VarName, double *VarData) |
void | WriteVar (const std::string &VarName, int *VarData) |
void | WriteVar (const std::string &VarName, float *VarData) |
void | WriteVar (const std::string &VarName, double *VarData) |
void | ReadDateTime (int *VarDate, int *VarTime) |
Public Member Functions inherited from ioda::IodaIO | |
virtual | ~IodaIO ()=0 |
std::string | fname () const |
std::string | fmode () const |
std::size_t | nlocs () |
std::size_t | nobs () |
std::size_t | nrecs () |
std::size_t | nvars () |
Static Public Member Functions | |
static const std::string | classname () |
classname method for object counter More... | |
Private Member Functions | |
void | print (std::ostream &os) const |
template<class T > | |
void | ReadVarTemplate (const std::string &VarName, T *VarData) |
Private Attributes | |
odbql * | db_ = nullptr |
pointer to odbql object More... | |
Additional Inherited Members | |
Protected Attributes inherited from ioda::IodaIO | |
std::string | fname_ |
file name More... | |
std::string | fmode_ |
file mode ("r" -> read, "w" -> overwrite, "W" -> create and write) More... | |
std::size_t | nlocs_ |
number of unique locations More... | |
std::size_t | nobs_ |
number of unique observations More... | |
std::size_t | nrecs_ |
number of unique records More... | |
std::size_t | nvars_ |
number of unique variables More... | |
Implementation of IodaIO for ODB API.
The OdbOpiIO class defines the constructor and methods for the abstract class IodaIO.
Definition at line 37 of file OdbApiIO.h.
ioda::OdbApiIO::OdbApiIO | ( | const std::string & | FileName, |
const std::string & | FileMode, | ||
const std::size_t & | Nlocs, | ||
const std::size_t & | Nobs, | ||
const std::size_t & | Nrecs, | ||
const std::size_t & | Nvars | ||
) |
This constructor will open the ODB API file. If opening in read mode, the parameters nlocs, nobs, nrecs and nvars will be set by querying the size of dimensions of the same names in the input file. If opening in write mode, the parameters will be set from the same named arguements to this constructor.
[in] | FileName | Path to the ODB API file |
[in] | FileMode | "r" for read, "w" for overwrite to an existing file and "W" for create and write to a new file. |
[in] | Nlocs | Number of unique locations in the obs data. |
[in] | Nobs | Number of unique observations in the obs data. |
[in] | Nrecs | Number of unique records in the obs data. Records are atomic units that will remain intact when obs are distributed across muliple process elements. A single radiosonde sounding would be an example. |
[in] | Nvars | Number of unique varibles in the obs data. |
Definition at line 51 of file OdbApiIO.cc.
ioda::OdbApiIO::~OdbApiIO | ( | ) |
Definition at line 161 of file OdbApiIO.cc.
|
inlinestatic |
classname method for object counter
This method is supplied for the ObjectCounter base class. It defines a name to identify an object of this class for reporting by OOPS.
Definition at line 47 of file OdbApiIO.h.
|
private |
Definition at line 339 of file OdbApiIO.cc.
|
virtual |
Implements ioda::IodaIO.
Definition at line 326 of file OdbApiIO.cc.
|
virtual |
Implements ioda::IodaIO.
Definition at line 266 of file OdbApiIO.cc.
|
virtual |
Implements ioda::IodaIO.
Definition at line 273 of file OdbApiIO.cc.
|
virtual |
Implements ioda::IodaIO.
Definition at line 280 of file OdbApiIO.cc.
|
private |
This method selects the data in the column called VarName and loads it into the returned array VarData. The caller is responsible for allocating the memory for the VarData array.
[in] | VarName | Name of variable to select |
[in/out] | VarData Pointer to the array where the data is loaded. |
Definition at line 186 of file OdbApiIO.cc.
|
virtual |
Implements ioda::IodaIO.
Definition at line 287 of file OdbApiIO.cc.
|
virtual |
Implements ioda::IodaIO.
Definition at line 300 of file OdbApiIO.cc.
|
virtual |
Implements ioda::IodaIO.
Definition at line 313 of file OdbApiIO.cc.
|
private |
pointer to odbql object
This data member is a pointer to a odbql type. The odbql type is returned by the odbql_open function and is used by all following odb api functions to interact with the odb api file.
Definition at line 83 of file OdbApiIO.h.