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