1 SUBROUTINE RDMSGW
(LUNIT
,MESG
,IRET
)
3 C$$$ SUBPROGRAM DOCUMENTATION BLOCK
6 C PRGMMR: ATOR ORG: NP12 DATE: 2005-11-29
8 C ABSTRACT: THIS SUBROUTINE READS THE NEXT BUFR MESSAGE FROM LOGICAL
9 C UNIT LUNIT AS AN ARRAY OF INTEGER WORDS.
11 C PROGRAM HISTORY LOG:
12 C 2005-11-29 J. ATOR -- ORIGINAL AUTHOR
13 C 2009-03-23 D. KEYSER -- CALL BORT IN CASE OF MESG OVERFLOW
14 C 2012-09-15 J. WOOLLEN -- CONVERT TO C LANGUAGE I/O INTERFACE;
15 C USE C ROUTINE CRDBUFR TO OBTAIN BUFR
16 C MESSAGE; REMOVE CODE WHICH CHECKS SEC0
17 C AND MESSAGE LENGTH AS CRDBUFR DOES THAT
19 C USAGE: CALL RDMSGW (LUNIT, MESG, IRET)
20 C INPUT ARGUMENT LIST:
21 C LUNIT - INTEGER: FORTRAN LOGICAL UNIT NUMBER FOR BUFR FILE
23 C OUTPUT ARGUMENT LIST:
24 C MESG - *-WORD ARRAY CONTAINING BUFR MESSAGE READ FROM LUNIT
25 C IRET - INTEGER: RETURN CODE:
27 C -1 = end-of-file encountered while reading
31 C UNIT "LUNIT" - BUFR FILE
34 C THIS ROUTINE CALLS: CRDBUFR ERRWRT STATUS
35 C THIS ROUTINE IS CALLED BY: COPYBF CPDXMM DATEBF DUMPBF
36 C MESGBC MESGBF POSAPX RDBFDX
37 C READMG UFBMEM UFBMEX
38 C Normally not called by any application
42 C LANGUAGE: FORTRAN 77
43 C MACHINE: PORTABLE TO ALL PLATFORMS
49 COMMON /HRDWRD
/ NBYTW
,NBITW
,IORD
(8)
53 CHARACTER*128 BORT_STR
56 C-----------------------------------------------------------------------
57 C-----------------------------------------------------------------------
59 CALL STATUS
(LUNIT
,LUN
,IL
,IM
)
60 1 IRET
=CRDBUFR
(LUN
,MESG
,MXMSGL
)
62 + CALL ERRWRT
('BUFRLIB: RDMSGW - SKIPPING OVERLARGE MESSAGE')
64 + CALL ERRWRT
('BUFRLIB: RDMSGW - SKIPPING CORRUPTED MESSAGE')