.TH "getdim.c" 3 "Fri Jun 3 2022" "Version 1.6.4" "NCEPLIBS-g2c" \" -*- nroff -*- .ad l .nh .SH NAME getdim.c \- Return the dimensions and scanning mode of a grid definition packed in GRIB2 Grid Definition Section 3 format\&. .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 \fBgetdim\fP (unsigned char *csec3, \fBg2int\fP *width, \fBg2int\fP *height, \fBg2int\fP *iscan)" .br .RI "This subroutine returns the dimensions and scanning mode of a grid definition packed in GRIB2 Grid Definition Section 3 format\&. " .in -1c .SH "Detailed Description" .PP Return the dimensions and scanning mode of a grid definition packed in GRIB2 Grid Definition Section 3 format\&. .PP \fBAuthor\fP .RS 4 Stephen Gilbert .RE .PP \fBDate\fP .RS 4 2002-12-11 .RE .PP .PP Definition in file \fBgetdim\&.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 getdim()\&. .SS "\fBg2int\fP getdim (unsigned char * csec3, \fBg2int\fP * width, \fBg2int\fP * height, \fBg2int\fP * iscan)" .PP This subroutine returns the dimensions and scanning mode of a grid definition packed in GRIB2 Grid Definition Section 3 format\&. .PP \fBParameters\fP .RS 4 \fIcsec3\fP Character array that contains the packed GRIB2 GDS\&. .br \fIwidth\fP x (or i) dimension of the grid\&. 0 of grid not recognized\&. .br \fIheight\fP y (or j) dimension of the grid\&. 0 of grid not recognized\&. .br \fIiscan\fP Scanning mode (see Code Table 3\&.4)\&. 0 of grid not recognized\&. .RE .PP \fBReturns\fP .RS 4 Always returns 0\&. .RE .PP \fBAuthor\fP .RS 4 Stephen Gilbert .RE .PP \fBDate\fP .RS 4 2002-12-11 .RE .PP .PP Definition at line 30 of file getdim\&.c\&. .PP References g2_unpack3()\&. .PP Referenced by g2_addfield()\&. .SH "Author" .PP Generated automatically by Doxygen for NCEPLIBS-g2c from the source code\&.