NCEPLIBS-g2  3.4.8
gf_unpack4.F90 File Reference

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

Go to the source code of this file.

Functions/Subroutines

subroutine gf_unpack4 (cgrib, lcgrib, iofst, ipdsnum, ipdstmpl, mappdslen, coordlist, numcoord, ierr)
 Unpack Section 4 (Product Definition Section) of a GRIB2 message, starting at octet 6 of that Section. More...
 

Detailed Description

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

>Product Definition Section) of a GRIB2 message.

Author
Stephen Gilbert
Date
2000-05-26

Definition in file gf_unpack4.F90.

Function/Subroutine Documentation

◆ gf_unpack4()

subroutine gf_unpack4 ( character(len = 1), dimension(lcgrib), intent(in)  cgrib,
integer, intent(in)  lcgrib,
integer, intent(inout)  iofst,
integer, intent(out)  ipdsnum,
integer, dimension(:), pointer  ipdstmpl,
integer  mappdslen,
real, dimension(:), pointer  coordlist,
integer, intent(out)  numcoord,
integer, intent(out)  ierr 
)

Unpack Section 4 (Product Definition 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 4.
[out]ipdsnumProduct Definition Template Number (Code Table 4.0).
[out]ipdstmplContains the data values for the Product Definition Template specified by ipdsnum. A safe dimension for this array can be obtained in advance from maxvals(4), which is returned from subroutine gribinfo.
[out]mappdslenNumber of elements in ipdstmpl. i.e. number of entries in Product Defintion Template specified by ipdsnum.
[out]coordlistPointer to real array containing floating point values intended to document the vertical discretisation associated to model data on hybrid coordinate vertical levels (part of Section 4). Must be deallocated by caller.
[out]numcoordNumber of values in array coordlist.
[out]ierrError return code.
  • 0 no error.
  • 5 "GRIB" message contains an undefined Grid Definition Template.
  • 6 memory allocation error.
Author
Stephen Gilbert
Date
2000-05-26

Definition at line 35 of file gf_unpack4.F90.

References pdstemplates::extpdstemplate(), g2_gbytec(), g2_gbytesc(), pdstemplates::getpdstemplate(), and rdieee().

Referenced by getgb2s(), and gf_getfld().