g2_unpack3.c(3)

πŸ“¦
version 2.3.0 Β· 2 versions
, in ubuntu resolute, ubuntu stonking

πŸŽ€ 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 β€” Programmer Gilbert β€” Comments: Initial
  • Date 2009-01-14 β€” Programmer Vuong β€” 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 to g2int which contains the bit offset for the beginning of Section 3 in cgrib.
  • 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 to g2int, which will get a pointer to an allocated array containing the data values from the Grid Definition Template specified by igds[4].
  • mapgridlen β€” A pointer that gets the number of elements in igdstmpl. i.e. number of entries in Grid Definition Template specified by igds[4].
  • ideflist β€” (Used if igds[2] .ne. 0) Pointer to integer array containing the number of grid points contained in each row (or column).
  • idefnum β€” (Used if igds[2] != 0.) A pointer that gets the number of entries in array ideflist β€” 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