NCEPLIBS-bufr  11.7.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> | Date | Programmer | Comments |
38 C> | -----|------------|----------|
39 C> | 2005-03-09 | J. Ator | Original author |
40 C>
41  SUBROUTINE cmpmsg(CF)
42 
43  COMMON /msgcmp/ ccmf
44 
45  CHARACTER*128 bort_str
46  CHARACTER*1 ccmf, cf
47 
48 C-----------------------------------------------------------------------
49 C-----------------------------------------------------------------------
50 
51  CALL capit(cf)
52  IF(cf.NE.'Y'.AND. cf.NE.'N') goto 900
53  ccmf = cf
54 
55 C EXITS
56 C -----
57 
58  RETURN
59 900 WRITE(bort_str,'("BUFRLIB: CMPMSG - INPUT ARGUMENT IS ",A1,'//
60  . '", IT MUST BE EITHER Y OR N")') cf
61  CALL bort(bort_str)
62  END
subroutine cmpmsg(CF)
This subroutine is used to specify whether BUFR messages output by future calls to message-writing su...
Definition: cmpmsg.f:41
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