NCEPLIBS-g2  3.4.5
gf_unpack7.f File Reference

Contains subroutines unpacks Section 7 (Data Section). More...

Go to the source code of this file.

Functions/Subroutines

subroutine gf_unpack7 (cgrib, lcgrib, iofst, igdsnum, igdstmpl, idrsnum, idrstmpl, ndpts, fld, ierr)
 This subroutine unpacks Section 7 (Data Section). More...
 

Detailed Description

Contains subroutines unpacks Section 7 (Data Section).

Author
Stephen Gilbert
Date
2002-01-24

Definition in file gf_unpack7.f.

Function/Subroutine Documentation

◆ gf_unpack7()

subroutine gf_unpack7 ( character(len=1), dimension(lcgrib), intent(in)  cgrib,
integer, intent(in)  lcgrib,
integer, intent(inout)  iofst,
integer, intent(in)  igdsnum,
integer, dimension(:), pointer  igdstmpl,
integer, intent(in)  idrsnum,
integer, dimension(:), pointer  idrstmpl,
integer, intent(in)  ndpts,
real, dimension(:), pointer  fld,
integer, intent(out)  ierr 
)

This subroutine unpacks Section 7 (Data Section).

PROGRAM HISTORY LOG:

  • 2000-05-26 Stephen Gilbert Initial development.
  • 2002-12-17 Stephen Gilbert Added support for new templates using. PNG and JPEG2000 algorithms/templates.
  • 2002-12-29 Stephen Gilbert Added check on comunpack return code.
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 7.
[in]igdsnumGrid Definition Template Number (Code Table 3.0) (Only required to unpack DRT 5.51).
[in]igdstmplPointer to an integer array containing the data values for the specified Grid Definition. Template (N=igdsnum). Each element of this integer array contains an entry (in the order specified) of Grid Definition Template 3.N (Only required to unpack DRT 5.51).
[in]ndptsNumber of data points unpacked and returned.
[in]idrsnumData Representation Template Number (Code Table 5.0).
[in]idrstmplPointer to an integer array containing 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.
[in]ndptsNumber of data points unpacked and returned.
[out]fldPointer to a real array containing the unpacked data field.
[out]ierrError return code.
  • 0 no error.
  • 4 Unrecognized Data Representation Template.
  • 5 One of GDT 3.50 through 3.53 required to unpack DRT 5.51.
  • 6 memory allocation error.
  • 7 corrupt section 7.
Author
Stephen Gilbert
Date
2002-01-24

Definition at line 44 of file gf_unpack7.f.