Scroll to navigation

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

NAME

g2_unpack2.c - Unpack Section 2 (Local Use Section) as defined in GRIB Edition 2.

SYNOPSIS

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

Functions


g2int g2_unpack2 (unsigned char *cgrib, g2int *iofst, g2int *lencsec2, unsigned char **csec2)
This subroutine unpacks Section 2 (Local Use Section) as defined in GRIB Edition 2.

Detailed Description

Unpack Section 2 (Local Use Section) as defined in GRIB Edition 2.

Author

Stephen Gilbert

Date

2002-10-31

Definition in file g2_unpack2.c.

Function Documentation

g2int g2_unpack2 (unsigned char * cgrib, g2int * iofst, g2int * lencsec2, unsigned char ** csec2)

This subroutine unpacks Section 2 (Local Use Section) as defined in GRIB Edition 2. PROGRAM HISTORY LOG:

  • 2002-10-31 Gilbert
  • 2008-12-23 Wesley - Initialize lencsec2 Length of Local Use data
  • 2010-08-05 Vuong - If section 2 has zero length, ierr=0

Parameters

cgrib char array containing Section 2 of the GRIB2 message.
iofst Bit offset for the beginning of Section 2 in cgrib. The modified version will be returned.
lencsec2 Length (in octets) of Local Use data.
csec2 Pointer to a char array containing local use data.

Returns

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

Author

Stephen Gilbert

Date

2002-10-31

Definition at line 34 of file g2_unpack2.c.

References gbit().

Referenced by g2_getfld().

Author

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

Fri Jun 3 2022 Version 1.6.4