NCEPLIBS-bufr  11.5.0
 All Data Structures Files Functions Variables Pages
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 
4 C> This subroutine writes a minutes value into Section 1 of the BUFR
5 C> message that was most recently opened for writing via a call to
6 C> one of the [message-writing subroutines](@ref hierarchy) for a
7 C> specified Fortran logical unit.
8 C>
9 C> @author J. Woollen
10 C> @date 1994-01-06
11 C>
12 C> @param[in] LUNIT - integer: Fortran logical unit number for
13 C> BUFR file
14 C> @param[in] MINI - integer: Minutes value
15 C>
16 C> <b>Program history log:</b>
17 C> - 1994-01-06 J. Woollen -- Original author
18 C> - 1998-07-08 J. Woollen -- Replaced call to Cray library routine ABORT
19 C> with call to new internal routine bort()
20 C> - 1999-11-18 J. Woollen -- The number of BUFR files which can be
21 C> opened at one time increased from 10 to 32
22 C> (necessary in order to process multiple
23 C> BUFR files under the MPI)
24 C> - 2000-09-19 J. Woollen -- Maximum message length increased from
25 C> 10,000 to 20,000 bytes
26 C> - 2002-05-14 J. Woollen -- Changed from an entry point to increase
27 C> portability to other platforms
28 C> - 2003-11-04 J. Ator -- Added documentation
29 C> - 2004-08-09 J. Ator -- Maximum message length increased from
30 C> 20,000 to 50,000 bytes
31 C> - 2005-11-29 J. Ator -- Use pkbs1()
32 C> - 2014-12-10 J. Ator -- Use modules instead of COMMON blocks
33 C>
34  SUBROUTINE minimg(LUNIT,MINI)
35 
36  USE moda_bitbuf
37 
38  CALL status(lunit,lun,il,im)
39  IF(il.EQ.0) goto 900
40  IF(il.LT.0) goto 901
41  IF(im.EQ.0) goto 902
42 
43  CALL pkbs1(mini,mbay(1,lun),'MINU')
44 
45 C EXITS
46 C -----
47 
48  RETURN
49 900 CALL bort('BUFRLIB: MINIMG - OUTPUT BUFR FILE IS CLOSED, IT '//
50  . 'MUST BE OPEN FOR OUTPUT')
51 901 CALL bort('BUFRLIB: MINIMG - OUTPUT BUFR FILE IS OPEN FOR '//
52  . 'INPUT, IT MUST BE OPEN FOR OUTPUT')
53 902 CALL bort('BUFRLIB: MINIMG - A MESSAGE MUST BE OPEN IN OUTPUT '//
54  . 'BUFR FILE, NONE ARE')
55  END
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:34
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:56
subroutine status(LUNIT, LUN, IL, IM)
This subroutine checks whether a specified Fortran logical unit number is currently connected to the ...
Definition: status.f:61
subroutine bort(STR)
This subroutine calls subroutine errwrt() to log an error message, then calls subroutine bort_exit() ...
Definition: bort.f:23
This module contains array and variable declarations used to store BUFR messages internally for multi...
Definition: moda_bitbuf.F:10