.TH "comunpack.c" 3 "Tue May 3 2022" "Version 1.6.4" "NCEPLIBS-g2c" \" -*- nroff -*- .ad l .nh .SH NAME comunpack.c \- Unpack a data field that was packed using a complex packing algorithm as defined in the GRIB2 documention\&. .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 "int \fBcomunpack\fP (unsigned char *cpack, \fBg2int\fP lensec, \fBg2int\fP idrsnum, \fBg2int\fP *idrstmpl, \fBg2int\fP ndpts, \fBg2float\fP *fld)" .br .RI "This subroutine unpacks a data field that was packed using a complex packing algorithm as defined in the GRIB2 documention, using info from the GRIB2 Data Representation Template 5\&.2 or 5\&.3\&. " .in -1c .SH "Detailed Description" .PP Unpack a data field that was packed using a complex packing algorithm as defined in the GRIB2 documention\&. .PP \fBAuthor\fP .RS 4 Stephen Gilbert .RE .PP \fBDate\fP .RS 4 2002-10-29 .RE .PP .PP Definition in file \fBcomunpack\&.c\fP\&. .SH "Function Documentation" .PP .SS "int comunpack (unsigned char * cpack, \fBg2int\fP lensec, \fBg2int\fP idrsnum, \fBg2int\fP * idrstmpl, \fBg2int\fP ndpts, \fBg2float\fP * fld)" .PP This subroutine unpacks a data field that was packed using a complex packing algorithm as defined in the GRIB2 documention, using info from the GRIB2 Data Representation Template 5\&.2 or 5\&.3\&. Supports GRIB2 complex packing templates with or without spatial differences (i\&.e\&. DRTs 5\&.2 and 5\&.3)\&. .PP PROGRAM HISTORY LOG: .IP "\(bu" 2 2002-10-29 Gilbert .IP "\(bu" 2 2004-12-16 Gilbert Added test (provided by Arthur Taylor/MDL) to verify that group widths and lengths are consistent with section length\&. .PP .PP \fBParameters\fP .RS 4 \fIcpack\fP pointer to the packed data field\&. .br \fIlensec\fP length of section 7 (used for error checking)\&. .br \fIidrsnum\fP Data Representation Template number 5\&.N Must equal 2 or 3\&. .br \fIidrstmpl\fP pointer to the array of values for Data Representation Template 5\&.2 or 5\&.3 .br \fIndpts\fP The number of data values to unpack .br \fIfld\fP Contains the unpacked data values\&. fld must be allocated with at least ndpts*sizeof(g2float) bytes before calling this routine\&. .RE .PP \fBReturns\fP .RS 4 0 for success, error code otherwise\&. .RE .PP \fBAuthor\fP .RS 4 Stephen Gilbert .RE .PP \fBDate\fP .RS 4 2002-10-29 .RE .PP .PP Definition at line 39 of file comunpack\&.c\&. .PP References gbit(), gbits(), int_power(), and rdieee()\&. .PP Referenced by g2_unpack7()\&. .SH "Author" .PP Generated automatically by Doxygen for NCEPLIBS-g2c from the source code\&.