.TH "g2_unpack4.c" 3 "Tue May 3 2022" "Version 1.6.4" "NCEPLIBS-g2c" \" -*- nroff -*- .ad l .nh .SH NAME g2_unpack4.c \- Unpack Section 4 (Product Definition Section) as defined in GRIB Edition 2\&. .SH SYNOPSIS .br .PP \fC#include \fP .br \fC#include \fP .br \fC#include 'grib2\&.h'\fP .br .SS "Functions" .in +1c .ti -1c .RI "\fBg2int\fP \fBg2_unpack4\fP (unsigned char *cgrib, \fBg2int\fP *iofst, \fBg2int\fP *ipdsnum, \fBg2int\fP **ipdstmpl, \fBg2int\fP *mappdslen, \fBg2float\fP **coordlist, \fBg2int\fP *numcoord)" .br .RI "This subroutine unpacks Section 4 (Product Definition Section) as defined in GRIB Edition 2\&. " .in -1c .SH "Detailed Description" .PP Unpack Section 4 (Product Definition Section) as defined in GRIB Edition 2\&. .PP \fBAuthor\fP .RS 4 Stephen Gilbert .RE .PP \fBDate\fP .RS 4 2002-10-31 .RE .PP .PP Definition in file \fBg2_unpack4\&.c\fP\&. .SH "Function Documentation" .PP .SS "\fBg2int\fP g2_unpack4 (unsigned char * cgrib, \fBg2int\fP * iofst, \fBg2int\fP * ipdsnum, \fBg2int\fP ** ipdstmpl, \fBg2int\fP * mappdslen, \fBg2float\fP ** coordlist, \fBg2int\fP * numcoord)" .PP This subroutine unpacks Section 4 (Product Definition Section) as defined in GRIB Edition 2\&. PROGRAM HISTORY LOG: .IP "\(bu" 2 2002-10-31 Gilbert .IP "\(bu" 2 2009-01-14 Vuong Changed structure name template to gtemplate .PP .PP \fBParameters\fP .RS 4 \fIcgrib\fP Char array containing Section 4 of the GRIB2 message\&. .br \fIiofst\fP Bit offset of the beginning of Section 4 in cgrib\&. Returned with updated bit offset\&. .br \fIipdsnum\fP Product Definition Template Number (see Code Table 4\&.0)\&. .br \fIipdstmpl\fP Pointer to integer array containing the data values for the specified Product Definition Template (N=ipdsnum)\&. Each element of this integer array contains an entry (in the order specified) of Product Defintion Template 4\&.N\&. .br \fImappdslen\fP Number of elements in ipdstmpl\&. i\&.e\&. number of entries in Product Defintion Template 4\&.N (N=ipdsnum)\&. .br \fIcoordlist\fP Pointer to real array containing floating point values intended to document the vertical discretisation associated to model data on hybrid coordinate vertical levels\&. (part of Section 4)\&. .br \fInumcoord\fP number of values in array coordlist\&. .RE .PP \fBReturns\fP .RS 4 .IP "\(bu" 2 0 no error .IP "\(bu" 2 2 Not section 4 .IP "\(bu" 2 5 'GRIB' message contains an undefined Product Definition Template\&. .IP "\(bu" 2 6 memory allocation error .PP .RE .PP \fBAuthor\fP .RS 4 Stephen Gilbert .RE .PP \fBDate\fP .RS 4 2002-10-31 .RE .PP .PP Definition at line 42 of file g2_unpack4\&.c\&. .PP References gtemplate::ext, gtemplate::extlen, extpdstemplate(), gbit(), gbits(), getpdstemplate(), gtemplate::map, gtemplate::maplen, gtemplate::needext, and rdieee()\&. .PP Referenced by g2_getfld()\&. .SH "Author" .PP Generated automatically by Doxygen for NCEPLIBS-g2c from the source code\&.