NCEPLIBS-bufr  12.0.0
rdmsgw.F90
Go to the documentation of this file.
1 
5 
15 subroutine rdmsgw(lunit,mesg,iret)
16 
17  use bufrlib
18 
19  use modv_mxmsgl
20 
21  implicit none
22 
23  integer mesg(*), lunit, iret, lun, il, im
24 
25 !-----------------------------------------------------------------------
26 !-----------------------------------------------------------------------
27 
28  call status(lunit,lun,il,im)
29  iret = -2
30  do while (iret.le.-2)
31  iret = crdbufr_c(lun,mesg,mxmsgld4)
32  if(iret.eq.-3) call errwrt('BUFRLIB: RDMSGW - SKIPPING OVERLARGE MESSAGE')
33  if(iret.eq.-2) call errwrt('BUFRLIB: RDMSGW - SKIPPING CORRUPTED MESSAGE')
34  end do
35 
36  return
37 
38 end subroutine rdmsgw
subroutine errwrt(STR)
This subroutine allows the user to specify a custom location for the logging of error and diagnostic ...
Definition: errwrt.f:36
Wrap C NCEPLIBS-bufr functions so they can be called from within the Fortran part of the library.
Definition: bufrlib.F90:11
This module declares and initializes the MXMSGL variable.
integer mxmsgld4
The value of mxmsgl divided by 4.
subroutine rdmsgw(lunit, mesg, iret)
Read the next BUFR message from logical unit lunit as an array of integer words.
Definition: rdmsgw.F90:16
recursive subroutine status(LUNIT, LUN, IL, IM)
Check whether a specified Fortran logical unit number is currently connected to the NCEPLIBS-bufr sof...
Definition: status.f:36