.TH "g2_unpack3.c" 3 "Tue May 3 2022" "Version 1.6.4" "NCEPLIBS-g2c" \" -*- nroff -*- .ad l .nh .SH NAME g2_unpack3.c \- Unpack Section 3 (Grid 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_unpack3\fP (unsigned char *cgrib, \fBg2int\fP *iofst, \fBg2int\fP **igds, \fBg2int\fP **igdstmpl, \fBg2int\fP *mapgridlen, \fBg2int\fP **ideflist, \fBg2int\fP *idefnum)" .br .RI "This routine unpacks Section 3 (Grid Definition Section) as defined in GRIB Edition 2\&. " .in -1c .SH "Detailed Description" .PP Unpack Section 3 (Grid 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_unpack3\&.c\fP\&. .SH "Function Documentation" .PP .SS "\fBg2int\fP g2_unpack3 (unsigned char * cgrib, \fBg2int\fP * iofst, \fBg2int\fP ** igds, \fBg2int\fP ** igdstmpl, \fBg2int\fP * mapgridlen, \fBg2int\fP ** ideflist, \fBg2int\fP * idefnum)" .PP This routine unpacks Section 3 (Grid 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 ontaining Section 3 of the GRIB2 message\&. .br \fIiofst\fP Bit offset for the beginning of Section 3 in cgrib\&. .br \fIigds\fP Contains information read from the appropriate GRIB Grid Definition Section 3 for the field being returned\&. .IP "\(bu" 2 igds[0] Source of grid definition (see Code Table 3\&.0) .IP "\(bu" 2 igds[1] Number of grid points in the defined grid\&. .IP "\(bu" 2 igds[2] Number of octets needed for each additional grid points definition\&. Used to define number of points in each row (or column) for non-regular grids\&. = 0, if using regular grid\&. .IP "\(bu" 2 igds[3] Interpretation of list for optional points definition\&. (Code Table 3\&.11) .IP "\(bu" 2 igds[4] Grid Definition Template Number (Code Table 3\&.1)\&. .PP .br \fIigdstmpl\fP - Pointer to integer array containing the data values for the specified Grid Definition Template (NN=igds[4])\&. Each element of this integer array contains an entry (in the order specified) of Grid Defintion Template 3\&.NN .br \fImapgridlen-\fP Number of elements in igdstmpl[]\&. i\&.e\&. number of entries in Grid Defintion Template 3\&.NN (NN=igds[4])\&. .br \fIideflist\fP (Used if igds[2] \&.ne\&. 0) Pointer to integer array containing the number of grid points contained in each row ( or column )\&. (part of Section 3)\&. .br \fIidefnum\fP (Used if igds[2] \&.ne\&. 0) The number of entries in array ideflist\&. i\&.e\&. number of rows (or columns) for which optional grid points are defined\&. .RE .PP \fBReturns\fP .RS 4 .IP "\(bu" 2 0 no error .IP "\(bu" 2 2 Not Section 3 .IP "\(bu" 2 5 'GRIB' message contains an undefined Grid 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 53 of file g2_unpack3\&.c\&. .PP References gtemplate::ext, extgridtemplate(), gtemplate::extlen, gbit(), gbits(), getgridtemplate(), gtemplate::map, gtemplate::maplen, and gtemplate::needext\&. .PP Referenced by g2_getfld(), getdim(), and getpoly()\&. .SH "Author" .PP Generated automatically by Doxygen for NCEPLIBS-g2c from the source code\&.