NCEPLIBS-bufr  12.0.0
ireadsb.f
Go to the documentation of this file.
1 C> @file
2 C> @brief Read the next data subset from a BUFR message.
3 C>
4 C> @author J. Woollen @date 1994-01-06
5 
6 C> Calls NCEPLIBS-bufr subroutine readsb() and
7 C> passes back its return code as the function value.
8 C>
9 C> The use of this function allows the return code from readsb() to be
10 C> used as the target variable within an iterative program loop.
11 C>
12 C> @param[in] LUNIT - integer: Fortran logical unit number for BUFR file.
13 C> @returns ireadsb - integer:
14 C> - 0 = new BUFR data subset was successfully read into internal arrays
15 C> - -1 = there are no more BUFR data subsets in the BUFR message
16 C>
17 C> @author J. Woollen @date 1994-01-06
18 
19  RECURSIVE FUNCTION ireadsb(LUNIT) RESULT(IRET)
20 
21  USE modv_im8b
22 
23 C-----------------------------------------------------------------------
24 C-----------------------------------------------------------------------
25 
26 C Check for I8 integers.
27 
28  IF(im8b) THEN
29  im8b=.false.
30 
31  CALL x84(lunit,my_lunit,1)
32  iret=ireadsb(my_lunit)
33 
34  im8b=.true.
35  RETURN
36  ENDIF
37 
38  CALL readsb(lunit,iret)
39 
40  RETURN
41  END
recursive function ireadsb(LUNIT)
Calls NCEPLIBS-bufr subroutine readsb() and passes back its return code as the function value.
Definition: ireadsb.f:20
This module declares and initializes the IM8B variable.
logical, public im8b
Status indicator to keep track of whether all future calls to BUFRLIB subroutines and functions from ...
recursive subroutine readsb(LUNIT, IRET)
Read the next data subset from a BUFR message.
Definition: readsb.f:33
subroutine x84(IIN8, IOUT4, NVAL)
Encode one or more 8-byte integer values as 4-byte integer values.
Definition: x84.F:19