42 gbit(cgrib, &isecnum, *iofst, 8);
47 fprintf(stderr,
"g2_unpack6: Not Section 6 data.\n");
51 gbit(cgrib, ibmap, *iofst, 8);
57 lbmap = calloc(ngpts,
sizeof(
g2int));
62 intbmap = calloc(ngpts,
sizeof(
g2int));
63 gbits(cgrib, intbmap, *iofst, 1, 0, ngpts);
64 *iofst = *iofst + ngpts;
65 for (j = 0; j < ngpts; j++)
66 lbmap[j] = (
g2int)intbmap[j];
g2int g2_unpack6(unsigned char *cgrib, g2int *iofst, g2int ngpts, g2int *ibmap, g2int **bmap)
Unpack Section 6 (Bit-Map Section) of a GRIB2 message.
void gbit(unsigned char *in, g2int *iout, g2int iskip, g2int nbits)
Get arbitrary size values from a packed bit string, right justifying each value in the unpacked iout ...
void gbits(unsigned char *in, g2int *iout, g2int iskip, g2int nbits, g2int nskip, g2int n)
Unpack arbitrary size values from a packed bit string, right justifying each value in the unpacked io...
#define G2_UNPACK_BAD_SEC
Bad section number in unpacking function.
#define G2_UNPACK_NO_MEM
Error allocating memory in unpack function.
#define G2_NO_ERROR
Function succeeded.
int64_t g2int
Long integer type.
Header file with internal function prototypes NCEPLIBS-g2c library.