NCEPLIBS-g2  3.4.8
gf_unpack5.F90 File Reference

Unpack Section 5 (<a href="https://www.nco.ncep.noaa.gov/pmb/docs/grib2/grib2_doc/grib2_sect5.shtml". More...

Go to the source code of this file.

Functions/Subroutines

subroutine gf_unpack5 (cgrib, lcgrib, iofst, ndpts, idrsnum, idrstmpl, mapdrslen, ierr)
 Unpack Section 5 (Data Representation Section) of a GRIB2 message, starting at octet 6 of that Section. More...
 

Detailed Description

Unpack Section 5 (<a href="https://www.nco.ncep.noaa.gov/pmb/docs/grib2/grib2_doc/grib2_sect5.shtml".

>Data Representation Section) of a GRIB2 message.

Author
Stephen Gilbert
Date
2000-05-26

Definition in file gf_unpack5.F90.

Function/Subroutine Documentation

◆ gf_unpack5()

subroutine gf_unpack5 ( character(len = 1), dimension(lcgrib), intent(in)  cgrib,
integer, intent(in)  lcgrib,
integer, intent(inout)  iofst,
integer, intent(out)  ndpts,
integer, intent(out)  idrsnum,
integer, dimension(:), pointer  idrstmpl,
integer  mapdrslen,
integer, intent(out)  ierr 
)

Unpack Section 5 (Data Representation Section) of a GRIB2 message, starting at octet 6 of that Section.

Parameters
[in]cgribCharacter array that contains the GRIB2 message.
[in]lcgribLength (in bytes) of GRIB message array cgrib.
[in,out]iofstBit offset of the beginning/end(returned) of Section 5.
[out]ndptsNumber of data points unpacked and returned.
[out]idrsnumData Representation Template Number (Code Table 5.0).
[out]idrstmplContains the data values for the specified Data Representation Template (N = idrsnum). Each element of this integer array contains an entry (in the order specified) of Product Defintion Template 5.N A safe dimension for this array can be obtained in advance from maxvals(6), which is returned from subroutine gribinfo.
[out]mapdrslenNumber of elements in idrstmpl. i.e. number of entries in Data Representation Template 5.N (N = idrsnum).
[out]ierrError return code.
  • 0 no error.
  • 6 memory allocation error.
  • 7 "GRIB" message contains an undefined Grid Definition Template.
Author
Stephen Gilbert
Date
2000-05-26

Definition at line 33 of file gf_unpack5.F90.

References drstemplates::extdrstemplate(), g2_gbytec(), and drstemplates::getdrstemplate().

Referenced by getgb2s(), and gf_getfld().