NCEPLIBS-bufr  12.0.1
codflg.f
Go to the documentation of this file.
1 C> @file
2 C> @brief Specify inclusion of code and flag tables when reading
3 C> master BUFR tables.
4 C>
5 C> @author J. Ator @date 2017-10-13
6 
7 C> This subroutine is used to specify whether or not code and flag
8 C> table information should be included during all future reads of
9 C> master BUFR tables.
10 C>
11 C> @param[in] CF -- character*1: Flag indicating whether
12 C> or not to include code and flag table
13 C> information during all future reads of
14 C> master BUFR tables
15 C> - 'N' = No (the default)
16 C> - 'Y' = Yes
17 C>
18 C> See [Master BUFR Tables](@ref dfbfmstab)
19 C> for more information about master BUFR tables. In particlar, note
20 C> that Table B and Table D files are always read whenever master BUFR
21 C> tables are being used, but the reading of Code/Flag table files is
22 C> optional and should only be included if the user intends to make
23 C> one or more future calls to subroutine getcfmng(); otherwise, the
24 C> reading of Code/Flag table files will result in the unnecessary use
25 C> of memory and other system resources.
26 C>
27 C> If Code/Flag tables are to be read and used, they must reside in
28 C> the same directory as the master Table B and Table D files on the
29 C> local filesystem, as specified within a separate call to
30 C> subroutine mtinfo().
31 C>
32 C> This subroutine can be called at any time after the first call
33 C> to subroutine openbf(), and the specified value for CF will remain
34 C> in effect for all future reads of master BUFR tables, unless a
35 C> subsequent call is made to this subroutine to reset the value of
36 C> CF again. If this subroutine is never called, a default value of
37 C> 'N' is used for CF, as set within subroutine bfrini().
38 C>
39 C> @author J. Ator @date 2017-10-13
40  SUBROUTINE codflg(CF)
41 
42  COMMON /tablef/ cdmf
43 
44  CHARACTER*128 BORT_STR
45  CHARACTER*1 CDMF, CF
46 
47 C-----------------------------------------------------------------------
48 C-----------------------------------------------------------------------
49 
50  CALL capit(cf)
51  IF(cf.NE.'Y'.AND. cf.NE.'N') GOTO 900
52  cdmf = cf
53 
54 C EXITS
55 C -----
56 
57  RETURN
58 900 WRITE(bort_str,'("BUFRLIB: CODFLG - INPUT ARGUMENT IS ",A1,'//
59  . '", IT MUST BE EITHER Y OR N")') cf
60  CALL bort(bort_str)
61  END
subroutine bort(STR)
Log one error message and abort application program.
Definition: bort.f:18
subroutine capit(STR)
This subroutine capitalizes all of the alphabetic characters in a string.
Definition: capit.f:13
subroutine codflg(CF)
This subroutine is used to specify whether or not code and flag table information should be included ...
Definition: codflg.f:41