#include <GribFileIndex.h>
|
| GribFileMessage () |
|
| GribFileMessage (boost::shared_ptr< grib_handle > gh, const std::string &fileURL, long filePos, long msgPos, const std::vector< std::pair< std::string, boost::regex > > &members=std::vector< std::pair< std::string, boost::regex > >(), const std::vector< std::string > &extraKeys=std::vector< std::string >()) |
|
| GribFileMessage (boost::shared_ptr< XMLDoc >, std::string nsPrefix, xmlNodePtr node) |
|
| GribFileMessage (xmlTextReaderPtr reader, const std::string &fileName) |
|
| ~GribFileMessage () |
|
bool | isValid () const |
| test if this is a proper GribFileMessage or just the default constructor More...
|
|
std::string | toString () const |
| give a xml-string representation More...
|
|
const long | getEdition () const |
| accessors More...
|
|
const std::string & | getFileURL () const |
|
const off_t | getFilePosition () const |
|
const size_t | getMessageNumber () const |
| messages number within a multi-message More...
|
|
const std::string & | getName () const |
|
const std::string & | getShortName () const |
|
boost::posix_time::ptime | getValidTime () const |
|
boost::posix_time::ptime | getReferenceTime () const |
|
long | getTimeRangeIndicator () const |
| return gribs timeRangeIndicator (0=instant, 2,4=accumulated) More...
|
|
long | getLevelNumber () const |
|
long | getLevelType () const |
|
size_t | getTotalNumberOfEnsembles () const |
|
size_t | getPerturbationNumber () const |
|
const std::map< std::string, long > & | getOtherKeys () const |
|
const std::vector< long > & | getParameterIds () const |
|
const std::string & | getTypeOfGrid () const |
|
const GridDefinition & | getGridDefinition () const |
|
size_t | readData (std::vector< double > &data, double missingValue) const |
|
size_t | readLevelData (std::vector< double > &levelData, double missingValue, bool asimofHeader=false) const |
|
MetNoFimex::GribFileMessage::GribFileMessage |
( |
| ) |
|
- Parameters
-
gh | grib_handle |
fileURL | url of the input file |
filePos | start of message in file |
msgPos | start of real message within message (multimessage) |
members | list of member-names -> filepath-regexp |
extraKeys | additional keys to read from grib-file (both grib1 and 2) (key -> type) |
MetNoFimex::GribFileMessage::GribFileMessage |
( |
xmlTextReaderPtr |
reader, |
|
|
const std::string & |
fileName |
|
) |
| |
MetNoFimex::GribFileMessage::~GribFileMessage |
( |
| ) |
|
const long MetNoFimex::GribFileMessage::getEdition |
( |
| ) |
const |
const off_t MetNoFimex::GribFileMessage::getFilePosition |
( |
| ) |
const |
const std::string& MetNoFimex::GribFileMessage::getFileURL |
( |
| ) |
const |
const GridDefinition& MetNoFimex::GribFileMessage::getGridDefinition |
( |
| ) |
const |
long MetNoFimex::GribFileMessage::getLevelNumber |
( |
| ) |
const |
long MetNoFimex::GribFileMessage::getLevelType |
( |
| ) |
const |
const size_t MetNoFimex::GribFileMessage::getMessageNumber |
( |
| ) |
const |
messages number within a multi-message
Referenced by isValid().
const std::string& MetNoFimex::GribFileMessage::getName |
( |
| ) |
const |
get other keys - the other keys need to be available already during initialization
- Returns
- map with key -> value
Referenced by getPerturbationNumber().
const std::vector<long>& MetNoFimex::GribFileMessage::getParameterIds |
( |
| ) |
const |
Get the parameter ids as list with the following meanings:
- ed1: indicatorOfParameter, gribTablesVersionNo, identificationOfOriginatingGeneratingCentre;
- ed2: parameterNumber, paramterCategory, discipline
Referenced by getPerturbationNumber().
size_t MetNoFimex::GribFileMessage::getPerturbationNumber |
( |
| ) |
const |
|
inline |
boost::posix_time::ptime MetNoFimex::GribFileMessage::getReferenceTime |
( |
| ) |
const |
const std::string& MetNoFimex::GribFileMessage::getShortName |
( |
| ) |
const |
long MetNoFimex::GribFileMessage::getTimeRangeIndicator |
( |
| ) |
const |
return gribs timeRangeIndicator (0=instant, 2,4=accumulated)
Referenced by isValid().
size_t MetNoFimex::GribFileMessage::getTotalNumberOfEnsembles |
( |
| ) |
const |
|
inline |
give the total number of ensembles for this parameter
const std::string& MetNoFimex::GribFileMessage::getTypeOfGrid |
( |
| ) |
const |
boost::posix_time::ptime MetNoFimex::GribFileMessage::getValidTime |
( |
| ) |
const |
bool MetNoFimex::GribFileMessage::isValid |
( |
| ) |
const |
|
inline |
test if this is a proper GribFileMessage or just the default constructor
References getEdition(), getFilePosition(), getFileURL(), getLevelNumber(), getLevelType(), getMessageNumber(), getName(), getReferenceTime(), getShortName(), getTimeRangeIndicator(), getValidTime(), and toString().
size_t MetNoFimex::GribFileMessage::readData |
( |
std::vector< double > & |
data, |
|
|
double |
missingValue |
|
) |
| const |
Read the data from the underlying source to the vector data. Data of at maximum data.size() will be read.
- Parameters
-
data | the storage the data will be read to |
missingValue | the missing- / fill-value the returned data will have |
- Returns
- the actual amount of data read
Referenced by getPerturbationNumber().
size_t MetNoFimex::GribFileMessage::readLevelData |
( |
std::vector< double > & |
levelData, |
|
|
double |
missingValue, |
|
|
bool |
asimofHeader = false |
|
) |
| const |
Read the level-data from the underlying source to the vector levelData. In contrast to readData(), the levelData does not need to be pre-allocated, since levelData usually are small (a few hundred (in grib1 limited to 256)).
- Parameters
-
levelData | the storage the data will be read to |
missingValue | the missing- / fill-value the returned data will have |
- Returns
- the actual amount of data read
Referenced by getPerturbationNumber().
std::string MetNoFimex::GribFileMessage::toString |
( |
| ) |
const |
give a xml-string representation
Referenced by isValid().
The documentation for this class was generated from the following file: