Scroll to navigation

g2_unpack1.c(3) NCEPLIBS-g2c g2_unpack1.c(3)

NAME

g2_unpack1.c - Unpack Section 1 (Identification Section) as defined in GRIB Edition 2.

SYNOPSIS

#include <stdio.h>
#include <stdlib.h>
#include 'grib2.h'

Functions


g2int g2_unpack1 (unsigned char *cgrib, g2int *iofst, g2int **ids, g2int *idslen)
This subroutine unpacks Section 1 (Identification Section) as defined in GRIB Edition 2.

Detailed Description

Unpack Section 1 (Identification Section) as defined in GRIB Edition 2.

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)

This subroutine unpacks Section 1 (Identification Section) as defined in GRIB Edition 2.

Parameters

cgrib char array containing Section 1 of the GRIB2 message.
iofst Bit offset for the beginning of Section 1 in cgrib.
ids address of pointer to integer array containing information read from Section 1, the Identification section.
  • ids[0] Identification of originating Centre (see Common Code Table C-1).
  • ids[1] Identification of originating Sub-centre.
  • ids[2] GRIB Master Tables Version Number (see Code Table 1.0).
  • ids[3] GRIB Local Tables Version Number (see Code Table 1.1).
  • ids[4] Significance of Reference Time (Code Table 1.2)
  • 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 Code Table 1.3).
  • ids[12] Type of processed data (see Code Table 1.4).

idslen Number of elements in ids.

Returns

  • 0 no error
  • 2 Array passed is not section 1
  • 6 memory allocation error

Author

Stephen Gilbert

Date

2002-10-29

Definition at line 44 of file g2_unpack1.c.

References gbit().

Referenced by g2_getfld().

Author

Generated automatically by Doxygen for NCEPLIBS-g2c from the source code.

Tue May 3 2022 Version 1.6.4