NCEPLIBS-bufr  12.0.0
ireadmm.f
Go to the documentation of this file.
1 C> @file
2 C> @brief Read a BUFR message from internal arrays.
3 C>
4 C> @author J. Woollen @date 1999-11-18
5 
6 C> Read a BUFR message from internal arrays. This function calls readmm()
7 C> and returns its return code.
8 C>
9 C> The use of this function allows the return code from readmm() to be
10 C> used as the target variable within an iterative program loop.
11 C>
12 C> @param[in,out] IMSG - integer: Message pointer within internal arrays
13 C> - On input, IMSG is the number of the BUFR message to be read into
14 C> scope for further processing, counting from the beginning of the
15 C> internal arrays in memory.
16 C> - On output, IMSG is incremented by one from its input value.
17 C> @param[out] SUBSET - character*8: Table A mnemonic for type of
18 C> BUFR message that was read into scope (see [DX BUFR Tables](@ref
19 C> dfbftab) for further information about Table A mnemonics).
20 C> @param[out] IDATE - integer: Date-time stored within Section 1 of
21 C> BUFR message that was read into scope, in format of either
22 C> YYMMDDHH or YYYYMMDDHH, depending on the most recent call to
23 C> subroutine datelen().
24 
25 C> @returns ireadmm - integer:
26 C> - 0 new BUFR message was successfully read into scope.
27 C> - -1 requested message number could not be found in internal arrays.
28 C>
29 C> @author J. Woollen @date 1999-11-18
30  RECURSIVE FUNCTION ireadmm(IMSG,SUBSET,IDATE) RESULT(IRET)
31 
32  USE modv_im8b
33 
34  CHARACTER*8 subset
35 
36 C-----------------------------------------------------------------------
37 C-----------------------------------------------------------------------
38 
39 C Check for I8 integers.
40 
41  IF(im8b) THEN
42  im8b=.false.
43 
44  CALL x84(imsg,imsg,1)
45  iret=ireadmm(imsg,subset,idate)
46  CALL x48(imsg,imsg,1)
47  CALL x48(idate,idate,1)
48 
49  im8b=.true.
50  RETURN
51  ENDIF
52 
53  CALL readmm(imsg,subset,idate,iret)
54 
55  RETURN
56  END
recursive function ireadmm(IMSG, SUBSET, IDATE)
Read a BUFR message from internal arrays.
Definition: ireadmm.f:31
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 readmm(IMSG, SUBSET, JDATE, IRET)
This subroutine reads a specified BUFR message from internal arrays in memory, so that it is now in s...
Definition: readmm.f:43
subroutine x48(IIN4, IOUT8, NVAL)
Encode one or more 4-byte integer values as 8-byte integer values.
Definition: x48.F:19
subroutine x84(IIN8, IOUT4, NVAL)
Encode one or more 8-byte integer values as 4-byte integer values.
Definition: x84.F:19