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