NCEPLIBS-g2c 1.9.0
Loading...
Searching...
No Matches
g2_unpack5.c File Reference

Unpack Section 5 (Data Representation Section) of a GRIB2 message. More...

#include <stdio.h>
#include <stdlib.h>
#include "grib2_int.h"

Go to the source code of this file.

Functions

g2int g2_unpack5 (unsigned char *cgrib, g2int *iofst, g2int *ndpts, g2int *idrsnum, g2int **idrstmpl, g2int *mapdrslen)
 Unpack Section 5 (Data Representation Section) of a GRIB2 message.
 

Detailed Description

Unpack Section 5 (Data Representation Section) of a GRIB2 message.

Author
Stephen Gilbert
Date
2002-10-31

Definition in file g2_unpack5.c.

Function Documentation

◆ g2_unpack5()

g2int g2_unpack5 ( unsigned char *  cgrib,
g2int iofst,
g2int ndpts,
g2int idrsnum,
g2int **  idrstmpl,
g2int mapdrslen 
)

Unpack Section 5 (Data Representation Section) of a GRIB2 message.

Program History Log

Date Programmer Comments
2002-10-31 Gilbert Initial
2009-01-14 Vuong Changed structure name template to gtemplate
Parameters
cgribchar array containing Section 5 of the GRIB2 message.
iofstBit offset for the beginning of Section 5 in cgrib. Returned with bit offset at the end of Section 5.
ndptsNumber of data points unpacked and returned.
idrsnumData Representation Template Number (see Code Table 5.0).
idrstmplPointer to an integer array containing the data values for the specified Data Representation Template (N=idrsnum). Each element of this integer array contains an entry (in the order specified) of Data Representation Template 5.N.
mapdrslen-Number of elements in idrstmpl. i.e. number of entries in Data Representation Template 5.N (N=idrsnum).
Returns
Author
Stephen Gilbert
Date
2002-10-31

Definition at line 40 of file g2_unpack5.c.

References gtemplate::ext, extdrstemplate(), gtemplate::extlen, G2_NO_ERROR, G2_UNPACK5_BAD_DRT, G2_UNPACK_BAD_SEC, G2_UNPACK_NO_MEM, gbit(), getdrstemplate(), gtemplate::map, gtemplate::maplen, and gtemplate::needext.

Referenced by g2_getfld().