Main Page   Alphabetical List   Compound List   File List   Compound Members   File Members  

GRIB_MESSAGE Class Reference

Message structure: a grid at single level and single time. More...

#include <GRIB.h>

List of all members.

Public Methods

 GRIB_MESSAGE ()
 Constructor.

 ~GRIB_MESSAGE ()
 Destructor.

int Decode (unsigned char *message, size_t reclen)
 Decode a message. Not to be used.

void Encode ()
 Encode a message. Not to be used.

void set_grid (GRIB_GRID &grid)
 Set the grid.

void set_grid (int code)
void set_time (GRIB_TIME &gtime)
 Set time.

void set_level (GRIB_LEVEL &level)
 Set vertical level of grid.

void set_field (GRIB_FIELD &field)
 Set the field to be stored.


Public Attributes

size_t reclen
 Overall message record lenght.

unsigned char * message
 Encoded message.

GRIB_GRID grid
 The grid (local storage. Filled on set and on ReadMessage).

GRIB_LEVEL level
 The level (local storage. Filled on set and on ReadMessage).

GRIB_TIME gtime
 The time (local storage. Filled on set and on ReadMessage).

GRIB_FIELD field
 The field (local storage. Filled on set and on ReadMessage).


Detailed Description

Message structure: a grid at single level and single time.

Definition at line 1027 of file GRIB.h.


Constructor & Destructor Documentation

GRIB_MESSAGE::GRIB_MESSAGE  
 

Constructor.

Definition at line 1651 of file GRIB.cpp.

References message, and reclen.

GRIB_MESSAGE::~GRIB_MESSAGE  
 

Destructor.

Definition at line 1661 of file GRIB.cpp.

References message.


Member Function Documentation

int GRIB_MESSAGE::Decode unsigned char *    message,
size_t    reclen
 

Decode a message. Not to be used.

Parameters:
message:  encoded message from input buffer
reclen:  Size in bytes of the previous array

Definition at line 1663 of file GRIB.cpp.

References BDS_LEN, BMS_LEN, GRIB_FIELD::Decode(), GRIB_GRID::Decode(), GRIB_LEVEL::Decode(), GRIB_TIME::Decode(), field, GDS_LEN, grid, gtime, level, message, GRIB_GRID::nxny, PDS_HAS_BMS, PDS_HAS_GDS, PDS_LEN, and reclen.

Referenced by GRIB_FILE::ReadMessage().

void GRIB_MESSAGE::Encode  
 

Encode a message. Not to be used.

Definition at line 1702 of file GRIB.cpp.

References BDS_LEN, BMS_LEN, GRIB_FIELD::center, GRIB_FIELD::decimalscale, GRIB_GRID::Encode(), GRIB_LEVEL::Encode(), GRIB_TIME::Encode(), field, GDS_LEN, GRIB_LEVEL_UNKNOWN, GRIB_PARAMETER_UNKNOWN, GRIB_TIMEUNIT_UNKNOWN, grid, GRIB_GRID::grid_code, gtime, level, message, mk_BDS(), mk_BMS(), mk_PDS(), PDS_LEN, GRIB_FIELD::process, reclen, GRIB_FIELD::size, GRIB_FIELD::subcenter, GRIB_FIELD::table, GRIB_TIME::timeunit, GRIB_LEVEL::type, GRIB_FIELD::undef_high, GRIB_FIELD::undef_low, GRIB_FIELD::vals, GRIB_FIELD::varcode, WGRIB_ENCODE_2BYTES, WGRIB_ENCODE_BYTE, WGRIB_ENCODE_END, WGRIB_ENCODE_INIT, and WGRIB_ENCODE_S2BYTES.

Referenced by GRIB_FILE::WriteMessage().

void GRIB_MESSAGE::set_field GRIB_FIELD   field
 

Set the field to be stored.

Parameters:
field:  field parameter to be encoded

Definition at line 1936 of file GRIB.cpp.

References GRIB_FIELD::binscale, GRIB_FIELD::decimalscale, field, GRIB_FIELD::numbits, GRIB_FIELD::refvalue, GRIB_FIELD::size, GRIB_FIELD::undef_high, GRIB_FIELD::undef_low, GRIB_FIELD::vals, GRIB_FIELD::varcode, GRIB_FIELD::vardesc, GRIB_FIELD::varname, and GRIB_FIELD::varunit.

void GRIB_MESSAGE::set_grid int    code
 

@grib Set the grid (using pre-defined grid).

Parameters:
code:  grid code. See GRIB1 documentation

void GRIB_MESSAGE::set_grid GRIB_GRID   grid
 

Set the grid.

Parameters:
grid:  grid to be encoded

Definition at line 1825 of file GRIB.cpp.

