139 SUBROUTINE putgbe(LUGB,KF,KPDS,KGDS,KENS,LB,F,IRET)
140 INTEGER KPDS(200),KGDS(200),KENS(200)
144 INTEGER IBM(KF),IPDS(200),IGDS(200),IBDS(200)
146 CHARACTER PDS(400),GRIB(1000+KF*(MAXBIT+1)/8)
149 CALL r63w72(kpds,kgds,ipds,igds)
154 IF(ipds(7).NE.0)
THEN
164 IF(kbm.EQ.kf) ipds(7)=0
174 CALL getbit(ipds(7),0,ipds(25),kf,ibm,f,fr,fmin,fmax,nbit)
175 nbit=min(nbit,maxbit)
180 IF(ipds(24).EQ.2)
THEN
182 CALL pdsens(kens,kprob,xprob,kclust,kmembr,ilast,pds)
186 CALL w3fi72(0,fr,0,nbit,1,ipds,pds,
187 & 1,255,igds,0,0,ibm,kf,ibds,
188 & kfo,grib,lgrib,iret)
189 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 putgbe(lugb, kf, kpds, kgds, kens, 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.