Loading...
Searching...
No Matches
getpoly.c File Reference

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. More...

`#include "grib2_int.h"`
`#include <stdio.h>`
`#include <stdlib.h>`

Go to the source code of this file.

## 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

## getpoly()

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().