---
name: "g2c_index.c"
section: "3"
platform: "linux"
package: "libg2c-dev"
version: "2.1.0-2"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/g2c_index.c"
---

# g2c\_index.c(3)

Write a GRIB2 index file.

## NAME

g2c\_index.c - Write a GRIB2 index file.

## SYNOPSIS

`#include <ctype.h>`\
 `#include <grib2.h>`\
 `#include <stdio.h>`\
 `#include <stdlib.h>`\
 `#include <unistd.h>`\

### Functions

int **main** (int argc, char \*\*argv)\
 Write a GRIB2 index file.

## Detailed Description

Write a GRIB2 index file.

**Author**

Ed Hartnett

**Date**

12/29/22

Definition in file **g2c\_index.c**.

## Function Documentation

### int main (int argc, char \*\* argv)

Write a GRIB2 index file.

**Parameters**

*argc* Number of arguments. \
 *argv* Pointer to array of arguments.

**Returns**

- •

  0 success

- •

  1 otherwise

**Author**

Ed Hartnett

**Date**

9/10/23

Definition at line **26** of file **g2c\_index.c**.

References **G2C\_CLOBBER**, **g2c\_close()**, **G2C\_ENOMEM**, **G2C\_ERROR**, **G2C\_LARGE\_FILE\_INDEX**, **G2C\_NOWRITE**, **g2c\_open()**, **g2c\_set\_log\_level()**, **G2C\_VERSION**, and **g2c\_write\_index()**.

## Author

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