g2_unpack1.c3
Unpack section 1 (identification section) of a grib2 message.
Usage
#include 'grib2_int.h'
#include <stdio.h>
#include <stdlib.h>
Functions
g2int g2_unpack1 (unsigned char *cgrib, g2int *iofst, g2int **ids, g2int *idslen)
Unpacks Section 1 - Identification Section of a GRIB2 message.
Detailed Description
Unpack Section 1 (Identification Section) of a GRIB2 message.
Author
Stephen Gilbert
Date
2002-10-29
Definition in file g2_unpack1.c.
Function Documentation
g2int g2_unpack1 (unsigned char * cgrib, g2int * iofst, g2int ** ids, g2int * idslen)
Unpacks Section 1 - Identification Section of a GRIB2 message.
Parameters
cgrib char array containing Section 1 of the GRIB2 message.
iofst Bit offset for the beginning of Section 1 in cgrib.
ids Pointer that gets an array which contians the information read from Section 1, the Identification section. This array is allocated by this function, and must be freed by caller (using g2_free()).
•
|
ids[0] Identification of originating Centre (see |
|---|---|
•
|
ids[1] Identification of originating Sub-centre (see |
•
|
ids[2] GRIB Master Tables Version Number (see |
•
|
ids[3] GRIB Local Tables Version Number (see |
•
|
ids[4] Significance of Reference Time (see |
•
|
ids[5] Year (4 digits) |
•
|
ids[6] Month |
•
|
ids[7] Day |
•
|
ids[8] Hour |
•
|
ids[9] Minute |
•
|
ids[10] Second |
•
|
ids[11] Production status of processed data (see |
•
|
ids[12] Type of processed data (see |
idslen Number of elements in ids.
Returns
•
|
|
|---|---|
•
|
|
•
|
|
Author
Stephen Gilbert
Date
2002-10-29
Definition at line 55 of file g2_unpack1.c.
References G2_NO_ERROR, G2_UNPACK_BAD_SEC, G2_UNPACK_NO_MEM, and gbit().
Referenced by g2_getfld().