Logo Search packages:      
Sourcecode: magics++ version File versions  Download package

MvObs Class Reference

#include <MvObs.h>

List of all members.

Detailed Description

A class to handle one observation report stored in a BUFR message.

This class is used to request data and metadata from a single BUFR message (Observation Report). Access to BUFR messages in files is done using classes MvObsSet and MvObsSetIterator.

Elements within the message body are referenced by BUFR descriptors. These descriptors are of the form 'ZXXYYY', where Z=0, XX defines an element class and YYY defines an element within a class. Descriptor values can be found in "BUFR, User Guide and Reference Manual" by Milan Dragosavac (ECMWF).
A Word of Warning: leave out leading zeroes when writing constants (such as descriptors) into your code, unless you intend to use octal constants!

Current Descriptor
Some member functions need no descriptor, because they will use the internal Current Descriptor set by a previously called member function which had a descriptor parameter.

Missing Values
Functions returning values from the message will return const kBufrMissingValue if the requested value is not available. Another const, called kBufrMissingIntValue is used for missing integer values.

Definition at line 81 of file MvObs.h.

Public Member Functions

bool Advance ()
 Advances to the next subset in a multisubset BUFR message.
int confidence ()
 Returns the confidence value for the current data, if exists.
long currentDescriptor ()
 Returns Current Descriptor.
float currentValue ()
 Returns the data value related to Current Descriptor.
int editionNumber ()
 Returns the Edition number from BUFR section 0.
EElementValueType elementValueType ()
 Returns the type of data related to Current Descriptor.
EElementValueType elementValueType (long aDescriptor)
 Returns the type of data related to descriptor 'aDescriptor'.
double feedbackValue (int row, int col)
 Returns the value of the 'row'th element in the 'col'th feedback column.
double feedbackValue (int col)
 Returns the value from the 'col'th feedback column for Current Descriptor.
string findSomeIdent ()
 Looks for an ident from the BUFR message.
float firstLevel (long levelDescriptor)
 Returns the first value related to 'levelDescriptor', i.e. value of the first level.
float firstPressureLevel ()
 Returns the value of the first pressure level in hPa.
bool hasConfidences ()
 Checks whether the BUFR message contains confidence values or not.
bool hasSection2 ()
 Returns 'true' if BUFR message contains local section 2, 'false' if not.
long intValue (long aDescriptor)
 Returns the value of an element defined by 'aDescriptor' as 'long'.
int localTableVersion ()
MvLocation location ()
 Returns the location from the observation report (from the data: BUFR section 4).
int masterTable ()
int masterTableVersion ()
int messageSubtype ()
 Returns the Message Subtype (local subtype) code from BUFR section 1.
int messageType ()
 Returns the Message Type code from BUFR section 1.
bool msg_ok () const
 Checks that this MvObs contains a valid decodable BUFR message.
int msgSubsetCount ()
 Returns the number of subsets available in this BUFR message.
TDynamicTime msgTime ()
 Returns the time from the message metadata (from BUFR section 1).
 MvObs (const MvObs &b)
 Copy constructor.
 MvObs (MvBufr *b=NULL, int i=1)
string name ()
 Returns the name of the data referenced by Current Descriptor.
string name (long aDescriptor)
 Returns the name of the data referenced by 'aDescriptor' (from BUFR Table B).
float nextLevel ()
 Returns the value of the next level related to Current Level Descriptor.
float nextPressureLevel ()
 Returns the value of the next pressure level in hPa.
float nextValue ()
 Returns the value of the next element with the same descriptor.
int numberOfLevels (long levelDescriptor)
 Returns the number of times level coordinator descriptor 'levelDescriptor' is found.
int numberOfPressureLevels ()
 Returns the number of pressure levels found in the observation report.
TDynamicTime obsTime ()
 Returns the time from the observation report (from the data: BUFR section 4).
 operator void * ()
 Operator to test the validity of a new MvObs.
