table of contents
g2_gribend.c(3) | NCEPLIBS-g2c | g2_gribend.c(3) |
NAME¶
g2_gribend.c - Finalize a GRIB2 message after all grids and fields have been added.
SYNOPSIS¶
#include <stdio.h>
#include 'grib2.h'
Functions¶
g2int g2_gribend (unsigned char *cgrib)
This routine finalizes 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
Date
Definition in file g2_gribend.c.
Function Documentation¶
g2int g2_gribend (unsigned char * cgrib)¶
This routine finalizes a GRIB2 message after all grids and fields have been added. It 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. g2_create() must be called first to initialize a new GRIB2 message.
Parameters
Returns
- > 0 = Length of the final GRIB2 message in bytes.
- -1 = GRIB message was not initialized. Need to call routine g2_create first.
- -2 = GRIB message already complete.
- -3 = Sum of Section byte counts doesn't add to total byte count
- -4 = Previous Section was not 7.
Note
Author
Date
Definition at line 36 of file g2_gribend.c.
References gbit(), and sbit().
Author¶
Generated automatically by Doxygen for NCEPLIBS-g2c from the source code.
Tue May 3 2022 | Version 1.6.4 |