NCEPLIBS-bufr  11.6.0
 All Data Structures Files Functions Variables Pages
mesgbf.f File Reference

Go to the source code of this file.

Functions/Subroutines

subroutine mesgbf (LUNIT, MESGTYP)
 THIS SUBROUTINE READS AND EXAMINES SECTION 1 OF MESSAGES IN A BUFR FILE IN SEQUENCE UNTIL IT FINDS THE FIRST MESSAGE THAT IS NOT A BUFR TABLE (DICTIONARY) MESSAGE. More...
 

Detailed Description

Author
WOOLLEN
Date
1994-01-06

Definition in file mesgbf.f.

Function/Subroutine Documentation

subroutine mesgbf (   LUNIT,
  MESGTYP 
)

THIS SUBROUTINE READS AND EXAMINES SECTION 1 OF MESSAGES IN A BUFR FILE IN SEQUENCE UNTIL IT FINDS THE FIRST MESSAGE THAT IS NOT A BUFR TABLE (DICTIONARY) MESSAGE.

IT THEN RETURNS THE MESSAGE TYPE FOR THIS FIRST NON-DICTIONARY MESSAGE. THE BUFR FILE SHOULD NOT BE OPEN VIA BUFR ARCHIVE LIBRARY SUBROUTINE OPENBF PRIOR TO CALLING THIS SUBROUTINE; HOWEVER, THE BUFR FILE MUST BE CONNECTED TO UNIT LUNIT. THIS SUBROUTINE IS IDENTICAL TO BUFR ARCHIVE LIBRARY SUBROUTINE MESGBC EXCEPT THAT MESGBC RETURNS THE MESSAGE TYPE FOR THE FIRST NON-DICTIONARY MESSAGE THAT ACTUALLY CONTAINS REPORT DATA (WHEREAS MESGBF WOULD RETURN THE REPORT TYPE OF A DUMMY MESSAGE CONTAINING THE CENTER TIME FOR DUMP FILES), AND MESGBC ALSO INDICATES WHETHER OR NOT THE FIRST REPORT DATA MESSAGE IS BUFR COMPRESSED. MESGBC ALSO HAS AN OPTION TO OPERATE ON THE CURRENT MESSAGE STORED IN MEMORY, WHICH IS SOMETHING THAT MESGBF CANNOT DO.

PROGRAM HISTORY LOG: 1994-01-06 J. WOOLLEN – ORIGINAL AUTHOR 2000-09-19 J. WOOLLEN – MAXIMUM MESSAGE LENGTH INCREASED FROM 10,000 TO 20,000 BYTES 2003-11-04 S. BENDER – ADDED REMARKS/BUFRLIB ROUTINE INTERDEPENDENCIES 2003-11-04 D. KEYSER – UNIFIED/PORTABLE FOR WRF; ADDED DOCUMENTATION (INCLUDING HISTORY) 2004-08-09 J. ATOR – MAXIMUM MESSAGE LENGTH INCREASED FROM 20,000 TO 50,000 BYTES 2005-11-29 J. ATOR – USE IUPBS01 AND RDMSGW 2009-03-23 J. ATOR – USE IDXMSG 2012-09-15 J. WOOLLEN – MODIFIED FOR C/I/O/BUFR INTERFACE; USE NEW OPENBF TYPE 'INX' TO OPEN AND CLOSE THE C FILE WITHOUT CLOSING THE FORTRAN FILE 2013-01-25 J. WOOLLEN – ALWAYS CALL CLOSBF BEFORE EXITING 2014-12-10 J. ATOR – USE MODULES INSTEAD OF COMMON BLOCKS

USAGE: CALL MESGBF (LUNIT, MESGTYP) INPUT ARGUMENT LIST: LUNIT - INTEGER: FORTRAN LOGICAL UNIT NUMBER FOR BUFR FILE

OUTPUT ARGUMENT LIST: MESGTYP - INTEGER: BUFR MESSAGE TYPE FOR FIRST NON-DICTIONARY MESSAGE -1 = no messages read or error 11 = if only BUFR table messages in BUFR file

INPUT FILES: UNIT "LUNIT" - BUFR FILE

REMARKS: THIS ROUTINE CALLS: CLOSBF IDXMSG IUPBS01 OPENBF RDMSGW THIS ROUTINE IS CALLED BY: None Normally called only by application programs.

Definition at line 57 of file mesgbf.f.

References closbf(), idxmsg(), iupbs01(), openbf(), and rdmsgw().