NCEPLIBS-bufr
12.1.0
|
Block BUFR messages with IEEE Fortran control words. More...
Go to the source code of this file.
Functions/Subroutines | |
subroutine | blocks (mbay, mwrd) |
Encapsulate a BUFR message with IEEE Fortran control words as specified via the most recent call to subroutine setblock(). More... | |
recursive subroutine | setblock (iblk) |
Specify whether BUFR messages output by future calls to message-writing subroutines should be encapsulated with IEEE Fortran control words when being written to output files. More... | |
subroutine blocks | ( | integer, dimension(*), intent(inout) | mbay, |
integer, intent(inout) | mwrd | ||
) |
Encapsulate a BUFR message with IEEE Fortran control words as specified via the most recent call to subroutine setblock().
A previous call to subroutine setblock() is required in order to activate encapsulation with control words, and to specify whether the control words should be encoded using big-endian or little-endian byte ordering. In such cases, the input parameter mbay is then modified to add the specified control words to the existing BUFR message whenever this subroutine is called, and mwrd is also modified accordingly.
Alternatively, if subroutine setblock() was never previously called, or if no encapsulation was specified during the most recent call to subroutine setblock(), then this subroutine simply returns without modifying either of its input parameters.
mbay | - BUFR message, possibly with added control words on output |
mwrd | - Size (in integers) of contents of mbay |
Definition at line 36 of file blocks.F90.
Referenced by msgwrt().
recursive subroutine setblock | ( | integer, intent(in) | iblk | ) |
Specify whether BUFR messages output by future calls to message-writing subroutines should be encapsulated with IEEE Fortran control words when being written to output files.
If control words are requested, then one 4-byte control word is written to the output file prior to the start of each BUFR message, and a second 4-byte control word is written to the output file after the end of each BUFR message. Each of these control words contains the byte count for the enclosed BUFR message, and they can be written using either big-endian or little-endian byte ordering, regardless of the native endianness of the local machine.
This subroutine can be called at any time after the first call to subroutine openbf(), and the specified value for iblk will remain in effect for all future calls to message-writing subroutines for all Fortran logical units that are open for output within the application program, unless a subsequent call is made to this subroutine to reset the value of iblk again. If this subroutine is never called, a default value of 0 is used for iblk, as set within subroutine bfrini().
iblk | - Flag indicating whether future BUFR output messages should be encapsulated with control words:
|
Definition at line 129 of file blocks.F90.
References x84().