43 gbit(cgrib, &isecnum, *iofst, 8);
48 fprintf(stderr,
"g2_unpack6: Not Section 6 data.\n");
52 gbit(cgrib, ibmap, *iofst, 8);
58 lbmap = calloc(ngpts,
sizeof(
g2int));
63 intbmap = calloc(ngpts,
sizeof(
g2int));
64 gbits(cgrib, intbmap, *iofst, 1, 0, ngpts);
65 *iofst = *iofst + ngpts;
66 for (j = 0; j < ngpts; j++)
67 lbmap[j] = (
g2int)intbmap[j];
g2int g2_unpack6(unsigned char *cgrib, g2int *iofst, g2int ngpts, g2int *ibmap, g2int **bmap)
This subroutine unpacks Section 6 (Bit-Map Section) as defined in GRIB Edition 2.
void gbit(unsigned char *in, g2int *iout, g2int iskip, g2int nbits)
Get bits - unpack bits: Extract arbitrary size values from a packed bit string, right justifying each...
void gbits(unsigned char *in, g2int *iout, g2int iskip, g2int nbits, g2int nskip, g2int n)
Get bits - unpack bits: Extract arbitrary size values from a packed bit string, right justifying each...
#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.