35 SUBROUTINE ixgb(LUGB,LSKIP,LGRIB,NLEN,NNUM,MLEN,CBUF)
37 parameter(lindex=112,mindex=320)
38 parameter(ixskp=0,ixspd=4,ixsgd=8,ixsbm=12,ixsbd=16,ixlen=20,
39 & ixver=24,ixpds=25,ixgds=53,ixbms=95,ixbds=101,
40 & ixpdx=112,ixpdw=172,ixgdx=184)
41 parameter(mxskp=4,mxspd=4,mxsgd=4,mxsbm=4,mxsbd=4,mxlen=4,
42 & mxver=1,mxpds=28,mxgds=42,mxbms=6,mxbds=11,
43 & mxpdx=60,mxpdw=12,mxgdx=136)
44 CHARACTER CBREAD(MINDEX),CINDEX(MINDEX)
49 CALL sbytec(cindex,lskip,8*ixskp,8*mxskp)
50 CALL sbytec(cindex,lgrib,8*ixlen,8*mxlen)
56 CALL baread(lugb,ibskip,ibread,lbread,cbread)
57 IF(lbread.NE.ibread)
RETURN
58 cindex(ixver+1)=cbread(8)
59 CALL sbytec(cindex,iskpds,8*ixspd,8*mxspd)
60 CALL gbytec(cbread,lenpds,8*iskpds,8*3)
61 CALL gbytec(cbread,incgds,8*iskpds+8*7+0,1)
62 CALL gbytec(cbread,incbms,8*iskpds+8*7+1,1)
63 ilnpds=min(lenpds,mxpds)
64 cindex(ixpds+1:ixpds+ilnpds)=cbread(iskpds+1:iskpds+ilnpds)
68 IF(lenpds.GT.mxpds)
THEN
70 ilnpdw=min(lenpds-mxpds,mxpdw)
73 CALL baread(lugb,ibskip,ibread,lbread,cbread)
74 IF(lbread.NE.ibread)
RETURN
75 cindex(ixpdw+1:ixpdw+ilnpdw)=cbread(1:ilnpdw)
76 iskpdx=iskpds+(mxpds+mxpdw)
77 ilnpdx=min(lenpds-(mxpds+mxpdw),mxpdx)
80 CALL baread(lugb,ibskip,ibread,lbread,cbread)
81 IF(lbread.NE.ibread)
RETURN
82 cindex(ixpdx+1:ixpdx+ilnpdx)=cbread(1:ilnpdx)
83 mlen=max(mlen,ixpdw+ilnpdw,ixpdx+ilnpdx)
91 CALL baread(lugb,ibskip,ibread,lbread,cbread)
92 IF(lbread.NE.ibread)
RETURN
93 CALL sbytec(cindex,iskgds,8*ixsgd,8*mxsgd)
96 cindex(ixgds+1:ixgds+ilngds)=cbread(1:ilngds)
100 ilngdx=min(
lengds-mxgds,mxgdx)
103 CALL baread(lugb,ibskip,ibread,lbread,cbread)
104 IF(lbread.NE.ibread)
RETURN
105 cindex(ixgdx+1:ixgdx+ilngdx)=cbread(1:ilngdx)
106 mlen=max(mlen,ixgdx+ilngdx)
115 CALL baread(lugb,ibskip,ibread,lbread,cbread)
116 IF(lbread.NE.ibread)
RETURN
117 CALL sbytec(cindex,iskbms,8*ixsbm,8*mxsbm)
118 CALL gbytec(cbread,lenbms,0,8*3)
119 ilnbms=min(lenbms,mxbms)
120 cindex(ixbms+1:ixbms+ilnbms)=cbread(1:ilnbms)
128 CALL baread(lugb,ibskip,ibread,lbread,cbread)
129 IF(lbread.NE.ibread)
RETURN
130 CALL sbytec(cindex,iskbds,8*ixsbd,8*mxsbd)
131 CALL gbytec(cbread,lenbds,0,8*3)
132 ilnbds=min(lenbds,mxbds)
133 cindex(ixbds+1:ixbds+ilnbds)=cbread(1:ilnbds)
138 cbuf(nskip+1:nskip+mlen)=cindex(1:mlen)
139 cbuf(nskip+mlen+1:nskip+nlen)=char(0)