NCEPLIBS-bufr
12.0.0
|
Open a new message for output in a BUFR file that was previously opened for writing. More...
Go to the source code of this file.
Functions/Subroutines | |
recursive subroutine | openmb (LUNIT, SUBSET, JDATE) |
Open a new message for output in a BUFR file that was previously opened for writing. More... | |
Open a new message for output in a BUFR file that was previously opened for writing.
Definition in file openmb.f.
recursive subroutine openmb | ( | LUNIT, | |
character*(*) | SUBSET, | ||
JDATE | |||
) |
Open a new message for output in a BUFR file that was previously opened for writing.
This subroutine opens and initializes a new BUFR message within internal arrays, for eventual output to logical unit LUNIT.
Logical unit LUNIT should have already been opened for output operations via a previous call to subroutine openbf().
This subroutine is similar to subroutine openmg(), except that it will only open a new message if either SUBSET or JDATE has changed since the previous call to this subroutine. Otherwise, it will leave the existing internal message unchanged so that the next data subset can be written into the same internal message, thereby improving overall storage efficiency by allowing the maximum number of data subsets to be stored within each output BUFR message. For this reason, openmb() is much more widely used than openmg().
If this subroutine does need to open and initialize a new BUFR message for output (e.g. if the value of SUBSET or JDATE has changed since the previous call to this subroutine), then any existing message within the internal arrays will be automatically flushed and written to logical unit LUNIT via an internal call to subroutine closmg(). In this case, the behavior of this subroutine then becomes exactly like that of subroutine openmg().
[in] | LUNIT | - integer: Fortran logical unit number for BUFR file. |
[in] | SUBSET | - character*(*): Table A mnemonic for type of BUFR BUFR message to be opened (see DX BUFR Tables for further information about Table A mnemonics) |
[in] | JDATE | - integer: Date-time to be stored within Section 1 of BUFR message being opened, in format of either YYMMDDHH or YYYYMMDDHH. |
Definition at line 41 of file openmb.f.
References bort(), closmg(), i4dy(), moda_msgcwd::idate, modv_im8b::im8b, moda_msgcwd::inode, msgini(), nemtba(), status(), usrtpl(), wtstat(), and x84().
Referenced by bufr_c2f_interface::openmb_c().