NCEPLIBS-bufr
11.5.0
|
Read a BUFR message from a memory array. More...
Go to the source code of this file.
Functions/Subroutines | |
subroutine | readerme (MESG, LUNIT, SUBSET, JDATE, IRET) |
This subroutine is similar to subroutine readmg(), except that it reads a BUFR message from an array already in memory, whereas readmg() reads a BUFR message from a file on the local system. More... | |
Read a BUFR message from a memory array.
Definition in file readerme.f.
subroutine readerme | ( | dimension(*) | MESG, |
LUNIT, | |||
character*8 | SUBSET, | ||
JDATE, | |||
IRET | |||
) |
This subroutine is similar to subroutine readmg(), except that it reads a BUFR message from an array already in memory, whereas readmg() reads a BUFR message from a file on the local system.
[in] | MESG | - integer(*): BUFR message |
[in] | LUNIT | - integer: Fortran logical unit number for BUFR file |
[out] | SUBSET | - character*8: Table A mnemonic for type of BUFR message that was read (see DX BUFR Tables for further information about Table A mnemonics) |
[out] | JDATE | - integer: Date-time stored within Section 1 of BUFR message that was read, in format of either YYMMDDHH or YYYYMMDDHH, depending on the most recent call to subroutine datelen() |
[out] | IRET | - integer: return code
|
This subroutine looks and behaves a lot like subroutine readmg() except that here we have one additional input argument MESG which contains the BUFR message to be read by the BUFRLIB software. As such, this subroutine can be used in any context in which readmg() might otherwise be used, and from that point on, the application program can proceed with a call to one of the subset-reading subroutines (and then, subsequently, to any of the values-reading subroutines), just like if readmg() had been called instead.
When using this subroutine, it's still necessary for the application program to have previously called subroutine openbf() in order to associate a DX BUFR tables file with the messages that are being input via MESG, and it's still also necessary to pass in the relevant LUNIT value as a call argument, even though in this case the subroutine will not actually try to read from the associated Fortran logical unit.
If MESG contains a DX BUFR table message, the subroutine will store the contents internally and use them to process any future BUFR messages associated with LUNIT. In this case, the subroutine will return with IRET = 11, and any number of DX BUFR table messages passed in via consecutive calls to this subroutine will accumulate internally and be treated as a single DX BUFR table, up until a call is made where MESG no longer contains a DX BUFR table message.
Program history log:
Definition at line 93 of file readerme.f.
References bort(), cktaba(), dxinit(), errwrt(), ichkstr(), idxmsg(), iupbs3(), lmsg(), makestab(), reads3(), status(), stbfdx(), and wtstat().
Referenced by fdebufr().