logo
Free, unlimited AI code reviews that run on commit
git-lrc git-lrc GitHub Install Now We'd appreciate a star git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt

specunpack.c - Unpack a spectral data field that was packed using the complex packing algorithm for

Author

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

NCEPLIBS-g2c                                      Version 2.1.0                                  specunpack.c(3)

Detailed Description

       Unpack a spectral data field that was packed using the complex packing algorithm for spherical harmonic
       data.

       Author
           Stephen Gilbert

       Date
           2000-06-21

       Definition in file specunpack.c.

Function Documentation

g2intspecunpack(unsignedchar*cpack,g2int*idrstmpl,g2intndpts,g2intJJ,g2intKK,g2intMM,float*fld)
       Unpack a spectral data field that was packed using the complex packing algorithm for spherical harmonic
       data as defined in the GRIB2 documention, using info from the GRIB2 Data Representation Template 5.51.

       Parameterscpack pointer to the packed data field.
           idrstmpl pointer to the array of values for Data Representation Template 5.51.
           ndpts The number of data values to unpack (real and imaginary parts).
           JJ pentagonal resolution parameter.
           KK pentagonal resolution parameter.
           MM pentagonal resolution parameter.
           fld Contains the unpacked data values. fld must be allocated with at least ndpts * sizeof(float)
           bytes before calling this routine.

       Returns
           0 for success, -3 for wrong type.

       Author
           Stephen Gilbert

       Date
           2000-06-21

       Definition at line 35 of file specunpack.c.

       References G2_NO_ERROR, G2_SPECUNPACK_TYPE, gbits(), int_power(), and rdieee().

       Referenced by g2c_unpack7_int().

Name

       specunpack.c - Unpack a spectral data field that was packed using the complex packing algorithm for
       spherical harmonic data.

Synopsis

       #include 'grib2_int.h'
       #include <math.h>
       #include <stdio.h>
       #include <stdlib.h>

   Functionsg2intspecunpack (unsigned char *cpack, g2int *idrstmpl, g2int ndpts, g2int JJ, g2int KK, g2int MM, float
           *fld)
           Unpack a spectral data field that was packed using the complex packing algorithm for spherical
           harmonic data as defined in the GRIB2 documention, using info from the GRIB2 Data Representation
           Template 5.51.

See Also