NCEPLIBS-g2c  1.7.0
simunpack.c File Reference
#include <stdio.h>
#include <stdlib.h>
#include "grib2_int.h"

Go to the source code of this file.

Functions

g2int simunpack (unsigned char *cpack, g2int *idrstmpl, g2int ndpts, float *fld)
 This subroutine unpacks a data field that was packed using a simple packing algorithm as defined in the GRIB2 documention, using info from the GRIB2 Data Representation Template 5.0. More...
 

Detailed Description

Author
Stephen Gilbert
Date
2002-10-29

Definition in file simunpack.c.

Function Documentation

◆ simunpack()

g2int simunpack ( unsigned char *  cpack,
g2int idrstmpl,
g2int  ndpts,
float *  fld 
)

This subroutine unpacks a data field that was packed using a simple packing algorithm as defined in the GRIB2 documention, using info from the GRIB2 Data Representation Template 5.0.

Parameters
cpackpointer to the packed data field.
idrstmplpointer to the array of values for Data Representation Template 5.0.
ndptsThe number of data values to unpack.
fldContains the unpacked data values. fld must be `* allocated with at least ndpts * sizeof(float) bytes before calling this routine.
Returns
0 for success, error code otherwise.
Author
Stephen Gilbert
Date
2002-10-29

Definition at line 26 of file simunpack.c.

References G2_JPCUNPACK_MEM, G2_NO_ERROR, gbits(), int_power(), and rdieee().

Referenced by g2_unpack7().