NCEPLIBS-g2  3.4.8
getgb2r.F90 File Reference

Read and unpack sections 6 and 7 from a GRIB2 message. More...

Go to the source code of this file.

Functions/Subroutines

subroutine getgb2r (LUGB, CINDEX, GFLD, IRET)
 Read and unpack sections 6 and 7 from a GRIB2 message. More...
 

Detailed Description

Read and unpack sections 6 and 7 from a GRIB2 message.

Author
Stephen Gilbert
Date
2002-01-11

Definition in file getgb2r.F90.

Function/Subroutine Documentation

◆ getgb2r()

subroutine getgb2r ( integer, intent(in)  LUGB,
character(len=1), dimension(*), intent(in)  CINDEX,
type(gribfield GFLD,
integer, intent(out)  IRET 
)

Read and unpack sections 6 and 7 from a GRIB2 message.

It assumes that the metadata for this field already exists in derived type grib_mod::gribfield. Specifically, it requires gfld%ibmap, gfld%ngrdpts, gfld%idrtnum, gfld%idrtmpl, and gfld%ndpts.

It decodes information for the selected grib field and returns it in a derived type variable, gfld, of type grib_mod::gribfield. Users of this routine will need to include the line "use grib_mod" in their calling routine.

This subprogram is intended for private use by getgb2() routines only.

Derived type gribfield contains pointers to many arrays of data. Users must free this memory by calling gf_free().

Note
Do not engage the same logical unit from more than one processor.
Parameters
[in]LUGBinteger unit of the unblocked grib data file. File must be opened with baopen() or baopenr() before calling this routine.
[in]CINDEXindex record of the grib field (see subroutine ixgb2() for description of an index record.)
[out]GFLDderived type grib_mod::gribfield.
[out]IRETinteger return code
  • 0 all ok
  • 97 error reading grib file
  • other gf_getfld grib2 unpacker return code
Author
Stephen Gilbert
Date
2002-01-11

Definition at line 39 of file getgb2r.F90.

References g2_gbytec(), gf_unpack6(), and gf_unpack7().

Referenced by getgb2().