g2_gribend.c(3)

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

πŸ’– g2_gribend.c(3) πŸ’–

okay bestie, so this is a page from the Library Functions Manual, and today's main character is g2_gribend.c β€” the little routine that puts the final bow πŸŽ€ on your GRIB2 message. Let's get into it.


✨ NAME ✨

g2_gribend.c β€” Finalize a GRIB2 message after all grids and fields have been added.


🌸 SYNOPSIS 🌸

#include 'grib2_int.h'
#include <stdio.h>

πŸ¦‹ Functions

  • g2int g2_gribend (unsigned char *cgrib) β€” Finalize a GRIB2 message after all grids and fields have been added.

πŸ’œ Detailed Description πŸ’œ

Finalize a GRIB2 message after all grids and fields have been added.

Author Stephen Gilbert

Date 2002-10-31

Definition in file g2_gribend.c.


πŸ‘‘ Function Documentation πŸ‘‘

⭐ g2int g2_gribend (unsigned char * cgrib)

Finalize a GRIB2 message after all grids and fields have been added. This function adds the End Section ("7777") to the end of the GRIB message and calculates the length and stores it in the appropriate place in Section 0. This routine is used with routines g2_create(), g2_addlocal(), g2_addgrid(), and g2_addfield() to create a complete GRIB2 message.

πŸ“ Parameters

  • cgrib β€” Char array containing all the data sections added be previous calls to g2_create(), g2_addlocal(), g2_addgrid(), and g2_addfield(). After function is called, contains the finalized GRIB2 message.
ngl "added be previous calls" is literally what it says, so I'm keeping it exactly as-is. iykyk πŸ’…

🌈 Returns

  • > 0 β€” Length of the final GRIB2 message in bytes.
  • G2_GRIBEND_MSG_INIT β€” GRIB message was not initialized - call g2_create() first.
  • G2_BAD_SEC_COUNTS β€” Sum of Section byte counts doesn't add to total byte count.
  • G2_BAD_SEC β€” Previous Section was not 7.

🫢 Note

This routine is intended for use with routines g2_create(), g2_addlocal(), g2_addgrid(), and g2_addfield() to create a complete GRIB2 message.

Author Stephen Gilbert

Date 2002-10-31

Definition at line 40 of file g2_gribend.c.

References G2_ADD_MSG_COMPLETE, G2_ADD_MSG_INIT, G2_BAD_SEC, G2_BAD_SEC_COUNTS, g2c_check_msg(), G2C_EMSGCOMPLETE, G2C_ENOTGRIB, gbit(), and sbit().


πŸ’– Author πŸ’–

Generated automatically by Doxygen for NCEPLIBS-g2c from the source code.


and that's the whole vibe, bestie β€” this page lives in NCEPLIBS-g2c, version 2.3.0, and yes the footer said g2_gribend.c(3) again because it's iconic like that. slay, go finalize some GRIB2 messages πŸ’…βœ¨

πŸ“¦ where this page comes from