NCEPLIBS-bufr  12.0.1
readmm.f
Go to the documentation of this file.
1 C> @file
2 C> @brief Read a specified BUFR message from internal arrays.
3 C>
4 C> @author J. Woollen @date 1999-11-18
5 
6 C> This subroutine reads a specified BUFR message from internal
7 C> arrays in memory, so that it is now in scope for processing
8 C> via a subsequent call to subroutine rdmems().
9 C>
10 C> BUFR messages should already be stored within internal
11 C> arrays in memory via one or more previous calls to
12 C> subroutine ufbmem().
13 C>
14 C> This subroutine is similar to subroutine rdmemm(), except that
15 C> this subroutine increments the value of IMSG prior to returning to
16 C> the calling program, which in turn allows it to be easily called
17 C> within an iterative program loop.
18 C>
19 C> @param[in,out] IMSG -- integer: Message pointer within internal arrays
20 C> - On input, IMSG is the number of the BUFR
21 C> message to be read into scope for further
22 C> processing, counting from the beginning of
23 C> the internal arrays in memory
24 C> - On output, IMSG is incremented by one from
25 C> its input value
26 C> @param[out] SUBSET -- character*8: Table A mnemonic for type of BUFR
27 C> message that was read into scope
28 C> (see [DX BUFR Tables](@ref dfbftab) for
29 C> further information about Table A mnemonics)
30 C> @param[out] JDATE -- integer: Date-time stored within Section 1 of
31 C> BUFR message that was read into scope,
32 C> in format of either YYMMDDHH or YYYYMMDDHH,
33 C> depending on the most
34 C> recent call to subroutine datelen()
35 C> @param[out] IRET -- integer: return code
36 C> - 0 = requested message was
37 C> successfully read into scope
38 C> - -1 = requested message number could not
39 C> be found in internal arrays
40 C>
41 C> @author J. Woollen @date 1999-11-18
42  RECURSIVE SUBROUTINE readmm(IMSG,SUBSET,JDATE,IRET)
43 
44  USE modv_im8b
45 
46  CHARACTER*8 subset
47 
48 C-----------------------------------------------------------------------
49 C-----------------------------------------------------------------------
50 
51 C Check for I8 integers.
52 
53  IF(im8b) THEN
54  im8b=.false.
55 
56  CALL x84(imsg,imsg,1)
57  CALL readmm(imsg,subset,jdate,iret)
58  CALL x48(imsg,imsg,1)
59  CALL x48(jdate,jdate,1)
60  CALL x48(iret,iret,1)
61 
62  im8b=.true.
63  RETURN
64  ENDIF
65 
66  CALL rdmemm(imsg,subset,jdate,iret)
67 
68  imsg = imsg+1
69 
70  RETURN
71  END
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 rdmemm(IMSG, SUBSET, JDATE, IRET)
This subroutine reads a specified BUFR message from internal arrays in memory, so that it is now in s...
Definition: rdmemm.f:40
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