NCEPLIBS-g2c  1.6.4
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 <stdio.h>
#include <stdlib.h>
#include "grib2.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. More...
 

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
csec3Character array that contains the packed GRIB2 GDS.
jjJ pentagonal resolution parameter.
kkK pentagonal resolution parameter.
mmM 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().