NCEPLIBS-bufr
12.0.1
|
Pad a BUFR data subset with zeroed-out bits up to the next byte boundary. More...
Go to the source code of this file.
Functions/Subroutines | |
subroutine | pad (IBAY, IBIT, IBYT, IPADB) |
This subroutine first packs the value for the number of bits being "padded" (we'll get to that later), starting with bit ibit+1 and using eight bits in the packed array ibay (which represents a subset packed into ibit bits). More... | |
Pad a BUFR data subset with zeroed-out bits up to the next byte boundary.
Definition in file pad.f.
subroutine pad | ( | dimension(*) | IBAY, |
IBIT, | |||
IBYT, | |||
IPADB | |||
) |
This subroutine first packs the value for the number of bits being "padded" (we'll get to that later), starting with bit ibit+1 and using eight bits in the packed array ibay (which represents a subset packed into ibit bits).
Then, starting with ibit+9, it packs zeroes (i.e., "pads") to the specified bit boundary (ipadb). (Note: it's the number of bits padded here that was packed in bits ibit+1 through ibit+8 - this is actually a delayed replication factor). IPADB must be a multiple of eight and represents the bit boundary on which the packed subset in ibay should end after padding. For example, if ipabd is "8", then the number of bits in ibay actually consumed by packed data (including the padding) will be a multiple of eight. If ipadb is "16", it will be a multiple of sixteen. in either (or any) case, this ensures that the packed subset will always end on a full byte boundary.
[in,out] | IBAY | - integer(*):
|
[in,out] | IBIT | - integer:
|
[out] | IBYT | - integer: number of bytes within IBAY containing packed data, including padding |
[in] | IPADB | - integer: bit boundary to pad to (must be a multiple of 8). |
Definition at line 34 of file pad.f.
Referenced by msgupd().