NCEPLIBS-bufr  12.0.0
stdmsg.f
Go to the documentation of this file.
1 C> @file
2 C> @brief Specify the use of standardization when writing BUFR messages.
3 C>
4 C> @author J. Ator @date 2004-08-18
5 
6 C> This subroutine is used to specify whether BUFR messages output by
7 C> future calls to [message-writing subroutines](@ref hierarchy) and
8 C> [subset-writing subroutines](@ref hierarchy) should be internally
9 C> reformatted to remove all BUFRLIB software extensions to the
10 C> WMO standard, prior to actually writing each message.
11 C>
12 C> It is strongly recommended to use this subroutine (or,
13 C> alternatively, subroutine stndrd() for messages which already exist
14 C> in memory arrays) whenever BUFR messages are being written that will
15 C> potentially be read using software other than the BUFRLIB software.
16 C> Otherwise, by default the output messages will contain a number of
17 C> extensions to allow for faster reading and more efficient storage,
18 C> but which will be encoded using non-standard descriptors in
19 C> Section 3, and therefore likely be unrecognizable to other software
20 C> packages.
21 C>
22 C> This subroutine can be called at any time after the first call
23 C> to subroutine openbf(), and the specified value for CF will remain
24 C> in effect for all future calls to
25 C> [message-writing subroutines](@ref hierarchy) and
26 C> [subset-writing subroutines](@ref hierarchy) for all Fortran logical
27 C> units that are open for output within the application program,
28 C> unless a subsequent call is made to this subroutine to reset the
29 C> value of CF again. If this subroutine is never called, a default
30 C> value of 'N' is used for CF, as set within subroutine bfrini().
31 C>
32 C> @param[in] CF -- character*1: Flag indicating whether future BUFR
33 C> output messages are to be standardized
34 C> - 'N' = No (the default)
35 C> - 'Y' = Yes
36 C>
37 C> @author J. Ator @date 2004-08-18
38  SUBROUTINE stdmsg(CF)
39 
40  COMMON /msgstd/ csmf
41 
42  CHARACTER*128 BORT_STR
43  CHARACTER*1 CSMF, CF
44 
45 C-----------------------------------------------------------------------
46 C-----------------------------------------------------------------------
47 
48  CALL capit(cf)
49  IF(cf.NE.'Y'.AND. cf.NE.'N') GOTO 900
50  csmf = cf
51 
52 C EXITS
53 C -----
54 
55  RETURN
56 900 WRITE(bort_str,'("BUFRLIB: STDMSG - INPUT ARGUMENT IS ",A1,'//
57  . '", IT MUST BE EITHER Y OR N")') cf
58  CALL bort(bort_str)
59  END
subroutine bort(STR)
Log one error message and abort application program.
Definition: bort.f:18
subroutine capit(STR)
This subroutine capitalizes all of the alphabetic characters in a string.
Definition: capit.f:13
subroutine stdmsg(CF)
This subroutine is used to specify whether BUFR messages output by future calls to message-writing su...
Definition: stdmsg.f:39