58 g2int i, lensec, nbits, ierr, isecnum;
61 g2int mapid[13]={2, 2, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1};
66 gbit(cgrib, &lensec, *iofst, 32);
68 gbit(cgrib, &isecnum, *iofst, 8);
75 fprintf(stderr,
"g2_unpack1: Not Section 1 data.\n");
82 *ids = calloc(*idslen,
sizeof(
g2int));
89 for (i = 0; i < *idslen; i++)
92 gbit(cgrib, *ids + i, *iofst, nbits);
93 *iofst = *iofst + nbits;
g2int g2_unpack1(unsigned char *cgrib, g2int *iofst, g2int **ids, g2int *idslen)
This subroutine unpacks Section 1 - Identification 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...
Header file for NCEPLIBS-g2c library.
int64_t g2int
Long integer type.