.TH "g2_addlocal.c" 3 "Version 2.2.0" "NCEPLIBS-g2c" \" -*- nroff -*-
.ad l
.nh
.SH NAME
g2_addlocal.c \- Add a Local Use Section (Section 2) to a GRIB2 message\&.  

.SH SYNOPSIS
.br
.PP
\fC#include 'grib2_int\&.h'\fP
.br
\fC#include <stdio\&.h>\fP
.br

.SS "Functions"

.in +1c
.ti -1c
.RI "\fBg2int\fP \fBg2_addlocal\fP (unsigned char *cgrib, unsigned char *csec2, \fBg2int\fP lcsec2)"
.br
.RI "Adds a \fCLocal Use Section (Section 2)\fP to a GRIB2 message\&. "
.in -1c
.SH "Detailed Description"
.PP 
Add a Local Use Section (Section 2) to a GRIB2 message\&. 


.PP
\fBAuthor\fP
.RS 4
Stephen Gilbeert 
.RE
.PP
\fBDate\fP
.RS 4
2002-11-01 
.RE
.PP

.PP
Definition in file \fBg2_addlocal\&.c\fP\&.
.SH "Function Documentation"
.PP 
.SS "\fBg2int\fP g2_addlocal (unsigned char * cgrib, unsigned char * csec2, \fBg2int\fP lcsec2)"

.PP
Adds a \fCLocal Use Section (Section 2)\fP to a GRIB2 message\&. This function is used with routines \fBg2_create()\fP, \fBg2_addgrid()\fP, \fBg2_addfield()\fP, and \fBg2_gribend()\fP to create a complete GRIB2 message\&.
.PP
\fBParameters\fP
.RS 4
\fIcgrib\fP Char array that contains the GRIB2 message to which section 2 should be added\&. Must be allocated large enough to store the entire GRIB2 message\&. 
.br
\fIcsec2\fP Character array containing information to be added in Section 2\&. 
.br
\fIlcsec2\fP Number of bytes of character array csec2 to be added to Section 2\&.
.RE
.PP
\fBReturns\fP
.RS 4
> 0 = Current size of updated GRIB2 message\&.
.RE
.PP
.IP "\(bu" 2
\fBG2_ADD_MSG_INIT\fP GRIB message was not initialized\&. Need to call routine gribcreate first\&.
.IP "\(bu" 2
\fBG2_ADD_MSG_COMPLETE\fP GRIB message already complete\&. Cannot add new section\&.
.IP "\(bu" 2
\fBG2_BAD_SEC_COUNTS\fP Sum of Section byte counts doesn't add to total byte count\&.
.IP "\(bu" 2
\fBG2_BAD_SEC\fP Previous Section was not 1 or 7\&.
.PP
.PP
\fBNote\fP
.RS 4
The Local Use Section (Section 2) can only follow Section 1 or Section 7 in a GRIB2 message\&.
.RE
.PP
\fBAuthor\fP
.RS 4
Stephen Gilbeert 
.RE
.PP
\fBDate\fP
.RS 4
2002-11-01 
.RE
.PP

.PP
Definition at line \fB41\fP of file \fBg2_addlocal\&.c\fP\&.
.PP
References \fBG2_ADD_MSG_COMPLETE\fP, \fBG2_ADD_MSG_INIT\fP, \fBG2_BAD_SEC\fP, \fBG2_BAD_SEC_COUNTS\fP, \fBg2c_check_msg()\fP, \fBG2C_EMSGCOMPLETE\fP, \fBG2C_ENOTGRIB\fP, \fBgbit()\fP, and \fBsbit()\fP\&.
.SH "Author"
.PP 
Generated automatically by Doxygen for NCEPLIBS-g2c from the source code\&.
