112 SUBROUTINE getgb2(LUGB, LUGI, J, JDISC, JIDS, JPDTN, JPDT, JGDTN, JGDT, &
113 UNPACK, K, GFLD, IRET)
117 INTEGER,
INTENT(IN) :: LUGB, LUGI, J, JDISC, JPDTN, JGDTN
118 INTEGER,
DIMENSION(:) :: JIDS(*), JPDT(*), JGDT(*)
119 LOGICAL,
INTENT(IN) :: UNPACK
120 INTEGER,
INTENT(OUT) :: K, IRET
122 CHARACTER(LEN = 1),
POINTER,
DIMENSION(:) :: CBUF
123 integer :: nnum, nlen, lpos, jk, irgi, irgs
127 SUBROUTINE getidx(LUGB, LUGI, CBUF, NLEN, NNUM, IRGI)
128 CHARACTER(LEN = 1),
POINTER,
DIMENSION(:) :: CBUF
129 INTEGER,
INTENT(IN) :: LUGB, LUGI
130 INTEGER,
INTENT(OUT) :: NLEN, NNUM, IRGI
136 CALL getidx(lugb, lugi, cbuf, nlen, nnum, irgi)
137 IF (irgi .GT. 1)
THEN
143 CALL getgb2s(cbuf, nlen, nnum, j, jdisc, jids, jpdtn, jpdt, jgdtn, jgdt, jk, &
145 IF (irgs .NE. 0)
THEN
152 CALL getgb2l(lugb, cbuf(lpos), gfld, iret)
156 CALL getgb2r(lugb, cbuf(lpos), gfld, iret)
subroutine getgb2(LUGB, LUGI, J, JDISC, JIDS, JPDTN, JPDT, JGDTN, JGDT, UNPACK, K, GFLD, IRET)
Find and unpack a GRIB2 message in a file.
subroutine getgb2l(LUGB, CINDEX, GFLD, IRET)
This subroutine reads and unpacks a local use section from a GRIB2 message.
subroutine getgb2r(LUGB, CINDEX, GFLD, IRET)
Read and unpack sections 6 and 7 from a GRIB2 message.
subroutine getgb2s(CBUF, NLEN, NNUM, J, JDISC, JIDS, JPDTN, JPDT, JGDTN, JGDT, K, GFLD, LPOS, IRET)
Find information about a GRIB field from the index and fill a grib_mod::gribfield.
subroutine getidx(lugb, lugi, cindex, nlen, nnum, iret)
Find, read or generate a GRIB2 index for the GRIB2 file associated with unit lugb.
subroutine gf_free(gfld)
Free memory that was used to store array values in derived type grib_mod::gribfield.
This Fortran module contains the declaration of derived type gribfield.