141 SUBROUTINE putgben(LUGB,KF,KPDS,KGDS,KENS,IBS,NBITS,LB,F,IRET)
142 INTEGER KPDS(200),KGDS(200),KENS(200)
146 INTEGER IBM(KF),IPDS(200),IGDS(200),IBDS(200)
148 CHARACTER PDS(400),GRIB(1000+KF*(MAXBIT+1)/8)
151 CALL r63w72(kpds,kgds,ipds,igds)
156 IF(ipds(7).NE.0)
THEN
166 IF(kbm.EQ.kf) ipds(7)=0
182 CALL getbit(ipds(7),ibs,ipds(25),kf,ibm,f,fr,fmin,fmax,nbit)
183 nbit=min(nbit,maxbit)
189 IF(ipds(24).EQ.2)
THEN
191 CALL pdsens(kens,kprob,xprob,kclust,kmembr,ilast,pds)
195 CALL w3fi72(0,fr,0,nbit,1,ipds,pds,
196 & 1,255,igds,0,0,ibm,kf,ibds,
197 & kfo,grib,lgrib,iret)
198 IF(iret.EQ.0)
CALL wryte(lugb,lgrib,grib)
subroutine getbit(ibm, ibs, ids, len, mg, g, ground, gmin, gmax, nbit)
The number of bits required to pack a given field.
subroutine pdsens(kens, kprob, xprob, kclust, kmembr, ilast, msga)
Packs brib pds extension starting on byte 41 for ensemble forecast products.
subroutine putgben(lugb, kf, kpds, kgds, kens, ibs, nbits, lb, f, iret)
This subprogram is nearly the inverse of getgbe.
subroutine r63w72(kpds, kgds, ipds, igds)
Determines the integer PDS and GDS parameters for the GRIB1 packing routine w3fi72() given the parame...
subroutine w3fi68(id, pds)
Converts an array of 25, or 27 integer words into a grib product definition section (pds) of 28 bytes...
subroutine w3fi72(itype, fld, ifld, ibitl, ipflag, id, pds, igflag, igrid, igds, icomp, ibflag, ibmap, iblen, ibdsfl, npts, kbuf, itot, jerr)
Makes a complete GRIB message from a user supplied array of floating point or integer data.