NCEPLIBS-bufr 11.7.1
ufbmns.f
Go to the documentation of this file.
1C> @file
2C> @brief Read a specified data subset from internal arrays.
3
4C> This subroutine reads a specified data subset from internal
5C> arrays in memory, so that it is now in scope for processing
6C> via calls to any of the [values-reading subroutines](@ref hierarchy)
7C> using the Fortran logical unit number IUNIT that was returned from
8C> the most recent call to subroutine ufbmem().
9C>
10C> <p>This subroutine does not return any information about which
11C> BUFR message within the internal arrays contained the specified data
12C> subset.
13C>
14C> @author J. Woollen
15C> @date 1994-01-06
16C>
17C> @param[in] IREP -- integer: Number of data subset to be
18C> read into scope for further processing,
19C> counting from the beginning of the
20C> internal arrays in memory
21C> @param[out] SUBSET -- character*8: Table A mnemonic for type of BUFR
22C> message that was read into scope
23C> (see [DX BUFR Tables](@ref dfbftab) for
24C> further information about Table A mnemonics)
25C> @param[out] IDATE -- integer: Date-time stored within Section 1 of
26C> BUFR message that was read into scope,
27C> in format of either YYMMDDHH or YYYYMMDDHH,
28C> depending on the most
29C> recent call to subroutine datelen()
30C>
31C> <b>Program history log:</b>
32C> | Date | Programmer | Comments |
33C> | -----|------------|----------|
34C> | 1994-01-06 | J. Woollen | Original author |
35C> | 1998-07-08 | J. Woollen | Replaced call to Cray library routine "ABORT" with call to new internal routine bort() |
36C> | 1999-11-18 | J. Woollen | Increased MAXMEM from 4 Mb to 8 Mb |
37C> | 2001-08-15 | D. Keyser | Increased MAXMEM from 8 Mb to 16 Mb |
38C> | 2004-11-15 | D. Keyser | Increased MAXMEM from 16 Mb to 50 Mb |
39C> | 2009-03-23 | J. Ator | Use ireadmm() instead of rdmemm(); simplify logic |
40C> | 2014-12-10 | J. Ator | Use modules instead of COMMON blocks |
41C>
42 SUBROUTINE ufbmns(IREP,SUBSET,IDATE)
43
44 USE moda_msgmem
45
46 CHARACTER*128 BORT_STR
47 CHARACTER*8 SUBSET
48
49C-----------------------------------------------------------------------
50C-----------------------------------------------------------------------
51
52 jrep = 0
53 imsg = 1
54
55C READ SUBSET #ISUB FROM MEMORY MESSAGE #IMSG
56C -------------------------------------------
57
58 DO WHILE(ireadmm(imsg,subset,idate).EQ.0)
59 IF(jrep+nmsub(munit).GE.irep) THEN
60 CALL rdmems(irep-jrep,iret)
61 GOTO 100
62 ENDIF
63 jrep = jrep+nmsub(munit)
64 ENDDO
65 GOTO 900
66
67C EXITS
68C -----
69
70100 RETURN
71900 WRITE(bort_str,'("BUFRLIB: UFBMNS - REQ. SUBSET NO. TO READ IN '//
72 . '(",I5,") EXCEEDS TOTAL NO. OF SUBSETS IN THE COLLECTION OF '//
73 . 'MEMORY MESSAGES (",I5,")")') irep,jrep
74 CALL bort(bort_str)
75 END
subroutine bort(STR)
This subroutine calls subroutine errwrt() to log an error message, then calls subroutine bort_exit() ...
Definition: bort.f:23
function ireadmm(IMSG, SUBSET, IDATE)
This function calls BUFRLIB subroutine readmm() and passes back its return code as the function value...
Definition: ireadmm.f:43
This module contains array and variable declarations used to store the contents of one or more BUFR f...
Definition: moda_msgmem.F:14
integer munit
Fortran logical unit number for use in accessing contents of BUFR files within internal memory.
Definition: moda_msgmem.F:71
function nmsub(LUNIT)
This function returns the total number of data subsets available within the BUFR message that was mos...
Definition: nmsub.f:30
subroutine rdmems(ISUB, IRET)
This subroutine reads a specified data subset from the BUFR message that was most recently read via a...
Definition: rdmems.f:43
subroutine ufbmns(IREP, SUBSET, IDATE)
This subroutine reads a specified data subset from internal arrays in memory, so that it is now in sc...
Definition: ufbmns.f:43