.TH "getpoly.c" 3 "Tue May 3 2022" "Version 1.6.4" "NCEPLIBS-g2c" \" -*- nroff -*- .ad l .nh .SH NAME getpoly.c \- Return the J, K, and M pentagonal resolution parameters specified in a GRIB Grid Definition Section used spherical harmonic coefficients using GDT 5\&.50 through 5\&.53\&. .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 *, \fBg2int\fP *, \fBg2int\fP **, \fBg2int\fP **, \fBg2int\fP *, \fBg2int\fP **, \fBg2int\fP *)" .br .RI "This routine unpacks Section 3 (Grid Definition Section) as defined in GRIB Edition 2\&. " .ti -1c .RI "\fBg2int\fP \fBgetpoly\fP (unsigned char *csec3, \fBg2int\fP *jj, \fBg2int\fP *kk, \fBg2int\fP *mm)" .br .RI "This subroutine returns the J, K, and M pentagonal resolution parameters specified in a GRIB Grid Definition Section (GDS) used spherical harmonic coefficients using GDT 5\&.50 through 5\&.53\&. " .in -1c .SH "Detailed Description" .PP Return the J, K, and M pentagonal resolution parameters specified in a GRIB Grid Definition Section used spherical harmonic coefficients using GDT 5\&.50 through 5\&.53\&. .PP \fBAuthor\fP .RS 4 Stephen Gilbert .RE .PP \fBDate\fP .RS 4 2002-12-11 .RE .PP .PP Definition in file \fBgetpoly\&.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 Referenced by getpoly()\&. .SS "\fBg2int\fP getpoly (unsigned char * csec3, \fBg2int\fP * jj, \fBg2int\fP * kk, \fBg2int\fP * mm)" .PP This subroutine returns the J, K, and M pentagonal resolution parameters specified in a GRIB Grid Definition Section (GDS) used spherical harmonic coefficients using GDT 5\&.50 through 5\&.53\&. .PP \fBParameters\fP .RS 4 \fIcsec3\fP Character array that contains the packed GRIB2 GDS\&. .br \fIjj\fP J - pentagonal resolution parameter\&. .br \fIkk\fP K - pentagonal resolution parameter\&. .br \fImm\fP M - pentagonal resolution parameter\&. .RE .PP \fBReturns\fP .RS 4 0 for success, error code otherwise\&. .RE .PP \fBNote\fP .RS 4 Returns jj, kk, and mm set to zero, if grid template not recognized\&. .RE .PP \fBAuthor\fP .RS 4 Stephen Gilbert .RE .PP \fBDate\fP .RS 4 2002-12-11 .RE .PP .PP Definition at line 32 of file getpoly\&.c\&. .PP References g2_unpack3()\&. .PP Referenced by g2_addfield()\&. .SH "Author" .PP Generated automatically by Doxygen for NCEPLIBS-g2c from the source code\&.