NCEPLIBS-bufr  11.5.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> - 2004-08-18 J. Ator -- Original author
40 C>
41  SUBROUTINE stdmsg(CF)
42 
43  COMMON /msgstd/ csmf
44 
45  CHARACTER*128 bort_str
46  CHARACTER*1 csmf, cf
47 
48 C-----------------------------------------------------------------------
49 C-----------------------------------------------------------------------
50 
51  CALL capit(cf)
52  IF(cf.NE.'Y'.AND. cf.NE.'N') goto 900
53  csmf = cf
54 
55 C EXITS
56 C -----
57 
58  RETURN
59 900 WRITE(bort_str,'("BUFRLIB: STDMSG - INPUT ARGUMENT IS ",A1,'//
60  . '", IT MUST BE EITHER Y OR N")') cf
61  CALL bort(bort_str)
62  END
subroutine stdmsg(CF)
This subroutine is used to specify whether BUFR messages output by future calls to message-writing su...
Definition: stdmsg.f:41
subroutine bort(STR)
This subroutine calls subroutine errwrt() to log an error message, then calls subroutine bort_exit() ...
Definition: bort.f:23
subroutine capit(STR)
THIS SUBROUTINE CAPITALIZES A STRING OF CHARACTERS.
Definition: capit.f:39