NCEPLIBS-g2  3.4.5
gf_unpack5.f File Reference

Contains subroutines unpacks Section 5 (Data Representation Section). More...

Go to the source code of this file.

Functions/Subroutines

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

Detailed Description

Contains subroutines unpacks Section 5 (Data Representation Section).

Author
Stephen Gilbert
Date
2000-05-26

Definition in file gf_unpack5.f.

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 
)

This subroutine unpacks Section 5 (Data Representation Section) starting at octet 6 of that Section.

PROGRAM HISTORY LOG:

  • 2000-05-26 Stephen Gilbert Initial development.
  • 2002-01-24 Stephen Gilbert Changed to dynamically allocate arrays and to pass pointers to those arrays through the argument list.
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 38 of file gf_unpack5.f.