References GRIB_GRID_lambert_conformal::bipolar, GRIB_GRID_regular_latlon::dlat, GRIB_GRID_gaussian_latlon::dlon, GRIB_GRID_regular_latlon::dlon, GRIB_GRID_spaceview::dx, GRIB_GRID_mercator::dx, GRIB_GRID_lambert_conformal::dx, GRIB_GRID_polar_stereographic::dx, GRIB_GRID_spaceview::dy, GRIB_GRID_mercator::dy, GRIB_GRID_lambert_conformal::dy, GRIB_GRID_polar_stereographic::dy, GRIB_GRID::gl, GRIB_GRID_GAUSSIAN, GRIB_GRID_LAMBERT_CONFORMAL, GRIB_GRID_MERCATOR, GRIB_GRID_POLAR_STEREOGRAPHIC, GRIB_GRID_REGULAR_LATLON, GRIB_GRID_SPACEVIEW, GRIB_GRID_SPHERICAL_HARMONIC_COE, grid, GRIB_GRID::grid_code, GRIB_GRID::is_dirincgiven, GRIB_GRID::is_earth_spheroid, GRIB_GRID::is_fortran, GRIB_GRID::is_uv_grid, GRIB_GRID::is_x_negative, GRIB_GRID::is_y_negative, GRIB_GRID_spherical_harmonic::J, GRIB_GRID_spherical_harmonic::K, GRIB_GRID_spaceview::lap, GRIB_GRID_mercator::lat1, GRIB_GRID_lambert_conformal::lat1, GRIB_GRID_polar_stereographic::lat1, GRIB_GRID_gaussian_latlon::lat1, GRIB_GRID_regular_latlon::lat1, GRIB_GRID_mercator::lat2, GRIB_GRID_gaussian_latlon::lat2, GRIB_GRID_regular_latlon::lat2, GRIB_GRID_mercator::latin, GRIB_GRID_lambert_conformal::latin1, GRIB_GRID_lambert_conformal::latin2, GRIB_GRID_lambert_conformal::latsp, GRIB_GRID::lc, GRIB_GRID::ll, GRIB_GRID_mercator::lon1, GRIB_GRID_lambert_conformal::lon1, GRIB_GRID_polar_stereographic::lon1, GRIB_GRID_gaussian_latlon::lon1, GRIB_GRID_regular_latlon::lon1, GRIB_GRID_mercator::lon2, GRIB_GRID_gaussian_latlon::lon2, GRIB_GRID_regular_latlon::lon2, GRIB_GRID_lambert_conformal::lonsp, GRIB_GRID_spaceview::lop, GRIB_GRID_lambert_conformal::lov, GRIB_GRID_polar_stereographic::lov, GRIB_GRID_spherical_harmonic::M, GRIB_GRID::mc, GRIB_GRID_gaussian_latlon::N, GRIB_GRID_spaceview::Nr, GRIB_GRID::nx, GRIB_GRID::nxny, GRIB_GRID::ny, GRIB_GRID_spaceview::orient, GRIB_GRID_lambert_conformal::pole, GRIB_GRID_polar_stereographic::pole, GRIB_GRID::ps, GRIB_GRID_spherical_harmonic::representation, GRIB_GRID::sa, GRIB_GRID::sp, GRIB_GRID_spherical_harmonic::storage_method, GRIB_GRID::type, GRIB_GRID_spaceview::Xp, and GRIB_GRID_spaceview::Yp.

void GRIB_MESSAGE::set_level GRIB_LEVEL   level
 

Set vertical level of grid.

Parameters:
level:  level to be encoded

Definition at line 1928 of file GRIB.cpp.

References level, GRIB_LEVEL::lv1, GRIB_LEVEL::lv2, and GRIB_LEVEL::type.

void GRIB_MESSAGE::set_time GRIB_TIME   gtime
 

Set time.

Parameters:
gtime:  time to be encoded

Definition at line 1909 of file GRIB.cpp.

References GRIB_TIME::day, gtime, GRIB_TIME::hour, GRIB_TIME::minute, GRIB_TIME::month, GRIB_TIME::naveraged, GRIB_TIME::nmissing, GRIB_TIME::p1, GRIB_TIME::p1p2, GRIB_TIME::p2, GRIB_TIME::reftime, GRIB_TIME::timerange, GRIB_TIME::timestring, GRIB_TIME::timeunit, and GRIB_TIME::year.


Member Data Documentation

GRIB_FIELD GRIB_MESSAGE::field
 

The field (local storage. Filled on set and on ReadMessage).

Definition at line 1076 of file GRIB.h.

Referenced by Decode(), Encode(), and set_field().

GRIB_GRID GRIB_MESSAGE::grid
 

The grid (local storage. Filled on set and on ReadMessage).

Definition at line 1070 of file GRIB.h.

Referenced by Decode(), Encode(), and set_grid().

GRIB_TIME GRIB_MESSAGE::gtime
 

The time (local storage. Filled on set and on ReadMessage).

Definition at line 1074 of file GRIB.h.

Referenced by Decode(), Encode(), and set_time().

GRIB_LEVEL GRIB_MESSAGE::level
 

The level (local storage. Filled on set and on ReadMessage).

Definition at line 1072 of file GRIB.h.

Referenced by Decode(), Encode(), and set_level().

unsigned char* GRIB_MESSAGE::message
 

Encoded message.

Definition at line 1067 of file GRIB.h.

Referenced by Decode(), Encode(), GRIB_MESSAGE(), GRIB_FILE::WriteMessage(), and ~GRIB_MESSAGE().

size_t GRIB_MESSAGE::reclen
 

Overall message record lenght.

Definition at line 1064 of file GRIB.h.

Referenced by Decode(), Encode(), GRIB_MESSAGE(), and GRIB_FILE::WriteMessage().


The documentation for this class was generated from the following files:
Generated on Fri Sep 10 09:52:08 2004 for GRIBLIB by doxygen1.2.18