58 g2int i, lensec, nbits, isecnum;
61 g2int mapid[13] = {2, 2, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1};
65 gbit(cgrib, &lensec, *iofst, 32);
67 gbit(cgrib, &isecnum, *iofst, 8);
73 fprintf(stderr,
"g2_unpack1: Not Section 1 data.\n");
80 if (!(*ids = calloc(*idslen,
sizeof(
g2int))))
83 for (i = 0; i < *idslen; i++)
86 gbit(cgrib, *ids + i, *iofst, nbits);
87 *iofst = *iofst + nbits;
g2int g2_unpack1(unsigned char *cgrib, g2int *iofst, g2int **ids, g2int *idslen)
Unpacks Section 1 - Identification 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 ...