NCEPLIBS-bufr  11.5.0
 All Data Structures Files Functions Variables Pages
cmpmsg.f
Go to the documentation of this file.
1 C> @file
2 C> @brief Specify the use of compression when writing BUFR messages
3 
4 C> This subroutine is used to specify whether BUFR messages output
5 C> by future calls to [message-writing subroutines](@ref hierarchy) and
6 C> [subset-writing subroutines](@ref hierarchy) are to be compressed.
7 C>
8 C> @author J. Ator
9 C> @date 2005-03-09
10 C>
11 C> @param[in] CF - character*1: Flag indicating whether future BUFR
12 C> output messages are to be compressed
13 C> - 'N' = No (the default)
14 C> - 'Y' = Yes
15 C>
16 C> <p>This subroutine can be called at any time after the first call
17 C> to subroutine openbf(), and the specified value for CF will remain
18 C> in effect for all future calls to
19 C> [message-writing subroutines](@ref hierarchy) and
20 C> [subset-writing subroutines](@ref hierarchy) for all Fortran logical
21 C> units that are open for output within the application program, unless
22 C> a subsequent call is made to this subroutine to reset the value of
23 C> CF again. If this subroutine is never called, a default value of
24 C> 'N' is used for CF, as set within subroutine bfrini().
25 C>
26 C> <p>When compression is activated, it is implemented using the
27 C> algorithm for data subset compression prescribed within the
28 C> [official WMO BUFR regulations](@ref manual).
29 C> Compression is most useful when the data subsets to be
30 C> compressed are devoid of any delayed replication, and when
31 C> there is minimal variation of corresponding data values among
32 C> different data subsets within the same BUFR message. Otherwise,
33 C> compression may provide little to no benefit, and which is why
34 C> it is not activated by default.
35 C>
36 C> <b>Program history log:</b>
37 C> - 2005-03-09 J. Ator -- Original author
38 C>
39 C>
40  SUBROUTINE cmpmsg(CF)
41 
42  COMMON /msgcmp/ ccmf
43 
44  CHARACTER*128 bort_str
45  CHARACTER*1 ccmf, cf
46 
47 C-----------------------------------------------------------------------
48 C-----------------------------------------------------------------------
49 
50  CALL capit(cf)
51  IF(cf.NE.'Y'.AND. cf.NE.'N') goto 900
52  ccmf = cf
53 
54 C EXITS
55 C -----
56 
57  RETURN
58 900 WRITE(bort_str,'("BUFRLIB: CMPMSG - INPUT ARGUMENT IS ",A1,'//
59  . '", IT MUST BE EITHER Y OR N")') cf
60  CALL bort(bort_str)
61  END
subroutine cmpmsg(CF)
This subroutine is used to specify whether BUFR messages output by future calls to message-writing su...
Definition: cmpmsg.f:40
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