NCEPLIBS-bufr  11.7.0
 All Data Structures Files Functions Variables Pages
pkb.f File Reference

Encode an integer value within an integer array. More...

Go to the source code of this file.

Functions/Subroutines

subroutine pkb (NVAL, NBITS, IBAY, IBIT)
 This subroutine encodes an integer value within a specified number of bits of an integer array, starting at the bit immediately after a specified bit within the array. More...
 

Detailed Description

Encode an integer value within an integer array.

Definition in file pkb.f.

Function/Subroutine Documentation

subroutine pkb (   NVAL,
  NBITS,
dimension(*)  IBAY,
  IBIT 
)

This subroutine encodes an integer value within a specified number of bits of an integer array, starting at the bit immediately after a specified bit within the array.

Author
J. Woollen
Date
1994-01-06
Parameters
[in]NVAL– integer: Value to be encoded
[in]NBITS– integer: Number of bits of IBAY within which to encode NVAL
[out]IBAY– integer(*): Array containing encoded NVAL
[in,out]IBIT– integer: Bit pointer within IBAY
  • On input, IBIT points to the bit within IBAY after which to begin encoding NVAL.
  • On output, IBIT points to the last bit of IBAY which contains the encoded NVAL.
Remarks
  • This subroutine is the logical inverse of subroutine upb().
  • This subroutine will not work properly if NBITS is greater than the number of bits in an integer, as determined via an internal call to subroutine wrdlen(). In such cases, the user should switch to a compiled version of the BUFRLIB software which has a larger integer size.

Program history log:

Date Programmer Comments
1994-01-06 J. Woollen Original author
2003-11-04 J. Ator Added documentation
2003-11-04 S. Bender Added remarks and routine interdependencies
2003-11-04 D. Keyser Unified/portable for WRF; added documentation; outputs more complete diagnostic info when routine terminates abnormally
2014-12-03 J. Ator Call bort() if NBITS > NBITW

Definition at line 38 of file pkb.f.

References bort(), and irev().

Referenced by atrcpt(), cmsgini(), cnved4(), cpyupd(), dxmini(), msgini(), msgupd(), msgwrt(), mvb(), pad(), padmsg(), pkbs1(), stndrd(), wrcmps(), wrdxtb(), and wrtree().