libdballe  7.7
Data Structures | Namespaces | Enumerations | Functions
msg.h File Reference

Abstraction for a weather report message which is independent from the encoding, used to make sense of decoded information and to carry data between the various import and export modules of DB-ALLe. More...

#include <dballe/message.h>
#include <dballe/var.h>
#include <dballe/core/defs.h>
#include <dballe/core/matcher.h>
#include <dballe/msg/vars.h>
#include <stdio.h>
#include <vector>
#include <memory>
#include <iosfwd>
#include <dballe/msg/msg-extravars.h>

Go to the source code of this file.

Data Structures

class  dballe::Msg
 Storage for related physical data. More...
 
struct  dballe::MatchedMsg
 Match adapter for Msg. More...
 
struct  dballe::MatchedMessages
 Match adapter for Messages. More...
 

Namespaces

 dballe
 Copyright (C) 2008–2010 ARPA-SIM urpsi.nosp@m.m@sm.nosp@m.r.arp.nosp@m.a.em.nosp@m.r.it
 

Enumerations

enum  dballe::MsgType {
  dballe::MSG_GENERIC, dballe::MSG_SYNOP, dballe::MSG_PILOT, dballe::MSG_TEMP,
  dballe::MSG_TEMP_SHIP, dballe::MSG_AIREP, dballe::MSG_AMDAR, dballe::MSG_ACARS,
  dballe::MSG_SHIP, dballe::MSG_BUOY, dballe::MSG_METAR, dballe::MSG_SAT,
  dballe::MSG_POLLUTION
}
 Source of the data. More...
 

Functions

Messages dballe::msg::messages_from_csv (CSVReader &in)
 Read data from a CSV input. More...
 
void dballe::msg::messages_to_csv (const Messages &msgs, std::ostream &out)
 Output in CSV format.
 
const char * dballe::msg_type_name (MsgType type)
 Return a string with the name of a dba_msg_type. More...
 

Detailed Description

Abstraction for a weather report message which is independent from the encoding, used to make sense of decoded information and to carry data between the various import and export modules of DB-ALLe.

The internal representation is as connected as possible to physics rather than to observations. dba_msg is a container for related weather information, stored in a nonambiguous way.

To understand what is the difference betwee ::dba_msg and other ways of representing weather data, it is important to keep in mind how a value is usually defined in the various encodings:

::dba_msg contains values as tuples (variable, level layer, time range).

The variable is represented by a dba_var. The dba_varcode of the dba_var refers to a local B table which lists physical measurements unambiguously.

Level layer is a triple (level type, l1, l2) and time range is a triple (pindicator, p1, p2). The values of these two triples follow what is used in the GRIB encoding plus some local extensions, and an explanation of their possible value is found in the document "DB-ALLe Guide of the Fortran API".

Importers and exporters have to implement a mapping between their representation and the unambiguous physical representation. Luckily this is necessarily possible, because the ultimate purpose of the various message encodings is to correctly transmit those physical data.

Since to work with the full physical coordinates one needs to specify a lot of different parameters in order to identify a value (BLocal value, level layer, time range), there is a var.h module available with shortcut functions to the values that are used more commonly.