NCEPLIBS-bufr
11.6.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:
Date | Programmer | Comments |
---|---|---|
1995-06-28 | J. Woollen | Original author |
1997-07-29 | J. Woollen | Modified to process GOES soundings from NESDIS |
1998-07-08 | J. Woollen | Replaced call to Cray library routine "ABORT" with call to new internal routine bort(); modified to make Y2K compliant; improved machine portability |
1999-11-18 | J. Woollen | The number of BUFR files which can be opened at one time increased from 10 to 32; increased the maximum number of possible descriptors in a subset from 1000 to 3000 |
2000-09-19 | J. Woollen | Removed logic that had been replicated in this and other read routines and consolidated it into a new routine cktaba(); maximum message length increased from 10,000 to 20,000 bytes |
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 |
2004-08-18 | J. Ator | Modified 'BUFR' string test for portability to EBCDIC machines; maximum message length increased from 20,000 to 50,000 bytes |
2005-11-29 | J. Ator | Use ichkstr() |
2009-03-23 | D. Keyser | Call bort() in case of MBAY overflow |
2009-03-23 | J. Ator | Add logic to allow Section 3 decoding; add logic to process dictionary messages |
2012-06-07 | J. Ator | Don't respond to DX table messages if Section 3 decoding is being used |
2014-12-10 | J. Ator | Use modules instead of COMMON blocks |
Definition at line 74 of file readerme.f.
References bort(), cktaba(), dxinit(), errwrt(), ichkstr(), idxmsg(), iupbs3(), lmsg(), makestab(), reads3(), status(), stbfdx(), and wtstat().
Referenced by fdebufr().