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

# getpoly.c(3)

Return the J, K, and M pentagonal resolution parameters specified in a GRIB Grid Definition Section used spherical harmonic coefficients using GDT 5.50 through 5.53.

## NAME

getpoly.c - Return the J, K, and M pentagonal resolution parameters specified in a GRIB Grid Definition Section used spherical harmonic coefficients using GDT 5.50 through 5.53.

## SYNOPSIS

`#include 'grib2_int.h'`\
 `#include <stdio.h>`\
 `#include <stdlib.h>`\

### Functions

**g2int** **getpoly** (unsigned char \*csec3, **g2int** \*jj, **g2int** \*kk, **g2int** \*mm)\
 This subroutine returns the J, K, and M pentagonal resolution parameters specified in a GRIB Grid Definition Section (GDS) used spherical harmonic coefficients using GDT 5.50 through 5.53.

## Detailed Description

Return the J, K, and M pentagonal resolution parameters specified in a GRIB Grid Definition Section used spherical harmonic coefficients using GDT 5.50 through 5.53.

**Author**

Stephen Gilbert

**Date**

2002-12-11

Definition in file **getpoly.c**.

## Function Documentation

### g2int getpoly (unsigned char \* csec3, g2int \* jj, g2int \* kk, g2int \* mm)

This subroutine returns the J, K, and M pentagonal resolution parameters specified in a GRIB Grid Definition Section (GDS) used spherical harmonic coefficients using GDT 5.50 through 5.53. If 51 - complex data spectral packing is used as the data representation template number (see `Table 5.0`), then the Grid Definition Template Number in section 3 should be one of:

- •

  50: Spherical Harmonic Coefficients (See Template 3.50)

- •

  51: Rotated Spherical Harmonic Coefficients (See Template 3.51)

- •

  52: Stretched Spherical Harmonic Coefficients (See Template 3.52)

- •

  53: Rotated and Stretched Spherical Harmonic Coefficients (See Template 3.53)

**Parameters**

*csec3* Character array that contains the packed GRIB2 GDS. \
 *jj* J pentagonal resolution parameter. \
 *kk* K pentagonal resolution parameter. \
 *mm* M pentagonal resolution parameter.

**Returns**

always returns 0.

**Note**

Returns jj, kk, and mm set to zero, if grid template not recognized.

**Author**

Stephen Gilbert

**Date**

2002-12-11

Definition at line **40** of file **getpoly.c**.

References **g2\_unpack3()**.

Referenced by **g2\_addfield()**.

## Author

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