NCEPLIBS-g2  3.4.7
getgb2l.F90 File Reference

This subroutine reads and unpacks a local use section from a GRIB2 message. More...

Go to the source code of this file.

Functions/Subroutines

subroutine getgb2l (LUGB, CINDEX, GFLD, IRET)
 This subroutine reads and unpacks a local use section from a GRIB2 message. More...
 

Detailed Description

This subroutine reads and unpacks a local use section from a GRIB2 message.

Author
Stephen Gilbert
Date
2002-05-07

Definition in file getgb2l.F90.

Function/Subroutine Documentation

◆ getgb2l()

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

This subroutine reads and unpacks a local use section from a GRIB2 message.

This subroutine decodes information for the selected grib field and returns it in a derived type variable, gfld. gfld is 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.

Note that derived type gribfield contains pointers to many arrays of data. The memory for these arrays is allocated when the values in the arrays are set, to help minimize problems with array overloading. Because of this users should free this memory, when it is no longer needed, by an explicit call to subroutine gf_free().

Parameters
[in]LUGBinteger unit of the unblocked grib data file.
[in]CINDEXindex record of the grib field (see docblock of subroutine ixgb2 for description of an index record.)
[out]GFLDderived type gribfield grib_mod::gribfield.
[out]IRETinteger return code
  • 0 all ok
  • 97 error reading grib file
  • other gf_getfld grib2 unpacker return code
Note
Do not engage the same logical unit from more than one processor.
Author
Stephen Gilbert
Date
2002-05-07

Definition at line 36 of file getgb2l.F90.

References g2_gbytec(), and gf_unpack2().

Referenced by getgb2().