NCEPLIBS-bufr  12.0.0
openbt.f
Go to the documentation of this file.
1 C> @file
2 C> @brief Specify DX BUFR table file of last resort.
3 C>
4 C> @author J. Woollen @date 1998-07-08
5 
6 C> This subroutine is called as a last resort from within subroutine
7 C> cktaba(), in the event the latter subroutine is unable to locate
8 C> a DX BUFR table for use in reading/decoding a given BUFR message.
9 C>
10 C> Within the BUFRLIB distribution package, this subroutine
11 C> is a default placeholder which always returns LUNDX = 0
12 C> and is only included to allow application programs to compile
13 C> without generating a link error for an unresolved external
14 C> reference. However, users are free to define their own inline
15 C> version of this subroutine with the same name and calling sequence
16 C> and include it within the compilation of their application program
17 C> in order to override the default placeholder version of this
18 C> subroutine. In such cases, subroutine cktaba() will then use
19 C> the inline version of this subroutine as a last resort when
20 C> attempting to locate the required DX BUFR table file.
21 C>
22 C> @param[in] MTYP -- integer: Data category of BUFR message for which
23 C> subroutine cktaba() was unable to locate a
24 C> DX BUFR table file
25 C> @param[out] LUNDX -- integer: Fortran logical unit number for file
26 C> containing DX BUFR table information to be
27 C> used in decoding message
28 C> - 0 = No such file is available
29 C>
30 C> @remarks
31 C> - See [DX BUFR Tables](@ref dfbftab) for more information about
32 C> the format and contents of DX BUFR table files.
33 C>
34 C> @author J. Woollen @date 1998-07-08
35  RECURSIVE SUBROUTINE openbt(LUNDX,MTYP)
36 
37  USE modv_im8b
38 
39  COMMON /quiet / iprt
40 
41  CHARACTER*128 errstr
42 
43 C CHECK FOR I8 INTEGERS
44 
45  IF(im8b) THEN
46  im8b=.false.
47 
48  CALL x84(mtyp,my_mtyp,1)
49  CALL openbt(lundx,my_mtyp)
50  CALL x48(lundx,lundx,1)
51 
52  im8b=.true.
53  RETURN
54  ENDIF
55 
56  IF(iprt.GE.0) THEN
57  CALL errwrt('+++++++++++++++++++++WARNING+++++++++++++++++++++++')
58  errstr = 'BUFRLIB: OPENBT - THIS IS A DUMMY BUFRLIB ROUTINE'//
59  . ' CALLED BY CKTABA OR APPL. PGM; OPENBT SHOULD BE INCL.'//
60  . ' IN-LINE IN APPL. PGM'
61  CALL errwrt(errstr)
62  CALL errwrt('+++++++++++++++++++++WARNING+++++++++++++++++++++++')
63  CALL errwrt(' ')
64  ENDIF
65 
66  lundx = 0
67 
68  RETURN
69  END
subroutine errwrt(STR)
This subroutine allows the user to specify a custom location for the logging of error and diagnostic ...
Definition: errwrt.f:36
This module declares and initializes the IM8B variable.
logical, public im8b
Status indicator to keep track of whether all future calls to BUFRLIB subroutines and functions from ...
recursive subroutine openbt(LUNDX, MTYP)
This subroutine is called as a last resort from within subroutine cktaba(), in the event the latter s...
Definition: openbt.f:36
subroutine x48(IIN4, IOUT8, NVAL)
Encode one or more 4-byte integer values as 8-byte integer values.
Definition: x48.F:19
subroutine x84(IIN8, IOUT4, NVAL)
Encode one or more 8-byte integer values as 4-byte integer values.
Definition: x84.F:19