.TH "cmplxpack.c" 3 "Tue May 3 2022" "Version 1.6.4" "NCEPLIBS-g2c" \" -*- nroff -*- .ad l .nh .SH NAME cmplxpack.c \- Pack up a data field using a complex packing algorithm as defined in the GRIB2 documention\&. .SH SYNOPSIS .br .PP \fC#include 'grib2\&.h'\fP .br .SS "Functions" .in +1c .ti -1c .RI "void \fBcmplxpack\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 2004-08-27 .RE .PP .PP Definition in file \fBcmplxpack\&.c\fP\&. .SH "Function Documentation" .PP .SS "void cmplxpack (\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 .IP "\(bu" 2 0 Reference value - ignored on input, set by compack routine\&. .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 .br \fIcpack\fP The packed data field (character*1 array) .br \fIlcpack\fP length of packed field cpack\&. .RE .PP \fBAuthor\fP .RS 4 Stephen Gilbert .RE .PP \fBDate\fP .RS 4 2004-08-27 .RE .PP .PP Definition at line 33 of file cmplxpack\&.c\&. .PP References compack(), and misspack()\&. .PP Referenced by g2_addfield()\&. .SH "Author" .PP Generated automatically by Doxygen for NCEPLIBS-g2c from the source code\&.