36 g2int j, ierr = 0, isecnum;
43 gbit(cgrib, &isecnum, *iofst, 8);
49 fprintf(stderr,
"g2_unpack6: Not Section 6 data.\n");
53 gbit(cgrib, ibmap, *iofst, 8);
59 lbmap = calloc(ngpts,
sizeof(
g2int));
69 intbmap = calloc(ngpts,
sizeof(
g2int));
70 gbits(cgrib, intbmap, *iofst, 1, 0, ngpts);
71 *iofst = *iofst + ngpts;
72 for (j = 0; j < ngpts; j++)
74 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 nbyte)
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 nbyte, g2int nskip, g2int n)
Get bits - unpack bits: Extract arbitrary size values from a packed bit string, right justifying each...
Header file for NCEPLIBS-g2c library.
int64_t g2int
Long integer type.