g2_create.c(3)

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

🌈 NAME 🌈

okay bestie, welcome to g2_create.c β€” this is page 3 of the Library Functions Manual, and it's literally all about one job: Initialize a new GRIB2 message and pack GRIB2 sections 0 (Indicator Section) and 1 (Identification Section). that's the whole vibe. πŸ’…


✨ SYNOPSIS ✨

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

πŸŽ€ Macros πŸŽ€

  • #define LENSEC0 16 β€” Length of GRIB Section 0.
  • #define MAPSEC1LEN 13 β€” Length of Map Section 1.

🫢 Functions 🫢

  • g2int g2_create (unsigned char *cgrib, g2int *listsec0, g2int *listsec1) β€” Initialize a new GRIB2 message and pack GRIB2 Section 0 (Indicator Section) and Section 1 (Identification Section).

πŸ’… Detailed Description πŸ’…

Initialize a new GRIB2 message and pack GRIB2 sections 0 (Indicator Section) and 1 (Identification Section).

Author

Stephen Gilbert

Date

2002-10-31

Definition in file g2_create.c.


πŸ”₯ Macro Definition Documentation πŸ”₯

#define LENSEC0 16

Length of GRIB Section 0.

Definition at line 11 of file g2_create.c.

Referenced by g2_create().


#define MAPSEC1LEN 13

Length of Map Section 1.

Definition at line 10 of file g2_create.c.

Referenced by g2_create().


πŸ‘‘ Function Documentation πŸ‘‘

g2int g2_create (unsigned char * cgrib, g2int * listsec0, g2int * listsec1)

Initialize a new GRIB2 message and pack GRIB2 Section 0 (Indicator Section) and Section 1 (Identification Section). This routine is used with routines g2_addlocal(), g2_addgrid(), g2_addfield(), and g2_gribend() to create a complete GRIB2 message. g2_create() must be called first to initialize a new GRIB2 message. A call to g2_gribend() is required to complete GRIB2 message after all fields have been added.

Parameters

cgrib Character array to contain the GRIB2 message. Must be allocated large enough to store the entire GRIB2 message. 🌸

listsec0 Contains information needed for GRIB Indicator Section 0. Must be dimensioned >= 2.

listsec1 Contains information needed for GRIB Identification Section 1. Must be dimensioned >= 13.

Returns

  • > 0 Current size of new GRIB2 message ✨
  • G2_CREATE_GRIB_VERSION Tried to use for version other than GRIB Edition 2

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

bestie listen πŸ‘€ β€” you gotta call g2_create() first, and you absolutely cannot skip g2_gribend() at the end. no g2_gribend() = no complete message. that's just the rules. πŸ’€

Author

Stephen Gilbeert

not me noticing the extra e in there πŸ™ˆ that's literally how it's written on the page, so i'm keeping it, no cap.

Date

2002-10-31

Definition at line 68 of file g2_create.c.

References G2_CREATE_GRIB_VERSION, LENSEC0, MAPSEC1LEN, and sbit().


🌟 Author 🌟

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


aaaand that's a wrap, bestie πŸŽ€ this whole page came to you courtesy of NCEPLIBS-g2c, Version 2.3.0, landing in the g2_create.c(3) slot of your manual. go forth and pack those sections, you icon πŸ‘‘πŸ’–

πŸ“¦ where this page comes from