NCEPLIBS-bufr  12.0.1
minimg.f
Go to the documentation of this file.
1 C> @file
2 C> @brief Write a minutes value into Section 1 of a BUFR message.
3 C>
4 C> @author J. Woollen @date 1994-01-06
5 
6 C> This subroutine writes a minutes value into Section 1 of the BUFR
7 C> message that was most recently opened for writing via a call to
8 C> one of the [message-writing subroutines](@ref hierarchy) for a
9 C> specified Fortran logical unit.
10 C>
11 C> @param[in] LUNIT -- integer: Fortran logical unit number for
12 C> BUFR file
13 C> @param[in] MINI -- integer: Minutes value
14 C>
15 C>
16 C> @author J. Woollen @date 1994-01-06
17  RECURSIVE SUBROUTINE minimg(LUNIT,MINI)
18 
19  USE moda_bitbuf
20  USE modv_im8b
21 
22 C Check for I8 integers.
23 
24  IF(im8b) THEN
25  im8b=.false.
26 
27  CALL x84(lunit,my_lunit,1)
28  CALL x84(mini,my_mini,1)
29  CALL minimg(my_lunit,my_mini)
30 
31  im8b=.true.
32  RETURN
33  ENDIF
34 
35  CALL status(lunit,lun,il,im)
36  IF(il.EQ.0) GOTO 900
37  IF(il.LT.0) GOTO 901
38  IF(im.EQ.0) GOTO 902
39 
40  CALL pkbs1(mini,mbay(1,lun),'MINU')
41 
42 C EXITS
43 C -----
44 
45  RETURN
46 900 CALL bort('BUFRLIB: MINIMG - OUTPUT BUFR FILE IS CLOSED, IT '//
47  . 'MUST BE OPEN FOR OUTPUT')
48 901 CALL bort('BUFRLIB: MINIMG - OUTPUT BUFR FILE IS OPEN FOR '//
49  . 'INPUT, IT MUST BE OPEN FOR OUTPUT')
50 902 CALL bort('BUFRLIB: MINIMG - A MESSAGE MUST BE OPEN IN OUTPUT '//
51  . 'BUFR FILE, NONE ARE')
52  END
subroutine bort(STR)
Log one error message and abort application program.
Definition: bort.f:18
recursive subroutine minimg(LUNIT, MINI)
This subroutine writes a minutes value into Section 1 of the BUFR message that was most recently open...
Definition: minimg.f:18
This module contains array and variable declarations used to store BUFR messages internally for multi...
integer, dimension(:,:), allocatable mbay
Current BUFR message for each internal I/O stream.
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 pkbs1(IVAL, MBAY, S1MNEM)
This subroutines writes a specified value into a specified location within Section 1 of a BUFR messag...
Definition: pkbs1.f:51
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
subroutine x84(IIN8, IOUT4, NVAL)
Encode one or more 8-byte integer values as 4-byte integer values.
Definition: x84.F:19