.TH "simpack.c" 3 "Tue May 3 2022" "Version 1.6.4" "NCEPLIBS-g2c" \" -*- nroff -*- .ad l .nh .SH NAME simpack.c \- Pack up a data field using the simple packing algorithm\&. .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 \fBsimpack\fP (\fBg2float\fP *fld, \fBg2int\fP ndpts, \fBg2int\fP *idrstmpl, unsigned char *cpack, \fBg2int\fP *lcpack)" .br .RI "This subroutine packs up a data field using the simple packing algorithm as defined in the GRIB2 documention\&. " .in -1c .SH "Detailed Description" .PP Pack up a data field using the simple packing algorithm\&. .PP \fBAuthor\fP .RS 4 Stephen Gilbert .RE .PP \fBDate\fP .RS 4 2002-11-06 .RE .PP .PP Definition in file \fBsimpack\&.c\fP\&. .SH "Function Documentation" .PP .SS "void simpack (\fBg2float\fP * fld, \fBg2int\fP ndpts, \fBg2int\fP * idrstmpl, unsigned char * cpack, \fBg2int\fP * lcpack)" .PP This subroutine packs up a data field using the simple packing algorithm as defined in the GRIB2 documention\&. It also fills in GRIB2 Data Representation Template 5\&.0 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 \fIidrstmpl\fP Contains the array of values for Data Representation Template 5\&.0\&. .IP "\(bu" 2 0 Reference value - ignored on input - set by simpack routine\&. .IP "\(bu" 2 1 Binary Scale Factor - unchanged from input\&. .IP "\(bu" 2 2 Decimal Scale Factor - unchanged from input\&. .IP "\(bu" 2 3 Number of bits used to pack data, if value is > 0 and <= 31\&. If this input value is 0 or outside above range then the num of bits is calculated based on given data and scale factors\&. .IP "\(bu" 2 4 Original field type - currently ignored on input\&. Data values assumed to be reals\&. Set to 0 by simpack routine\&. .PP .br \fIcpack\fP The packed data field .br \fIlcpack\fP length of packed field starting at cpack\&. .RE .PP \fBAuthor\fP .RS 4 Stephen Gilbert .RE .PP \fBDate\fP .RS 4 2002-11-06 .RE .PP .PP Definition at line 32 of file simpack\&.c\&. .PP References int_power(), mkieee(), sbit(), and sbits()\&. .PP Referenced by g2_addfield(), and specpack()\&. .SH "Author" .PP Generated automatically by Doxygen for NCEPLIBS-g2c from the source code\&.