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