NCEPLIBS-bufr  11.7.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> | Date | Programmer | Comments |
18 C> | -----|------------|----------|
19 C> | 1994-01-06 | J. Woollen | Original author |
20 C> | 1998-07-08 | J. Woollen | Replaced call to Cray library routine ABORT with call to new internal routine bort() |
21 C> | 1999-11-18 | J. Woollen | The number of BUFR files which can be opened at one time increased from 10 to 32 |
22 C> | 2000-09-19 | J. Woollen | Maximum message length increased from 10,000 to 20,000 bytes |
23 C> | 2002-05-14 | J. Woollen | Changed from an entry point to increase portability to other platforms |
24 C> | 2003-11-04 | J. Ator | Added documentation |
25 C> | 2004-08-09 | J. Ator | Maximum message length increased from 20,000 to 50,000 bytes |
26 C> | 2005-11-29 | J. Ator | Use pkbs1() |
27 C> | 2014-12-10 | J. Ator | Use modules instead of COMMON blocks |
28 C>
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 
40 C EXITS
41 C -----
42 
43  RETURN
44 900 CALL bort('BUFRLIB: MINIMG - OUTPUT BUFR FILE IS CLOSED, IT '//
45  . 'MUST BE OPEN FOR OUTPUT')
46 901 CALL bort('BUFRLIB: MINIMG - OUTPUT BUFR FILE IS OPEN FOR '//
47  . 'INPUT, IT MUST BE OPEN FOR OUTPUT')
48 902 CALL bort('BUFRLIB: MINIMG - A MESSAGE MUST BE OPEN IN OUTPUT '//
49  . 'BUFR FILE, NONE ARE')
50  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:29
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:57
subroutine status(LUNIT, LUN, IL, IM)
This subroutine checks whether a specified Fortran logical unit number is currently connected to the ...
Definition: status.f:55
subroutine bort(STR)
This subroutine calls subroutine errwrt() to log an error message, then calls subroutine bort_exit() ...
Definition: bort.f:22
This module contains array and variable declarations used to store BUFR messages internally for multi...
Definition: moda_bitbuf.F:10