bool operator! ()
 Checks whether this MvObs contains a BUFR message or is empty.
MvObsoperator= (const MvObs &b)
 Assignment operator.
double operator[] (int n)
 Index access operator returns the 'n'th data value.
int originatingCentre ()
 Returns the Originating Centre code from BUFR section 1.
boolean printAllValues ()
 Prints all data values into standard output.
boolean printSection0 (ostream &aStream=cout)
 Prints BUFR section 0 to output stream 'aStream'.
boolean printSection1 (ostream &aStream=cout)
 Prints BUFR section 1 to output stream 'aStream'.
boolean printSection2 (ostream &aStream=cout)
 Prints BUFR section 2 to output stream 'aStream'.
boolean printSection3 (ostream &aStream=cout)
 Prints BUFR section 3 to output stream 'aStream'.
const unsigned char * section2Ptr ()
 Returns a pointer to the beginning of local section 2 in BUFR message.
bool setFirstDescriptor ()
 Sets the first expanded descriptor in the message as Current Descriptor.
bool setNextDescriptor ()
 Advances Current Descriptor to the next expanded descriptor in the message.
string stringValue ()
 Returns the value of Current Descriptor as a string.
string stringValue (long aDescriptor)
 Returns the value of an element defined by 'aDescriptor' as 'string'.
int subsetNumber ()
 Returns the current subset number (in a multisubset BUFR message).
string unit ()
 Returns the unit of the data referenced by Current Descriptor.
string unit (long aDescriptor)
 Returns the unit of the data referenced by 'aDescriptor' (from BUFR Table B).
float value (long aDescriptor)
 Returns the value of an element defined by 'aDescriptor'.
float valueByLayer (float firstLevel, float secondLevel, long aDescriptor)
 Returns the value of the data corresponding to 'aDescriptor' in a layer.
float valueByLevel (long aLevelDescriptor, float aLevel, long aDescriptor)
 Returns the value of the specified data for the specified level.
float valueByOccurrence (int n, long descr)
 Returns the value corresponding to the 'n'th occurrence of descriptor 'descr'.
float valueByPressureLevel (float aLevel, long aDescriptor)
 Returns the value of the data corresponding to 'aDescriptor' on level 'aLevel'.
int WmoBlockNumber ()
 Returns the 2 digit WMO block identifier 'BB'.
long WmoIdentNumber ()
 Returns the 5 digit WMO station identifier.
int WmoStationNumber ()
 Returns the 3 digit WMO station identifier 'SSS'.
boolean writeAllValues (const char *aPathName)
 Writes all data values into file 'aPathName'.
boolean writeAllValues (ostream &aStream)
 Writes all data values into output stream 'aStream'.
boolean writeBufrBox (ostream &aStream=cout)
 Calls 'bufren' routine BUPRTBOX to write feedback data into stream 'aStream'.
bool writeConfidenceValues (ostream &aStream)
 Writes confidence values into stream 'aStream'.

Protected Attributes

long _bufr_id
long _currentLevelCoordinate
int _currentLevelIndex
int _lastSpecifierIndex
int _subsetNr

Private Member Functions

void _clean ()
void _copy (const MvObs &b)
void _copy (MvBufr *b)
bool getBufrBoxSize (int &rows, int &cols)
float level (long levelDescriptor, int firstIndexValue)
float pressureLevel (int firstIndexValue)
const unsigned char * section1Ptr ()
int specifierIndex (long aSpecifierDescriptor, float aSpecifierValue, int firstIndexValue=0)
int subsetOffset ()
float valueBySpecifier (long aSpecifierDescriptor, float aSpecifierValue, long aDescriptor, int firstIndexValue=0)
boolean writeValues (ostream &aStream, int first, int last)


class MvBufrOut
class MvObsSet
class MvObsSetIterator

The documentation for this class was generated from the following files:

Generated by  Doxygen 1.6.0   Back to index