51 SUBROUTINE getgb1(LUGB,LUGI,JF,J,JPDS,JGDS,
52 & GRIB,KF,K,KPDS,KGDS,LB,F,IRET)
54 parameter(mbuf=8192*128)
55 parameter(lpds=23,lgds=22)
57 INTEGER JPDS(25),JGDS(*),KPDS(25),KGDS(*)
58 INTEGER IPDSP(LPDS),JPDSP(LPDS),IGDSP(LGDS)
78 IF(j.LT.0.OR.lugi.NE.lux)
THEN
81 CALL baread(lugi,0,162,ios,chead)
82 IF(ios.EQ.162.AND.chead(1)(42:47).EQ.
'GB1IX1')
THEN
84 READ(chead(2),
'(8X,3I10,2X,A40)',iostat=ios) nskp,nlen,nnum
88 print *,
'GETGB1: INCREASE BUFFER FROM ',mbuf,
' TO ',nbuf
92 CALL baread(lugi,nskp,nbuf,lbuf,cbuf)
106 IF(j.GE.0.AND.lugi.EQ.lux)
THEN
109 IF(jpds(i).NE.-1)
THEN
116 IF(jpds(3).EQ.255)
THEN
118 IF(jgds(i).NE.-1)
THEN
126 dowhile(lgrib.EQ.0.AND.kj.LT.nnum)
130 cpds=cbuf((kj-1)*nlen+26:(kj-1)*nlen+53)
132 CALL gbyte(cbuf,kptr(3),(kj-1)*nlen*8+25*8,3*8)
133 CALL fi632(cpds,kptr,kpds,iret)
136 lt=lt+abs(jpds(ip)-kpds(ip))
139 IF(lt.EQ.0.AND.lgdsp.GT.0)
THEN
140 cgds=cbuf((kj-1)*nlen+54:(kj-1)*nlen+95)
142 CALL fi633(cgds,kptr,kgds,iret)
145 lt=lt+abs(jgds(ip)-kgds(ip))
151 CALL gbyte(cbuf,lskip,(kj-1)*nlen*8,4*8)
152 CALL gbyte(cbuf,lgrib,(kj-1)*nlen*8+20*8,4*8)
153 cgds=cbuf((kj-1)*nlen+54:(kj-1)*nlen+95)
155 CALL fi633(cgds,kptr,kgds,iret)
158 IF(lgrib.LE.200+25*jf/8.AND.kgds(2)*kgds(3).LE.jf)
THEN
159 CALL baread(lugb,lskip,lgrib,lread,grib)
160 IF(lread.EQ.lgrib)
THEN
161 CALL w3fi63(grib,kpds,kgds,lb,f,kptr,iret)
subroutine gbyte(ipackd, iunpkd, noff, nbits)
This is the fortran version of gbyte.
subroutine getgb1(lugb, lugi, jf, j, jpds, jgds, grib, kf, k, kpds, kgds, lb, f, iret)
Find and unpack a grib message.
subroutine w3fi63(msga, kpds, kgds, kbms, data, kptr, kret)
Unpack a GRIB (edition 1) field to the exact grid specified in the GRIB message, isolate the bit map,...
subroutine fi632(msga, kptr, kpds, kret)
Gather info from product definition sec.