.TH "compack.c" 3 "Tue May 3 2022" "Version 1.6.4" "NCEPLIBS-g2c" \" -*- nroff -*- .ad l .nh .SH NAME compack.c \- Pack up a data field 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 "void \fBcompack\fP (\fBg2float\fP *fld, \fBg2int\fP ndpts, \fBg2int\fP idrsnum, \fBg2int\fP *idrstmpl, unsigned char *cpack, \fBg2int\fP *lcpack)" .br .RI "This subroutine packs up a data field using a complex packing algorithm as defined in the GRIB2 documention\&. " .in -1c .SH "Detailed Description" .PP Pack up a data field 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-11-07 .RE .PP .PP Definition in file \fBcompack\&.c\fP\&. .SH "Function Documentation" .PP .SS "void compack (\fBg2float\fP * fld, \fBg2int\fP ndpts, \fBg2int\fP idrsnum, \fBg2int\fP * idrstmpl, unsigned char * cpack, \fBg2int\fP * lcpack)" .PP This subroutine packs up a data field using a complex packing algorithm as defined in the GRIB2 documention\&. It supports GRIB2 complex packing templates with or without spatial differences (i\&.e\&. DRTs 5\&.2 and 5\&.3)\&. It also fills in GRIB2 Data Representation Template 5\&.2 or 5\&.3 with the appropriate values\&. .PP \fBParameters\fP .RS 4 \fIfld\fP Contains the data values to pack .br \fIndpts\fP The number of data values in array fld .br \fIidrsnum\fP Data Representation Template number 5\&.N Must equal 2 or 3\&. .br \fIidrstmpl\fP Contains the array of values for Data Representation Template 5\&.2 or 5\&.3\&. .RE .PP .IP "\(bu" 2 0 Reference value - ignored on input, set my \fBcompack()\fP\&. .IP "\(bu" 2 1 Binary Scale Factor .IP "\(bu" 2 2 Decimal Scale Factor .IP "\(bu" 2 6 Missing value management .IP "\(bu" 2 7 Primary missing value .IP "\(bu" 2 8 Secondary missing value .IP "\(bu" 2 16 Order of Spatial Differencing ( 1 or 2 ) .PP \fBParameters\fP .RS 4 \fIcpack\fP The packed data field .br \fIlcpack\fP length of packed field cpack\&. .RE .PP \fBAuthor\fP .RS 4 Stephen Gilbert .RE .PP \fBDate\fP .RS 4 2002-11-07 .RE .PP .PP .PP Definition at line 39 of file compack\&.c\&. .PP References int_power(), mkieee(), pack_gp(), sbit(), and sbits()\&. .PP Referenced by cmplxpack()\&. .SH "Author" .PP Generated automatically by Doxygen for NCEPLIBS-g2c from the source code\&.