g2_unpack3.c(3)
π NAME π
bestie, this is the page for g2_unpack3.c(3) β and what it does is Unpack Section 3 (Grid Definition Section) of a GRIB2 message. that's it, that's the whole job. it's giving "open the box, hand you the grid" energy π
β¨ SYNOPSIS β¨
#include 'grib2_int.h'
#include <stdio.h>
#include <stdlib.h>
π Functions π
g2int g2_unpack3 (unsigned char *cgrib, g2int *iofst, g2int **igds, g2int **igdstmpl, g2int *mapgridlen, g2int **ideflist, g2int *idefnum)β Unpack Section 3 (Grid Definition Section) of a GRIB2 message.
π« Detailed Description π«
Unpack Section 3 (Grid Definition Section) of a GRIB2 message. no notes, no drama, just the mission statement fr fr π«Ά
π¦ Author π¦
Stephen Gilbert
π¦ Date π¦
2002-10-31
π¦ Definition in file π¦
g2_unpack3.c.
π₯ Function Documentation π₯
π g2int g2_unpack3 (unsigned char * cgrib, g2int * iofst, g2int ** igds, g2int ** igdstmpl, g2int * mapgridlen, g2int ** ideflist, g2int * idefnum)
Unpack Section 3 (Grid Definition Section) of a GRIB2 message. yep, same sentence, it's that kind of documentation and we respect it π
π Program History Log π
- Date
2002-10-31β ProgrammerGilbertβ Comments:Initial - Date
2009-01-14β ProgrammerVuongβ Comments:Changed structure name template to gtemplate
(the original table ran all those cells together, so here they are, un-smooshed for your reading pleasure π)
π§ Parameters π§
cgribβ Char array containing Section 3 of the GRIB2 message.iofstβ Pointer tog2intwhich contains the bit offset for the beginning of Section 3 incgrib.igdsβ Pointer to a pointer which will get a pointer to memory allocated for the GDS array, of length 5. That array holds info read from the appropriate GRIB Grid Definition Section 3 for the field being returned. and inside it:igds[0]β Source of grid definition (see Table 3.0).igds[1]β Number of grid points in the defined grid.igds[2]β Number of octets needed for each additional grid points definition. Used to define number of points in each row (or column) for non-regular grids.= 0, if using regular grid.igds[3]β Interpretation of list for optional points definition. (See Table 3.11)igds[4]β Grid Definition Template Number (see Table 3.1).
igdstmplβ Pointer a pointer tog2int, which will get a pointer to an allocated array containing the data values from the Grid Definition Template specified byigds[4].mapgridlenβ A pointer that gets the number of elements inigdstmpl. i.e. number of entries in Grid Definition Template specified byigds[4].ideflistβ (Used ifigds[2] .ne. 0) Pointer to integer array containing the number of grid points contained in each row (or column).idefnumβ (Used ifigds[2] != 0.) A pointer that gets the number of entries in arrayideflistβ i.e. number of rows (or columns) for which optional grid points are defined.
π Returns π
G2_NO_ERRORβ No error. slay, we love a clean exit πG2_UNPACK_BAD_SECβ Array passed had incorrect section number.G2_UNPACK3_BAD_GDTβ message contains an undefined Grid Definition Template.G2_UNPACK_NO_MEMβ Memory allocation error.
heads up bestie: those last three are not a vibe. check your section number, check your template, and maybe malloc a little harder. π
π¦ Author π¦
Stephen Gilbert
π¦ Date π¦
2002-10-31
π¦ Definition at line 62 of file π¦
g2_unpack3.c.
π References π
gtemplate::ext, extgridtemplate(), gtemplate::extlen, G2_NO_ERROR, G2_UNPACK3_BAD_GDT, G2_UNPACK_BAD_SEC, G2_UNPACK_NO_MEM, gbit(), gbits(), getgridtemplate(), gtemplate::map, gtemplate::maplen, and gtemplate::needext.
π Referenced by π
g2_getfld(), getdim(), and getpoly().
πΈ Author πΈ
Generated automatically by Doxygen for NCEPLIBS-g2c from the source code.
and that's the whole page, no cap β¨ this beauty came to you courtesy of NCEPLIBS-g2c, Version 2.3.0 β main character library energy, periodt π π¦π
π¦ where this page comes from
- ubuntu resolute: libg2c-dev 2.3.0-4 Β· LGPL-3.0-only
- ubuntu stonking: libg2c-dev 2.3.0-7 Β· LGPL-3.0-only
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms