NCEPLIBS-g2  3.4.5
gf_unpack4.f File Reference

This subroutine unpacks Section 4 (Product Definition Section). More...

Go to the source code of this file.

Functions/Subroutines

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

Detailed Description

This subroutine unpacks Section 4 (Product Definition Section).

Author
Stephen Gilbert
Date
2000-05-26

Definition in file gf_unpack4.f.

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 
)

This subroutine unpacks Section 4 (Product Definition 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 4.
[out]ipdsnumProduct Definition Template Number (Code Table 4.0).
[out]ipdstmplContains the data values for the specified Product Definition Template (N=ipdsnum). Each element of this integer array contains an entry (in the order specified) of Product Defintion Template 4.N. 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 4.N (N=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).
[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.
Note
Uses Fortran 90 module gridtemplates and module re_alloc.
Author
Stephen Gilbert
Date
2000-05-26

Definition at line 43 of file gf_unpack4.f.